[R] ar(1)

Achim Zeileis zeileis at ci.tuwien.ac.at
Sun Jan 14 21:09:36 CET 2001


Meriema Belaidouni wrote:
> 
> hello,
> can some body help me to get
> the residuals and the variance of coefficient after an autoregressive
> fit.
> These values are present in the  ar function of the package ts.
> But I don't know how to makes it work.

Just have a look at the help pages
> help(ar)

If you fit the model by
> ar.fit <- ar(x)

you can have a look at
> ar.fit$resid # the residuals
> ar.fit$ar # the coefficients
> ar.fit$asy.var.coef # the asymptotic-theory variance matrix of
                        the coefficient estimates.
or the other elements of the returned list.

Achim


---------------------------
Achim Zeileis
Institut für Statistik
Technische Universität Wien


> thank you.
> meriema
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list