# Aggregating results from Arima runs R

/edit: To clarify: The mtable function from the memisc package does exactly what I need, but unfortunately does not work with arima models.

Similar to this question: I have multiple Arima models, some of which I've also fit with dependent variables. I'd like an easy way to make a table/graph of the coefficients in each model, as well as summary statistics about each model.

Here is some example code:

sim <- arima.sim(list(order = c(1,1,0), ar = 0.7), n = 200)

ar1<-arima(sim,order=c(1,1,0))
ar2<-arima(sim,order=c(2,1,0))
ar3<-arima(sim,order=c(3,1,0))
ar4<-arima(sim,order=c(2,2,1))

#Try mtable
library(memisc)
mtable("Model 1"=ar1,"Model 2"=ar2,"Model 3"=ar3,"Model 4"=ar4)
#>Error in UseMethod("getSummary") :
#  no applicable method for 'getSummary' applied to an object of class "Arima"

#Try  apsrtable
library(apsrtable)
apsrtable("Model 1"=ar1,"Model 2"=ar2,"Model 3"=ar3,"Model 4"=ar4)
#>Error in est/x\$se : non-numeric argument to binary operator

-
 why do the approaches described in the question you mention not work for you? – mpiktas Feb 7 '11 at 19:26 @mpiktas - it looks like the OP tried the methods mentioned previously has has copied the corresponding errors in the code above. – Chase Feb 7 '11 at 20:08 @Chase, when I commented, there was no R code example. – mpiktas Feb 7 '11 at 20:25 @mpiktas - I blame the R gremlins – Chase Feb 7 '11 at 20:26 @mpiktas - I added a code example that lists what I tried to do and the errors I got. I hit the 3 methods discussed in the previous question. – Zach Feb 7 '11 at 21:57

You need to write a function called getSummary.Arima for use with the memisc package. Check out getSummary.lm for an example.
 Thanks for the advice. I'll look into that. – Zach Feb 8 '11 at 14:18 @Zach - did you happen to make any progress with writing the getSummary.Arima function? I'm taking a ts course this term and would be glad to lend a hand if needed. Let me know. – Chase May 31 '11 at 3:56 @Chase - I didn't ever start on this. If you'd like to take a shot at it, I'd be glad to help out. – Zach May 31 '11 at 13:27