[R] Choosing the optimum lag order of ARIMA model
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Sep 5 13:34:11 CEST 2007
On Wed, 5 Sep 2007, Megh Dal wrote:
> Hi Leeds, Thanx for this reply. Actually I did not want to know whether
> any differentiation is needed or not. My question was that : what is the
> difference between two models :
>
> arima(data, c(2,1,2))
>
> and
>
> arima(diff(data), c(2,0,2))
>
> If I am correct then those two models are same. Therefore I should get
> same results for both of the cases. Am I doing something wrong?
They are not the same. Please do study the help page, and in particular
the 'include.mean' argument. One is a model for n observations and
the other for n-1 observations, and how that affects the issue is
discussed on the help page. With the right options you will get similar
but not identical results.
> arima(x, c(2,1,2), method="ML")
Coefficients:
ar1 ar2 ma1 ma2
0.0786 -0.3561 -0.0869 0.1272
s.e. 0.6135 0.4296 0.6564 0.4549
sigma^2 estimated as 0.01368: log likelihood = 46.46, aic = -82.92
> arima(diff(x), c(2,0,2), method="ML", include.mean=FALSE)
Coefficients:
ar1 ar2 ma1 ma2
0.0786 -0.3561 -0.0869 0.1272
s.e. 0.6135 0.4296 0.6564 0.4549
sigma^2 estimated as 0.01329: log likelihood = 47.38, aic = -82.76
And did you have permission to copy private (and impolite) messages from
Mr Leeds to this list? If you did, please say so in your own posting for
the record. Since I don't have such permission I have deleted them from
this reply.
Professor Ripley
--
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