Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"non-stationary seasonal AR part from CSS" error in R

Tags:

I am trying to fit ARIMA model of a seasonally decomposed series. But when I try to execure following:

fit = arima(diff(series), order=c(1,0,0),    seasonal = list(order = c(1, 0, 0), period = NA)) 

It gives me following error:

Error in arima(diff(series), order = c(1, 0, 0), seasonal = list(order = c(1, : non-stationary seasonal AR part from CSS

what is wrong and what does the error mean?

like image 978
mihsathe Avatar asked Aug 29 '11 17:08

mihsathe


1 Answers

When using CSS (conditional sum of squares), it is possible for the autoregressive coefficients to be non-stationary (i.e., they fall outside the region for stationary processes). In the case of the ARIMA(1,0,0)(1,0,0)s model that you are fitting, both coefficients should be between -1 and 1 for the process to be stationary.

You can force R to use MLE (maximum likelihood estimation) instead by using the argument method="ML". This is slower but gives better estimates and always returns a stationary model.

If you are differencing the series (as you are here), it is usually better to do this via the model rather than explicitly. So your model would be better estimated using

set.seed(1) series <- ts(rnorm(100),f=6) fit <- arima(series, order=c(1,1,0), seasonal=list(order=c(1,0,0),period=NA),           method="ML") 
like image 73
Rob Hyndman Avatar answered Sep 19 '22 19:09

Rob Hyndman