I am trying to make estimates of the predictive power of ARIMA models estimated by the auto.arima() function.
I am looping through a large number of time seiries and fitting ARIMA models with the following code. data1 <- read.csv(file = "case.csv", header = T) data <- data1 output = c(1:length(data)) 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. I tried including something like this: output[i] = cor(model_data, real_data) but with poor results. Does anyone have any tricks to calculate the R^2 or an ARIMA model. Sample code would be apreciated. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.