On Mon, 19 May 2003, Wouter van Rijsinge wrote:
> R 1.7.0 on Windows 2000
So this is not the appropriate list: R-help@r-project.org is.
> I try to estimate the 'best' ARIMA model for a time series (TS). The only
> way I know to solve this problem is by brute force.
There is a large literature on `model identification' in time series.
> Within 6 nested for
> loops I try to get the best model based upon the Aikake Information
> Criterion(aic).
>
> A summary of the code:
> best.model <- arima(TS, order = c(1, 0, 0), seasonal = list(order = c(0, 0,
> 0), period = frequency(TS)) )
> #And by brute force
> p, q, r, s are nested from 0 to 3 and i and j are nested from 0 to 2. p and
> q are not both allowed to be 0.
> # determine the best series
> tmp <- arima(TS, order = c(p, i, q), seasonal = list(order = c(r,
> j, s), period = frequency(TS)) )
> if(best.model$aic > tmp$aic)
> {
> best.model <- temp
> }
>
> Result:
> For a time series of 200 values it takes about 75 minutes to come up with
> an answer and 50 warnings of the types:
> - NaNs produced in: log(x)
> - possible convergence problem: optim gave code= 1 in: arima(series, order
> = c(p, i, q), seasonal = list(order = c(r, ...
>
> Questions
> 1. Is there a way to speed up the process (beside using a faster computer)?
No. You are fitting some seriously large seasonal arima models, many
times.
> 2. How can I prevent the warnings from occurring occurring?
Be more careful to fit appropriate models (and to ask the appropriate
list).
--
Brian D. Ripley, ripley@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
|