everyone。我刚开始学习时间系列。使用rts()函数分析CPI数据的奇怪结果
我有以下来自中国的月度CPI数据(2010.01 - 2015.12)。
我想使用ETS从R.
vector1 <- c(100.6, 101.2, 99.3, 100.2, 99.9, 99.4, 100.4, 100.6, 100.6, 100.7, 101.1, 100.5, 101.0, 101.2, 99.8, 100.1, 100.1, 100.3, 100.5, 100.3, 100.5, 100.1, 99.8, 100.3, 101.5, 99.9, 100.2, 99.9, 99.7, 99.4, 100.1, 100.6, 100.3, 99.9, 100.1, 100.8, 101.0, 101.1, 99.1, 100.2, 99.4, 100.0, 100.1, 100.5, 100.8, 100.1, 99.9, 100.3, 101.0, 100.5, 99.5, 99.7, 100.1, 99.9, 100.1, 100.2, 100.5, 100.0, 99.8, 100.3, 100.3, 101.2, 99.5, 99.8, 99.8, 100.0, 100.3, 100.5, 100.1, 99.7, 100.0, 100.5)
做一些预测与此数据()函数我试图按照从下面的链接的过程: https://stats.stackexchange.com/questions/146098/ets-function-how-to-avoid-forecast-not-in-line-with-historical-data
的代码是如如下:
train_ts<- ts(vector1, frequency=12)
fit2<-ets(train_ts, model="ZZZ", damped=TRUE, alpha=NULL, beta=NULL, gamma=NULL,
phi=NULL, additive.only=FALSE, lambda=TRUE,
lower=c(0.000,0.000,0.000,0.8),upper=c(0.9999,0.9999,0.9999,0.98),
opt.crit=c("lik","amse","mse","sigma","mae"), nmse=3,
bounds=c("both","usual","admissible"), ic=c("aicc","aic","bic"),
restrict=TRUE)
ets <- forecast(fit2,h=5,method ='ets')
plot(forecast(fit2))
lines(fit2$states[,1],col='red')
但是,我得到了下图,看起来很奇怪。 我得到α= 0,β= 0和γ= 0 ...这似乎意味着我没有趋势,没有季节性?
对不起,我有很多问题..
是否预测是否正确?我认为这里有些问题,但我无法弄清楚问题所在。
“fit2 $ states [,1]”代表什么?红线代表什么?
非常感谢所有帮助那种..
然后我试图使用数据矢量[1:43]的一部分。我得到的是...
非常感谢您的帮助!我正在使用最新版本的预测8.0。 –