user236215
user236215

Reputation: 7546

difference between auto.arima and ar for AR model selection in R

I get very different results when trying to find the best AR(p) model using these methods.

ar {stats}: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/ar.html

auto.arima {forecast}: http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=forecast:auto.arima

# x is some time series
ar(x)
auto.arima(x, d=0, max.q=0)

I cannot put data set here as it is very large but for the same data set, ar gives 44 whereas auto.arima gives 5. They both use AIC minimization. Does someone know why they yield so different results and which one is better?

Upvotes: 3

Views: 2071

Answers (1)

Rob Hyndman
Rob Hyndman

Reputation: 31810

By default, ar() uses Yule-Walker estimation, not MLE.

By default, auto.arima() limits the model size to five parameters.

There are other differences, but those two alone will explain most of the differences between the fitted models.

As to which is better, that's for you to decide. It depends on the application and purpose of the model.

Upvotes: 4

Related Questions