On Wed, 5 Oct 2011, Simon Ouellette wrote:
I was just wondering what estimation method is used exactly in the
Johansen_stage_1 function (the first step, VAR estimation, of the
Johansen test) of lib/var.c. From looking at the code, it seems like
it might be the 2-step Least Squares method -- but I'm not clear on
where in the code the fitted values are plugged in, it's almost as if
X is never changed between the first and second OLS. Also the comment
refers to log-likelihood.
It's two applications of OLS (not two-stage least squares), as
described in Hamilton's "Time Series Analysis", section 20.2.
The first set of equations is a VAR in first differences; the
second set has the same regressors as the first, but the
dependent variable in each equation is a first lag in place of
a first difference. There's no use of fitted values; all we
need from these regressions are the residuals, so we can
compute the variance matrices that form the input to the
eigen-analysis.
OLS is MLE for a VAR.
Allin Cottrell