Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I know that this is probably a question that's been asked plenty of times, but i haven't seen an answer that's both accurate and simple. How do you estimate the appropriate forecast model for a time series by visual inspection of the ACF and PACF plots? Which one, ACF or PACF, tells the AR or the MA (or do they both?) Which part of the graphs tell you the seasonal and non seasonal part for a seasonal ARIMA?

Take for instance these functions:

enter image description here

They show the ACF and PCF of a log transformed series that's been differenced twice, one simple difference and one seasonal.

How would you caracterize it? What model best fits it?

Thanks in advance!

EDIT: Added raw data

Original data: here

Log transformed data: here

EDIT: Corrected ACF and PACF functions (previous ones were overdifferentiated)

share|improve this question

2 Answers 2

up vote 4 down vote accepted

My answer is really an abridgement of javlacelle's but is is too long for a simple comment but not too short to be useless.

While jvlacelle's response is technically correct at one level it "overly simplifies" as it premises certain "things" which are normally never true . It assumes that there is no deterministic structure required such as one or more time trends OR one or more level shifts or one or more seasonal pulses or one or more one-time pulses. Furthermore it assumes that the parameters of the identified model are invariant over time and the error process underlying the tentatively identified model is also invariant over time. Ignoring any of the above is often (always in my opinion !) a recipe for disaster or more precisely a "poorly identified model". A classic case of this is the unnecessary logarithmic transformation proposed for the airline series and for the series that the OP presents in his revised question. There is no need for any logarithmic transformation for his data as there are just a few "unusual" values at periods 198,207,218,219 and 256 which left untreated create the false impression that there is higher error variance with higher levels. Note that "unusual values" are identified taking into account any needed ARIMA structure which often escapes the human eye.Transformations are needed when the error variance is non-constant over time NOT when the variance of the the observed Y is non-constant over time. Primitive procedures still make the tactical error of selecting a transformation prematurely prior to any of the aforementioned remedies. One has to remember that the simple-minded ARIMA model identification strategy was developed in the early 60's BUT a lot of development/improvements have gone on since then.

Edited after data was posted :

A reasonable model was identified using http://www.autobox.com/cms/ which is a piece of software that incorporates some of my aforementioned ideas as I helped develop it. enter image description here The Chow Test for parameter constancy suggested that the data be segmented and that the last 94 observations be used as model parameters had changed over time.enter image description here .These last 94 values yielded an equationenter image description here with all coefficients being significant.enter image description here . The plot of the residuals suggests a reasonable scatter enter image description here with the following ACF suggesting randomness enter image description here . THe Actual and Cleansed graph is illuminating as it shows the subtle BUT significant outliers.enter image description here . Finally a plot of actual,fit and forecast summarizes our work ALL WITHOUT TAKING LOGARITHMS enter image description here. It is well known but often forgotten that power transforms are like drugs .... unwarranted usage can harm you. Finally notice that the model has an AR(2) BUT not an AR(1) structure.

share|improve this answer
    
Very nice analysis, thanks. –  javlacalle Jul 8 at 0:28
    
+1 excellent as always –  forecaster Jul 8 at 3:35

Just to clear up concepts, by visual inspection of the ACF or PACF you can choose (not estimate) a tentative ARMA model. Once a model is selected you can estimate the model by maximizing the likelihood function, minimizing the sum of squares or, in the case of the AR model, by means of the method of moments.

An ARMA model can be chosen upon inspection of the ACF and PACF. This approach relies on the following facts: 1) the ACF of a stationary AR process of order p goes to zero at an exponential rate, while the PACF becomes zero after lag p. 2) For an MA process of order q the theoretical ACF and PACF exhibit the reverse behaviour (the ACF truncates after lag q and the PACF goes to zero relatively quickly).

It is usually clear to detect the order of an AR or MA model. However, with processes that include both an AR and MA part the lag at which they are truncated may be blurred because both the ACF and PACF will decay to zero.

One way to proceed is to fit first an AR or MA model (the one that seems more clear in the ACF and PACF) of low order. Then, if there is some further structure it will show up in the residuals, so the ACF and PACF of the residuals is checked to determine if additional AR or MA terms are necessary.

Usually you will have to try and diagnose more than one model. You can also compare them by looking at the AIC.

The ACF and PACF that you posted first suggested an ARMA(2,0,0)(0,0,1), that is, a regular AR(2) and a seasonal MA(1). The seasonal part of the model is determined similarly as the regular part but looking at the lags of seasonal order (e.g. 12, 24, 36,... in monthly data). If you are using R it is recommended to increase the default number of lags that are displayed, acf(x, lag.max = 60).

The plot that you show now reveals suspicious negative correlation. If this plot is based on the same that as the previous plot you may have taken too many differences. See also this post.

You can get further details, among other sources, here: Chapter 3 in Time Series: Theory and Methods by Peter J. Brockwell and Richard A. Davis and here.

share|improve this answer
1  
Thank you very much. I added the data to the question. –  4everlearning Jul 7 at 10:56
    
You're right. I may have taken one difference too many. I have one doubt though. I did a simple difference (i.imgur.com/1MjLzlX.png) and a seasonal (12) one (i.imgur.com/E64Sd7p.png) both on the log data. Which one do should i look at, the seasonal one right? –  4everlearning Jul 7 at 11:45
1  
@4everlearning Right, after taking seasonal differences the ACF and PACF looks closer to what we could expect for a stationary process. You can start by fitting an ARIMA(2,0,0)(0,1,1), in R arima(x, order = c(2,0,0), seasonal = list(order = c(0,1,1))), and displaying the ACF and PACF of the residuals. Be also aware of further issues raised by IrishStat that you should be concerned with in the analysis. –  javlacalle Jul 7 at 11:59
    
Thanks. How would i go about finding those AR and MA orders? Plus, the Akaike Information Criterion yields a negative value for my model. I understand that this is not important although i'm not really sure how to compare it to other models, say AIC=-797.74 and AIC=-800.00. Which is preferable? –  4everlearning Jul 7 at 12:49
    
You can determine the orders following the idea given in the answer above. If you see that the ACF goes to zero relatively quickly and the PACF truncates after lag 2 then it is probably that an AR(2) structure is present in the data. The reverse idea applies to detect an MA. As a general recommendation, start with a model of low order and inspect the residuals looking for AR or MA structures to be added to the initial model. –  javlacalle Jul 7 at 13:02

Your Answer

 
discard

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.