Hi everybody,

I am trying to run an AR1 model using the ar() function as shown below.

> rollingarma<-rollapply(data,width=36,function(data) ar(data,aic=TRUE))
> head(rollingarma,50)
      order ar        var.pred x.mean   aic        n.used order.max partialacf 
resid      method        series
 [1,] 1     0.7433347 1.382908 49.99861 Numeric,16 36     15        Numeric,15 
Numeric,36 "Yule-Walker" "data"
 [2,] 1     0.7410181 1.565755 49.94778 Numeric,16 36     15        Numeric,15 
Numeric,36 "Yule-Walker" "data"
 [3,] 1     0.7636966 1.660581 49.86861 Numeric,16 36     15        Numeric,15 
Numeric,36 "Yule-Walker" "data"


I get the table as shown above if I use head().

How can I extract the ar coefficients from this table? I have already tried 
coef() and rollingarma$ar but both do not work.
What can I do?

Thanks for your help.


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to