Skip to content
Prev 361779 / 398506 Next

extracting coefficients from ar() output

help(ar) should tell you how to get the coefficients.  If, like me, you
don't
read help files, you can use str() to look at the structure of ar's output.
List of 14
 $ order       : int 2
 $ ar          : num [1:2] 1.011 -0.918
 $ var.pred    : num 0.0654
 $ x.mean      : num 0.00934
 $ aic         : Named num [1:15] 61.215 53.442 0 0.985 2.917 ...
  ..- attr(*, "names")= chr [1:15] "0" "1" "2" "3" ...
 $ n.used      : int 30
 $ order.max   : num 14
 $ partialacf  : num [1:14, 1, 1] 0.5273 -0.9179 -0.1824 -0.0477 -0.0393 ...
 $ resid       : num [1:30] NA NA -0.0145 -0.0734 -0.0725 ...
 $ method      : chr "Yule-Walker"
 $ series      : chr "sin(1:30)"
 $ frequency   : num 1
 $ call        : language ar(x = sin(1:30), aic = TRUE)
 $ asy.var.coef: num [1:2, 1:2] 0.00583 -0.00308 -0.00308 0.00583
 - attr(*, "class")= chr "ar"
[1]  1.0112512 -0.9178554




Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Jun 16, 2016 at 4:34 AM, T.Riedle <tr206 at kent.ac.uk> wrote: