Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the arima function in R, what does order(1, 0, 12) mean? What are the values that can be assigned to p, d, q, and what is the process to find those values?

share|improve this question
If you type ?arima into the console, you get the help page of the function. Wrt to the option order, it says: "A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order." Also, check out the examples and you can always play around yourself. There are also good books that give an introduction to time series analysis in R. Shumway/Stoffer is just one. – Christoph_J Dec 3 '12 at 14:37
3 that gives a very good description on the p,d,q and how to figure out values for each. Hyndman who was one of the people who made the Forecast package for R also has a free book that covers the topic – DanTheMan Dec 3 '12 at 15:54
  1. What does ARIMA(1, 0, 12) mean?

    Specifically for your model, ARIMA(1, 0, 12) means that it you are describing some response variable (Y) by combining a 1st order Auto-Regressive model and a 12th order Moving Average model. A good way to think about it is (AR, I, MA). This makes your model look the following, in simple terms:

    Y = (Auto-Regressive Parameters) + (Moving Average Parameters)

    The 0 in the between the 1 and the 12 represents the 'I' part of the model (the Integrative part) and it signifies a model where you're taking the difference between response variable data - this can be done with non-stationary data and it doesn't seem like you're dealing with that, so you can just ignore it.

    The link that DanTheMan posted shows a nice mix of models that could help you understand yours by comparing it to those.

  2. What values can be assigned to p, d, q?

    Lots of different whole numbers. There are diagnostic tests you can do to try to find the best values of p,d,q (see part 3).

  3. What is the process to find the values of p, d, q?

    There are a number of ways, and I don't intend this to be exhaustive:

    • look at an autocorrelation graph of the data (will help if Moving Average (MA) model is appropriate)
    • look at a partial autocorrelation graph of the data (will help if AutoRegressive (AR) model is appropriate)
    • look at extended autocorrelation chart of the data (will help if a combination of AR and MA are needed)
    • try Akaike's Information Criterion (AIC) on a set of models and investigate the models with the lowest AIC values
    • try the Schwartz Bayesian Information Criterion (BIC) and investigate the models with the lowest BIC values

    Without knowing how much more you need to know, I can't go too much farther, but if you have more questions, feel free to ask and maybe I, or someone else, can help.

* Edit: All of the ways to find p, d, q that I listed here can be found in the R package TSA if you are familiar with R.

share|improve this answer

order(p,d,q) means, that you have an ARIMA(p, d, q) model: $\phi(B)(1-B)^d X_t=\theta(B)Z_t$, where $B$ is a lag operator and $\phi(B)=1-\phi_1B-\dots-\phi_pB^p$ also $\theta(B)=1+\theta_1B+\dots+\theta_qB^q$.

The best way to find p, d, q values in R is to use auto.arima function from library(forecast). For example, auto.arima(x, ic = "aic"). For more information look up ?auto.arima.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.