I have several hundred times series data sets and I am trying to use auto.arima(), in the forecasting package, to take a first stab at fitting an ARIMA model to each set. Ideally I would like to loop through each time series use auto.arima() to fit a model and output the R^2 of the model and the parameters. I know how to fit each model but I am having trouble generating the necessary output. I have this.
x = c(-0.007004338981206, 0.0022575799741098, 0.0124541354151786, ...) # there are several hundred observations x_class = aut0.arima(x, d = 0, max.p = 20, min.p = 20) #define x_class as specified ARIMA order = x_class[7] #get model order However, I am unsure how to calculate the r^2 of the fitted model. How would I go about calculating that value? [[alternative HTML version deleted]] ______________________________________________ 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.