所以,我有这个时间序列来跟踪研究生课程的每日申请数量。每个申请期限为64天 - 因此对于每个期间,您从零开始,直到期末结束。最后一段是部分的,代表当前的申请期。
[1] 0 26 32 36 37 38 40 43 43 44 45 45 45 45 49 49 55 61 66 69 73 77 85 94 99 102 104 108 113 117 123 126 128 132 138 143 151 156 158 161 162 172 175 179 182 189 193
[48] 196 206 213 218 225 234 241 243 251 256 264 267 273 277 282 290 302 0 16 23 36 40 44 51 54 58 60 64 66 69 74 82 88 90 91 92 93 96 102 102 104 106 109 111 115 117 124
[95] 124 126 128 128 129 130 132 135 135 136 139 140 146 150 152 155 157 159 160 167 171 173 174 174 176 177 180 182 184 185 186 186 187 187 0 11 16 27 38 40 44 51 54 57 61 71 80
[142] 85 92 95 97 100 107 116 121 125 131 134 134 136 137 143 150 151 156 163 163 165 173 189 200 210 215 233 247 256 275 279 284 291 304 310 315 325 330 332 332 343 345 351 357 359 359 365
[189] 371 372 372 374 0 24 34 41 53 65 74 78 84 90 93 96 104 105 112 118 122 126 134 138 143 151 155 156 158 159 164 171 177 180 184 188 196 201 203 218 223 225 230 233 236 240 245
[236] 250 255 259 265 267 275 281 285 290 293 298 307 316 319 320 322 325 328 338 342 342 0 10 18 23 27 40 51 60 67 71 73 76 82 88 91 94 102 102 104 111 114 118 119 123 123 130
[283] 133 142 146 154 157 160 163 172 177 187 192 195 195 197 201 208 210 214 222 225 227 232 240 243 246 249 251 254 258 261 265 267 269 270 272 274 293 293 0 12 17 19 22 27 28 32 35
[330] 38 44 45 45 46 52 54 55 61 67 73 77 79 82 85 87 90 110 122 128 133 145 157 169 179 198 205 215 229 239 256 264 279 290 298 306 309 317 322 324 327 331 341 357 375 379 382
[377] 385 395 396 398 400 407 409 415 0 57 72 94 104 119 125 129 131 136 149 154 165 173 177 181 186 191 195 204 210 216 224 234 240 245 253 257 263 269 273 276 283 287 304 322 328 332 352
[424] 366 377 380 383 387 388 398 405 408 411 416 420 427 435 437 446 448 455 463 468 476 486 493 501 501 0 17 35 48 61 69 77 87 95 100 105 109 112 117 120 122 125 131 136 141 145 154
[471] 159 161 164 169 172 179 182 190 192 199 203 206 209 218 225 228 231 237 241 243 245 248 249 256 262 277 289 295 303 308 313 321 330 333 334 342 343 344 346 349 353 354 1 17 32 40 48
[518] 50 53 54 55 56 62 65 69 73 75 81 85 87 89 92 96 98 100 103 106 108 111 112 113 121 123 127 130 136 136 141 143 146 146 150 151 152 153 154 164 175 184 187 189 191 192 193
[565] 198 203 217 220 230 234 237 240 244 256 262 268 0 20 31 46
每天,我都运行一个简单的模型来恰好预测应用程序的数量。
myts2 <- ts(df, frequency = 64)
myts2 <- HoltWinters(myts2, seasonal = "additive")
fcast <- predict(myts2, n.ahead=60, prediction.interval = T, level = 0.95)
# Creates data frame with day (0 to 63), predicted fit, and confidence intervals
castout <- data.frame((elapsed):63, as.numeric(fcast[,1]), as.numeric(fcast[,2]), as.numeric(fcast[,3]))
names(castout) <- c("Day", "Total", "High", "Low")
# Simplified; this block ensures the low esimate cannot dip below the current number of applications
castout$Low[castout$Low < 53)] <- 53
这是结果图表和fcast的输出:
> fcast
Time Series:
Start = c(10, 5)
End = c(10, 64)
Frequency = 64
fit upr lwr
10.06250 51.08407 77.18901 24.979132
10.07812 55.25007 91.76327 18.736879
10.09375 61.69342 106.24630 17.140542
10.10938 65.36204 116.71089 14.013186
10.12500 69.29609 126.64110 11.951078
10.14062 71.76356 134.53454 8.992582
10.15625 76.06790 143.83176 8.304034
10.17188 78.42243 150.83574 6.009127
10.18750 81.85213 158.63385 5.070411
10.20312 86.70147 167.61610 5.786832
10.21875 94.62669 179.47316 9.780222
10.23438 101.18980 189.79380 12.585798
10.25000 104.27303 196.48157 12.064493
10.26562 106.00446 201.68183 10.327081
10.28125 107.74120 206.76598 8.716431
10.29688 109.56690 211.82956 7.304241
10.31250 112.75659 218.15771 7.355464
10.32812 119.17347 227.62227 10.724667
10.34375 120.76563 232.17877 9.352490
10.35938 123.42045 237.72108 9.119822
10.37500 126.19423 243.31117 9.077281
10.39062 130.27639 250.14350 10.409274
10.40625 133.92534 256.48092 11.369764
10.42188 138.90565 264.09197 13.719325
10.43750 142.15385 269.91676 14.390943
10.45312 149.87770 280.16626 19.589151
10.46875 152.03874 284.80490 19.272586
10.48438 155.52991 290.72828 20.331547
10.50000 143.70956 281.29715 6.121980
10.51562 144.86804 284.80405 4.932018
10.53125 150.57027 292.81595 8.324581
10.54688 156.17148 300.68993 11.653042
10.56250 162.91642 309.67243 16.160415
10.57812 167.96348 316.92344 19.003512
10.59375 170.24252 321.37431 19.110738
10.60938 173.24254 326.51538 19.969707
10.62500 173.89835 329.28274 18.513961
10.64062 181.92820 339.39583 24.460577
10.65625 185.62127 345.14493 26.097603
10.67188 188.82313 350.37666 27.269594
10.68750 191.58817 355.14638 28.029951
10.70312 197.56781 363.10643 32.029187
10.71875 201.46633 368.96194 33.970710
10.73438 203.75381 373.18381 34.323802
10.75000 211.86575 383.20831 40.523188
10.76562 218.58229 391.81629 45.348290
10.78125 223.19144 398.29645 48.086433
10.79688 229.36717 406.32341 52.410940
10.81250 237.59928 416.38758 58.810989
10.82812 244.59432 425.19609 63.992543
10.84375 247.02798 429.42520 64.630764
10.85938 253.22807 437.40324 69.052906
10.87500 258.46738 444.40349 72.531266
10.89062 265.76017 453.44071 78.079642
10.90625 268.82203 458.23093 79.413143
10.92188 274.29332 465.41494 83.171700
10.93750 278.46062 471.27976 85.641485
10.95312 283.35496 477.85680 88.853120
10.96875 290.67334 486.84344 94.503231
10.98438 301.22108 499.04539 103.396775
如您所见,给定周期中的应用程序数量是持平或增加的。然而在预测中,在第30天之后就会出现下降。对于我的生活,我无法弄清楚是什么导致了它。有什么想法吗?