How do I use AIC and BIC to choose the optimal lags from DFARTEST, DFARDTEST, and DFTSTEST in the GARCH Toolbox?

13 views (last 30 days)
I would like to choose the optimal lag from the Dickey-Fuller unit root tests using AICBIC. I know that they can generate the input to AICBIC using GARCHFIT and wanted to know if there is a way to get the LLF from the outputs of the unit root tests.
In other words, is it possible for MATLAB to output loglikehood for each of the Unit Root tests DFARTEST, DFARDTEST, and DFTSTEST, which I can then use in AICBIC?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
There is a trailing output data structure, that contains all of the regression statistics (e.g., coefficients, standard errors, residuals, residual variance, etc ...) that may be accessed. This is currently an undocumented feature, which means we cannot guarantee that this won't change without notice in future releases. However, although undocumented, this structure was designed to support just such an analysis.
To access these statistics, add an extra output argument when running your test. For example, you could use the following syntax:
[H,pValue,TestStat,CriticalValue,OLS] = dfARDTest(Y);
From this summary OLS data structure array (one structure per test performed), the LLF could be computed relatively easily for some assumed distribution (probably Gaussian) from the standard log-likelihood expression, or something like the following for a Gaussian distribution:
T = OLS.sampleSize;
e = OLS.residuals;
V = OLS.residualVariance;
LLF = -0.5 * ( T*log(2*pi*V) - (e' * e) )

More Answers (0)

Categories

Find more on Conditional Variance Models in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!