Message-ID: <1466076844890.54542@kent.ac.uk>
Date: 2016-06-16T11:34:04Z
From: T.Riedle
Subject: extracting coefficients from ar() output
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]]