* Hausman and Taylor Method clear set memory 40m set more off log using xthtaylor.log, replace webuse xthtaylor1.dta,clear save xthtaylor1.dta, replace * use http://www.stata-press.com/data/r8/xthtaylor1, clear use xthtaylor1.dta, clear ** Hausman-taylor estimator with only endogenous variables correlate ui z1 z2 x1a x1b x2 eit xthtaylor yit x1a x1b x2 z1 z2, endog(x2 z2) i(id) xthtaylor yit x1a x1b x2 z1 z2, endog(x2 z2) i(id) t(t) amacurdy xthtaylor yit x1a x1b x2 z1 z2, endog(x2 z2) i(id) t(t) small xthtaylor yit x1a x1b x2 z1 z2, endog(x2 z2) i(id) t(t) amacurdy small ** Hausman-taylor estimator with constant variables xthtaylor yit x1a x1b x2 z1 z2 ui, endog(x2 z2) constant(z1 z2 ui) i(id) xthtaylor yit x1a x1b x2 z1 z2 ui, endog(x2 z2) constant(z1 z2 ui) i(id) t(t) amacurdy xthtaylor yit x1a x1b x2 z1 z2 ui, endog(x2 z2) constant(z1 z2 ui) i(id) t(t) small ** Hausman-taylor estimator with varying variables xthtaylor yit x1a x1b x2 z1 z2 ui, endog(x2 z2) varying(x2 x1a x1b) i(id) xthtaylor yit x1a x1b x2 z1 z2 ui, endog(x2 z2) varying(x2 x1a x1b) i(id) t(t) amacurdy xthtaylor yit x1a x1b x2 z1 z2 ui, endog(x2 z2) varying(x2 x1a x1b) i(id) t(t) small clear set memory 40m set more off set matsize 300 webuse psidextract.dta,clear save psidextract.dta, replace * use http://www.stata-press.com/data/r8/psidextract, clear use psidextract.dta, clear iis id tis t xtsum exp exp2 wks ms union, i(id) ** Hausman-taylor estimator with only endogenous variables correlate fem blk occ south smsa ind ed xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) xthtaylor lwage occ south smsa ind exp* wks ms union fem blk ed, endog(exp exp2 wks ms union ed) amacurdy xthtaylor lwage occ south smsa ind exp* wks ms union fem blk ed, endog(exp exp2 wks ms union ed) small xthtaylor lwage occ south smsa ind exp* wks ms union fem blk ed, endog(exp exp2 wks ms union ed) amacurdy small ** Hausman-taylor estimator with constant variables xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) /* */ constant(fem blk ed) xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) /* */ constant(fem blk ed) amacurdy xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) /* */ constant(fem blk ed) small ** Hausman-taylor estimator with varying variables xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) /* */ varying(ms exp* occ south smsa ind wks union) xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) /* */ varying(ms exp* occ south smsa ind wks union) amacurdy xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) /* */ varying(ms exp* occ south smsa ind wks union) small ** Hausman-taylor estimator with constant variables xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) constant(fem blk ed) xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) constant(fem blk ed) amacurdy xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) constant(fem blk ed) small ** Hausman-taylor estimator with varying variables xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) varying(ms exp* occ south smsa ind wks union) xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) varying(ms exp* occ south smsa ind wks union) amacurdy xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) varying(ms exp* occ south smsa ind wks union) small