R STLM中的模型函数
您好,我想使用R STLM中的模型函数,r,forecast,R,Forecast,您好,我想使用nnfor包中的elm函数,在季节性调整的时间序列上,从forecast包中计算STLM模型 我可以使用thenmodelfunction参数来实现这一点 让我们用这个时间系列: y<- ts(rnorm(300,mean=0,sd=1), start=c(2012,2), frequency=12) > head(y,10) Feb Mar Apr May Jun 2012
nnfor
包中的elm
函数,在季节性调整的时间序列上,从forecast
包中计算STLM
模型
我可以使用thenmodelfunction
参数来实现这一点
让我们用这个时间系列:
y<- ts(rnorm(300,mean=0,sd=1), start=c(2012,2), frequency=12)
> head(y,10)
Feb Mar Apr May Jun
2012 1.83672399 0.09163453 1.43897758 -0.06213232 0.21279124
Jul Aug Sep Oct Nov
2012 1.43642897 1.36854342 -0.38119914 -0.94666416 1.41982674
但不是来自其他软件包的预测模型
model2 =stlm(y,modelfunction=nnfor::elm)
> Error in `+.default`(fitted(fit), allseas) :
time-series/vector length mismatch
modelfunction参数应该使用哪种格式
有什么办法帮我吗?
非常感谢
model2 =stlm(y,modelfunction=nnfor::elm)
> Error in `+.default`(fitted(fit), allseas) :
time-series/vector length mismatch