On Fri, 2 Mar 2018, Marvin Berndt wrote:
What is the function of the AIC that Gretl uses in its VAR lag
selection? And how does Gretl compute the determinant of the
variance-covariance matrix?
This should illustrate what gretl does:
<hansl>
open data9-7
list Y = INCOME UNEMP PRIME
var 3 Y
matrix U = $uhat
# note: no df adjustment below
V = U'U ./ $T
eval det(V)
logdet = log(det(V))
# number of equations
g = nelem(Y)
# coefficients per equation
p = $ncoeff
LN2PI = log(2*$pi)
loglik = -(g * $T/2) * (LN2PI + 1) - ($T/2) * logdet
# AIC calculated on per-observation basis
AIC = (-2 * loglik + 2 * g * p) / $T
</hansl>
The manually calculated values agree with those printed by gretl.
Allin Cottrell