# When to choose which model for time series?

What are the applications of AR and MA model? To put my question exactly, when to use AR model and when to use MA model(for example, like when it is seasonal or when there is a trend, etc). In other words, which model to chose if it is seasonal, if it has trend, if both seasonal and trend, and if no trend and not seasonal? It will be good if someone explains that with an example.

auto.arima() can be used to find the parameters of AR and MA easily in R. But I happen to find lower AIC values when using different parameters other than parameters found by auto.arima(). Which parameters is better to use? If parameters with lower AIC value is only better, then how to find those parameters without trying manually all possible parameters?

• Note the danger of over-fitting. If you try out quite many different AR and MA orders (there are $2^{p+q}$ possible combinations in an ARMA($p,q$) model), your results may be largely due to chance. – Richard Hardy May 28 '15 at 6:19
• So, what will be the good way of estimating the order of the model(instead of trying all possibilities) ? – Kavipriya May 28 '15 at 7:54
• I believe auto.arima should be fine. It has been refined through time and there are some small details that make it robust against different pitfalls. It is also quite fast. See the original article by Hyndman and Khandakar (2008) regarding the original version and then Hyndsight blog and the GitHub page for notes on various improvements. – Richard Hardy May 28 '15 at 8:05
• Some examples and guidance to choose the order of ARMA models are given, for example, in this post and this post. If you are asking something not addressed in these posts, please give more details. – javlacalle May 28 '15 at 8:40