Hi everyone
The Hausman-Taylor estimator -xthtaylor- has been discussed in a number of posts over the years. In post#2 in https://www.statalist.org/forums/for...lain-estimator from 2015, Daniel mentioned that -xthtaylor- does not allow for factor notation.
It would appear that the use of factor notation is still not allowed in -xthtaylor- in Stata 16.
My question is: is the inability of -xthtaylor- to incorporate factor notation something inherent in the theoretical foundation of the estimator (the original paper is rather beyond my skill levels at the moment, I'm afraid)? Or is this due to some technical/computational issue such that Stata can only allow continuous variables in the Hausman-Taylor estimator?
Furthermore, whilst it does not make too much of a difference in the above example because those are binary variables, what if I were to run a variable such as 'mode of transportation' (with values of bus, car or train)? Should I create individual binary variable for 'bus', 'car' and 'train' (but leave one out in the regression to avoid dummy variable trap)?
Thank you.
The Hausman-Taylor estimator -xthtaylor- has been discussed in a number of posts over the years. In post#2 in https://www.statalist.org/forums/for...lain-estimator from 2015, Daniel mentioned that -xthtaylor- does not allow for factor notation.
It would appear that the use of factor notation is still not allowed in -xthtaylor- in Stata 16.
Code:
. use https://www.stata-press.com/data/r16/psidextract . xthtaylor lwage occ south smsa ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms union ed) ** works fine ** but if we were to use factor notations for the variables which are, in fact, categorical . xthtaylor lwage i.occ i.south smsa i.ind exp exp2 wks ms union fem blk ed, endog(exp exp2 wks ms i.union ed) factor-variable operators not allowed r(101);
Furthermore, whilst it does not make too much of a difference in the above example because those are binary variables, what if I were to run a variable such as 'mode of transportation' (with values of bus, car or train)? Should I create individual binary variable for 'bus', 'car' and 'train' (but leave one out in the regression to avoid dummy variable trap)?
Thank you.
Comment