stata - include panel-specific trends in a first-difference regression -
i wondering if there's way include panel-specific or varying trends in first-difference regression when clustering on panel id , time variable.
here's example of stata:
. webuse nlswork (national longitudinal survey. young women 14-26 years of age in 1968) . ivreg2 s1.(ln_wage tenure) , cluster(idcode year) ols estimation -------------- estimates efficient homoskedasticity statistics robust heteroskedasticity , clustering on idcode , year number of clusters (idcode) = 3660 number of obs = 10528 number of clusters (year) = 8 f( 1, 7) = 2.81 prob > f = 0.1378 total (centered) ss = 1004.098948 centered r2 = 0.0007 total (uncentered) ss = 1035.845686 uncentered r2 = 0.0314 residual ss = 1003.36326 root mse = .3087 ------------------------------------------------------------------------------ | robust s.ln_wage | coef. std. err. z p>|z| [95% conf. interval] -------------+---------------------------------------------------------------- tenure | s1. | .0076418 .0042666 1.79 0.073 -.0007206 .0160043 | _cons | .0501738 .0070986 7.07 0.000 .0362608 .0640868 ------------------------------------------------------------------------------ included instruments: s.tenure ------------------------------------------------------------------------------ . ivreg2 s1.(ln_wage tenure i.c_city), cluster(idcode year) factor variables not allowed r(101);
in specification above, constant corresponds common time trend. putting factor variable outside seasonal difference operator errors well.
i understand differencing operator not play factor variables or interactions, feel there must hack around that.
the ivreg2
bit of red herring. not doing iv estimation, want use two-way clustering.
you same solution @metrics if xi: ivreg2 s1.(ln_wage tenure) i.ind_code , cluster(idcode year)
Comments
Post a Comment