[R] tsdiag for ar?

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Nov 24 17:05:03 CET 2004


On Wed, 24 Nov 2004, Dr Carbon wrote:

> Is there a way to have the ar function work with tsdiag for on-the-fly
> visualization of ar fits? I have to fit a great many models of varying
> order and would like to save the diagnostic graphs.

First you have to produce them, surely?

> For instance,
> tsdiag(ar(lh))

That gives an error. All you have to do is to write an "ar" method for 
tsdiag -- a good exercise in R programming for you.

> tsdiag(arima(lh, order = c(3,0,0)))


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list