Hi all, I am trying to replicate Baltagi's example of the HT-IV. I wrote the following small function, but do not obtain exactly his results (see txt-file attached). Actually, I am not so sure whether I've used the correct (transformed) instruments. Maybe somebody of you has already dealt with this, and may help me out.
<hansl>
open Baltagi_schooling_wage.gdt --quiet
series EXP2 = EXP_^2
# List definition
list X1 = OCC_ SOUTH_ SMSA_ IND_ #TV exogeneous
list Z1 = FEM_ BLK_ #Time-invariant exogeneous
list X2 = EXP_ EXP2 WKS_ MS_ UNION_ #TV endogenoeus
list Z2 = ED_ #TIV endogenoeus
function void xthtaylor (series Y "dependent",
list X1 "TV exog.",
list Z1 "TIV exog.",
list X2 "TV endog.",
list Z2 "TIV endog.")
# X2(i,t) are instrumented by their deviation from individual means
xbar2(i)
list X2inst = null
loop foreach i X2 -q
series dev_$i =X2.$i - pmean(X2.$i)
X2inst += dev_$i
endloop
# Z2(i) are instrumented by the individual avg of X1(i,t)
list Z2inst = null
loop foreach i X1 -q
series m_$i = pmean(X1.$i)
Z2inst += m_$i
endloop
#TSLS - Hausman-Taylor (HT)
tsls Y const X1 X2 Z1 Z2 ; const X1 X2inst Z1 Z2inst --no-tests
end function
xthtaylor(LWAGE,X1,Z1,X2,Z2)
<\hansl>
Baltagi_schooling_wage.gdt
Description: application/gretl.data
Hausman-Taylor Estimation Result dependent variable: LWAGE variable coeff. std. err. z --------------------------------------------------------------- OCC_ -0.0207 0.0138 -1.5025 SOUTH_ 0.0075 0.0320 0.2348 SMSA_ -0.0416 0.0193 -2.1572 IND_ 0.0137 0.0152 0.8960 EXP_ 0.1131 0.0025 45.7884 EXP2 -0.0004 0.0001 -7.6721 WKS_ 0.0008 0.0006 1.3967 MS_ -0.0299 0.0190 -1.5735 UNION_ 0.0328 0.0149 2.1986 const 2.9202 0.3137 9.3084 FEM_ -0.1297 0.1288 -1.0068 BLK_ -0.2858 0.1560 -1.8318 ED_ 0.1372 0.0246 5.5721 ---------------------------------------------------------------
