Interpretation of autocorrelation function to determine number of lags in AR model?
10 views (last 30 days)
Show older comments
Hey everyone!
I am pretty new to AR and ARMA models...or well I never understood them in class either... but I am supposed to develop an AR model for the prediction of the generated solar energy by a photovoltaic plant.
Now I understand that I have to look at the autocorrelation function and partial autocorrelation function to determine the number of lags of my AR model. I created it with matlab:
I have researched the internet quiet a bit on how to interpret these results but overall I am totally and utterly lost. Looking at the created partial autocorrelation function I would assume that maybe I need an AR(6) model because the first 6 lags are out of the blue lines... or maybe only AR(1) or AR(2) because the partial autocorrelations at these lags are extremly significant?? But my brain tells me that i should also include lag 24. Which of the two graphics is supposed to tell me that?? And how can the autocorrelation function (not partial!) help me in any way?
I know that this is now a primary matlab question and I apologize for it, but this is the only place I could think of where there might be anyone able to help me...
Thank you sooo much!!
0 Comments
Accepted Answer
Roger Wohlwend
on 3 Nov 2014
Edited: Roger Wohlwend
on 3 Nov 2014
The autocorrelation function is a bit odd because the autocorrelations do not subside as they should do. That suggests that there is no adequate AR model. The partial autocorrelation function is more helpful. The highest peaks seem to be a lags 2 and 3. So I would start with those lags. Or you could do something else.
Determining the model order from the autocorrelation and partial autocorrelation is a bit of an art. I believe that it is not necessary to do that these days. Computers are so fast that it is no problem to estimate severals models and pick the best one. In my opinion that is the way how to determine the model order these days. Using the autocorrealation and partial autocorrrelation functions seems to be the correct method of the old days when estimating a model was a lot of work.
So, estimate several models using a loop and calculate the Akaike information criterion for each model. Then pick the model with the lowest AIC. The process is also described in this Matlab example. Don't forget to check the residuals. They must be free of autocorrelation.
4 Comments
Roger Wohlwend
on 4 Nov 2014
A coefficient of 1 for an MA or SMA term is allowed, as far as I know. The important thing is that the MA part is invertible.
More Answers (0)
See Also
Categories
Find more on Correlation Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!