Here is a simple script to estimate Harvey's multiplicative het model from Greene
open "@gretldir\data\greene\greene14_1.gdt"
logs C Q PF
series l_Q_sq = l_Q^2
list z = const LF
list x = const l_Q l_Q_sq l_PF
list y = l_C # or series y = l_C
# start values
ols y x --robust
series lehat=ln($uhat^2)
matrix beta = $coeff
scalar n = $nobs
ols lehat z
matrix gam = $coeff
# MLE
mle loglik = -n/2 * ln(pi) - (.5)*zg - (.5)*(e^2/exp(zg))
series zg = lincomb(z, gam)
series e = y - lincomb(x, beta)
params beta gam
end mle
This routine works, but only if y is defined as a series and not a list (line 6). Why?
I'm using gretl 1.9.7 on Windows, btw.
--
Lee Adkins
Professor of Economics
lee.adkins@okstate.edulearneconometrics.com