Skip to content

auto.arima help

3 messages · Brian Ripley, rkevinburton at charter.net

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

Thank you.

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

            
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.)
PLEASE do.
#
Yes, sorry it auto.arima is in the 'forecast' package. The following produces the problem:

auto.arima(ts(c(rep(0,104), rep(143, 52), rep(260,33)), frequency=52))

Kevin
---- Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote: