[R] ARMA and prediction
Ritz
gulabrani.ritika at gmail.com
Wed Oct 12 18:22:22 CEST 2011
Hello,
I am running an ARMA model to run forecast for changes in S&P 500 prices.
My ARMA calculations look as follows
armacal <- arma( spdata, order = c(0,4), lag = list(ma = c(1,2,4)) )
Output:
Call:
arma(x = spdata, order = c(0, 4), lag = list(ma = c(1, 2, 4)) )
Coefficient(s):
ma1 ma2 ma4 intercept
-0.073868 0.058020 -0.081292 0.007082
All's bright and sunny till this point...after this it gets stormy
Next, I want to run prediction on these ARMA calculations. So i tried:
prediction <-predict( armacal, n.ahead = 1 )
Output:
Error in UseMethod("predict") :
no applicable method for 'predict' applied to an object of class "arma"
How do I get around this?
I cannot use arima() because I need the flexibility of "lag" from arma(),
unless there's a way to include lag in arima().
I have attached the .dat data file.
Would appreciate any guidance/help.
Thanks!
Cheers,
-Ritz
http://r.789695.n4.nabble.com/file/n3898622/spdata.dat spdata.dat
--
View this message in context: http://r.789695.n4.nabble.com/ARMA-and-prediction-tp3898622p3898622.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list