library(forecast)
Registered S3 method overwritten by 'xts':
method from
as.zoo.xts zoo
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
Registered S3 methods overwritten by 'forecast':
method from
fitted.fracdiff fracdiff
residuals.fracdiff fracdiff
> methods(forecast)
[1] forecast.ar* forecast.Arima* forecast.baggedModel*
[4] forecast.bats* forecast.default* forecast.ets
[7] forecast.forecast* forecast.fracdiff* forecast.HoltWinters*
[10] forecast.lagwalk* forecast.lm* forecast.mlm*
[13] forecast.modelAR* forecast.mstl* forecast.mts*
[16] forecast.nnetar* forecast.stl* forecast.stlm*
[19] forecast.StructTS* forecast.tbats* forecast.ts*
[22] forecast.varest*
see '?methods' for accessing help and source code
> sessionInfo()
R version 3.6.0 Patched (2019-06-14 r76701)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8.1 x64 (build 9600)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936
[2] LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] forecast_8.7
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 magrittr_1.5 tidyselect_0.2.5 munsell_0.5.0
[5] colorspace_1.4-1 lattice_0.20-38 R6_2.4.0 quadprog_1.5-7
[9] rlang_0.3.4 TTR_0.23-4 dplyr_0.8.1 tools_3.6.0
[13] xts_0.11-2 quantmod_0.4-15 nnet_7.3-12 parallel_3.6.0
[17] grid_3.6.0 nlme_3.1-140 timeDate_3043.103 gtable_0.3.0
[21] urca_1.3-0 tseries_0.10-47 lazyeval_0.2.2 assertthat_0.2.1
[25] lmtest_0.9-37 tibble_2.1.3 crayon_1.3.4 purrr_0.3.2
[29] ggplot2_3.2.0 curl_3.3 glue_1.3.1 fracdiff_1.4-2
[33] compiler_3.6.0 pillar_1.4.1 scales_1.0.0 pkgconfig_2.0.2
[37] zoo_1.8-6
这样才对
cpiforecast1 <- forecast(HoltWinters(cpiforecast), h=1)