Hi,
I wanted to use an arma model for predicting, but anyway I got an error message:
Error in is.constant(y) : (list) object cannot be coerced to type 'double'
I am enclosing my small code to reproduct.
x <- c(
-0.182630330550825,
1.43776588036681,
2.81481681390906,
2.0113407663576,
-0.701010275551003,
-0.543605230932999,
0.228593962609001,
0.414170620057577,
1.038825346349,
1.321791599367,
0.458189267809001,
1.03731027525758,
-0.640838732051002,
-0.566790156132998,
-1.910649484891,
-0.476501028142424,
1.478356433449,
1.932462299167,
2.690297016909,
0.825146989857574,
0.232721912249001,
1.507414635867,
-1.314016630591,
1.43001973795758,
0.667089291048995,
-0.505273901232996,
-0.479567091690999,
0.513509557457573,
1.210212965549,
-0.999737343932998,
-2.164102011291,
-1.28907021054242,
-0.357218283950999,
0.811356608466999,
-0.0728665757910001,
-0.627909791542423,
1.259364825149,
2.201785862767,
0.714519655109001,
0.386484342457573,
-0.292395132551
)
arma2 <- tseries::arma(x, order = c(2, 0), include.intercept = F)
arma2
forecast::forecast(arma2)
predict(arma2)
Thank you for your help in advance