[R] auto.arima help

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Sep 26 12:56:36 CEST 2008


On Thu, 25 Sep 2008, rkevinburton at charter.net wrote:

> I am calling auto.arima with a time series that is about 186 
> observations long with a frequency of 52. With some time series I get:
>
> 1:last.nonzero: result would be too long a vector
>
> Is there something that I can do to the data to avoid this error?

Reformulate what you are doing: the error presumably relates to the model 
fitting, not the data per se.

You have not even told us what package auto.arima() is in, let alone given 
us a reproducible example and the result of traceback().  But presumably 
it is from 'forecast' in the 'forecasting' bundle, and this looks like an 
infelicity in the package, so please send a reproducible example to the 
maintainer.

(BTW to Rob, max((1:length(testvec))[abs(testvec)>1e-8]) is bad coding 
practice: max(which(abs(testvec)>1e-8)) is clearer and safer, but even 
then is not going to cope with an empty set, and I suspect max() returning 
-Inf is the problem here.)

> Thank you.
>
> Kevin
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.

PLEASE do.


-- 
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