# What are the values p, d, q, in ARIMA?

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?

• 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. Dec 3 '12 at 14:37
• people.duke.edu/~rnau/411arim.htm 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 otexts.com/fpp/8 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.

• for python, can you suggest how to find correct p, d, q value Dec 7 '18 at 21:35

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.

Simply put the Autoregressive Integrated Moving Average (ARIMA) tries to model a time series where your time series in question, y, can be explained by its own lagged values (Autoregressive part) and error terms (Moving Average part). The "Integrated" part of the model (the "I" in "ARIMA") refers to how many times the series has been differenced to achieve stationarity.

Stationarity is a must before you can model your data: what stationarity refers to is constant mean and variance. Think of these two moments as not being time dependent. The reason for this is quite simple, it's difficult to model something which changes over time.

So your ARMA model or order (1,12) is an AR(1)+MA(12) model: it is modelled by 1 lagged value and 12 error terms. I can't speak about your data but I think it sounds like a lot of parameters (possibly overfitted).

Hope this helps.