[R] Testing predictive power of ARIMA model
singularitaet at gmx.net
Sat Dec 13 15:02:58 CET 2008
> for(i in 1:length(data))
> point_data = unlist(data[i], use.names = FALSE)
> x = auto.arima(point_data , max.p = 10, max.q = 10, max.P = 0, max.Q = 0, approximation = TRUE)
> However, I would like to find a way to test the out of sample predictive power of these models. I can think of a few ways I MIGHT be able to do this but nothing clean. I am a recen R user and despite my best efforts (looking on the mailing list, reading documentation) I cant figure out the best way to do this.
if you want to test the predictive power you need a prediction. so at
least you need predict(x) in your loop and to store the predictions in
another variable. Afterwards you can calculate several measures.
another way is to use the dm.test and accuracy functions of the
forecast(ing) package which you might already have used for the auto arima.
one remark: the use of auto arima might not be the best solution since
it uses in sample fit measures (e.g. AIC) for the best in sample fit. So
for every i you might have a very different arima class. I am not sure
whether this is what you intented...
More information about the R-help