- Econometrics Toolbox: by James P. LeSage (free): function ar
- MFE_Toolbox (free): function armaxfilter
Autoregressive models
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michael
am 31 Jul. 2011
Kommentiert: Luis Hernandez
am 16 Aug. 2017
Hi, I'm trying to create an auto regressive model, and I want to use AIC to identify the optimal number of lags to include in it. Does anyone know of any code that I can use to do this? I think this requires the econometrics toolbox which I do have. Thanks
0 Kommentare
Akzeptierte Antwort
Oleg Komarov
am 31 Jul. 2011
Example: AR(1)
% Generate series
Series = rand(100,1);
% Set the AR(1) - note the constant variance
Spec = garchset('R',1,'VarianceModel','Constant');
% Estimate
[Coeff,Errors,LLF] = garchfit(Spec,Series);
% Display
garchdisp(Coeff,Errors)
aicbic(LLF,garchcount(Coeff))
Alternatively:
4 Kommentare
Luis Hernandez
am 16 Aug. 2017
Hi Oleg!! Thank so much for the script!! I've fit an AR(1) model with that script. But, i want to know the meaning of 'K' parameter in coeff set. Is it the value of white noise variance? According to the documentation of garchset the 'K' parameter is just for GARCH models or conditional variance models, why that parameter appears in AR(1) model? Im working with several ARMAX models and need to know the value of that variance. How could find this value? Thanks in advance!!!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Conditional Mean Models finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!