Title

smoothf(
  y,
  h = 5,
  level = c(80, 95),
  n_estimators = 5,
  lags = 1,
  method = c("mean", "median"),
  ci = c("E", "A", "T", "garch")
)

Arguments

n_estimators

lorem ipsum

lags

lorem ipsum

Examples


par(mfrow=c(3, 2))

y <- Nile
(res <- smoothf(y, h=10))
#>      Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
#> 1971       725.0765 616.7823 833.3707 559.4548 890.6982
#> 1972       731.5765 623.2823 839.8707 565.9548 897.1982
#> 1973       728.3265 620.0323 836.6207 562.7048 893.9482
#> 1974       729.9515 621.6573 838.2457 564.3298 895.5732
#> 1975       729.1390 620.8448 837.4332 563.5173 894.7607
#> 1976       729.5453 621.2511 837.8395 563.9236 895.1669
#> 1977       729.3421 621.0479 837.6363 563.7205 894.9638
#> 1978       729.4437 621.1495 837.7379 563.8220 895.0654
#> 1979       729.3929 621.0987 837.6871 563.7712 895.0146
#> 1980       729.4183 621.1241 837.7125 563.7966 895.0400
plot(res)

y <- AirPassengers
(res <- smoothf(y, h = 10))
#>          Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
#> Jan 1961       417.6981 409.7355 425.6607 405.5203 429.8759
#> Feb 1961       409.1867 401.2241 417.1493 397.0089 421.3645
#> Mar 1961       433.2112 425.2485 441.1738 421.0334 445.3889
#> Apr 1961       435.1119 427.1493 443.0745 422.9341 447.2896
#> May 1961       424.0672 416.1045 432.0298 411.8894 436.2449
#> Jun 1961       449.0266 441.0640 456.9892 436.8488 461.2043
#> Jul 1961       460.0216 452.0590 467.9842 447.8438 472.1993
#> Aug 1961       412.5100 404.5474 420.4726 400.3323 424.6878
#> Sep 1961       369.1929 361.2303 377.1555 357.0152 381.3707
#> Oct 1961       393.8471 385.8845 401.8097 381.6693 406.0248
plot(res)

y <- USAccDeaths
(res <- smoothf(y, h = 10))
#>          Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
#> Jan 1979       8554.633 8356.266 8753.000 8251.257 8858.009
#> Feb 1979       8688.897 8490.530 8887.264 8385.521 8992.273
#> Mar 1979       9411.320 9212.954 9609.687 9107.944 9714.697
#> Apr 1979       9162.875 8964.509 9361.242 8859.499 9466.251
#> May 1979       9454.275 9255.908 9652.642 9150.899 9757.651
#> Jun 1979       9264.216 9065.849 9462.583 8960.840 9567.592
#> Jul 1979       9477.233 9278.866 9675.600 9173.857 9780.609
#> Aug 1979       8685.318 8486.951 8883.685 8381.942 8988.694
#> Sep 1979       8487.798 8289.431 8686.165 8184.422 8791.174
#> Oct 1979       9217.584 9019.217 9415.951 8914.208 9520.960
plot(res)

y <- WWWusage
(res <- smoothf(y, h = 10))
#>     Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
#> 101       219.9999 217.6714 222.3284 216.4387 223.5611
#> 102       219.4999 216.2070 222.7928 214.4639 224.5359
#> 103       219.7499 215.7170 223.7828 213.5822 225.9176
#> 104       219.6249 214.9682 224.2816 212.5031 226.7467
#> 105       219.6874 214.4811 224.8937 211.7250 227.6498
#> 106       219.6562 213.9529 225.3594 210.9338 228.3785
#> 107       219.6718 213.5116 225.8319 210.2506 229.0929
#> 108       219.6640 213.0785 226.2495 209.5923 229.7356
#> 109       219.6679 212.6829 226.6528 208.9853 230.3504
#> 110       219.6659 212.3031 227.0287 208.4055 230.9263
plot(res)

y <- WWWusage
(res <- smoothf(y, h = 10, lags = 2L))
#>     Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
#> 101       219.9999 216.4364 223.5635 214.5499 225.4499
#> 102       218.9399 213.9005 223.9793 211.2328 226.6470
#> 103       218.8959 212.7240 225.0678 209.4568 228.3350
#> 104       219.2394 212.1127 226.3660 208.3401 230.1386
#> 105       219.0258 211.0581 226.9936 206.8402 231.2114
#> 106       219.0648 210.3366 227.7930 205.7162 232.4135
#> 107       219.1024 209.6749 228.5299 204.6843 233.5206
#> 108       219.0660 208.9876 229.1445 203.6524 234.4797
#> 109       219.0789 208.3891 229.7687 202.7303 235.4275
#> 110       219.0812 207.8132 230.3492 201.8483 236.3141
plot(res)


y <- WWWusage
(res <- smoothf(y, h = 10, lags = 3L))
#>     Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
#> 101       218.9853 214.8832 223.0873 212.7118 225.2588
#> 102       217.2589 208.8743 225.6435 204.4357 230.0820
#> 103       216.0299 203.0467 229.0131 196.1738 235.8860
#> 104       215.5858 197.9112 233.2604 188.5549 242.6167
#> 105       215.6175 193.2815 237.9535 181.4575 249.7775
#> 106       215.0794 188.1807 241.9781 173.9414 256.2174
#> 107       214.7655 183.4407 246.0902 166.8584 262.6725
#> 108       214.6046 179.0094 250.1998 160.1664 269.0427
#> 109       214.4784 174.7757 254.1812 153.7583 275.1985
#> 110       214.3089 170.6617 257.9560 147.5563 281.0614
plot(res)



grid_params <- expand.grid(n_estimators=1:10, lags=c(1, 2, 3, 4))