auto.arima help
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:
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