ARCHIVED: In Stata, how do I estimate the coefficients of time-invariant variables in the Panel FE model, using the xthtaylor command?
When a fixed effect (FE) model is assumed in panel data, the FE or FD (First Difference) methods provide consistent estimates only for time-varying regressors, not for time-invariant regressors.
Since Stata automatically deletes the time-invariant
regressors, they can't be estimated by ordinal methods like FE. In
that case, we can use the Hausman-Taylor estimator,
xthtaylor
, a transformed Random Effect (RE) model with
instrument variables (IV). This method should distinguish basically
between time-varying and time-invariant regressors as follows:
. webuse psidextract, clear . xthtaylor lwage wks south smsa ms exp exp2 occ ind union fem blk ed, /// endog(exp exp2 wks ms union ed) constant(fem blk ed)
The above example model expects log(wage) using several regressors,
where occ
, south
, smsa
, and
ind
are exogenous time-varying regressors;
exp
, exp2
, wks
,
ms
, and union
are endogenous time-varying
regressors; fem
and blk
are exogenous
time-invariant regressors; and ed
is an endogenous
time-invariant regressor.
Thus, the time-invariant variables such as female (fem
),
black (blk
), and education level (ed
) can
be consistently estimated in the xthtaylor
method, which
is otherwise impossible in the estimation. In particular, when
determining the impact of education (ed
) on log(wage)
(lwage
), the Hausman-Taylor method consistently estimates
the coefficient of ed
, the time-invariant endogenous
variable.
To use the drop-down menu, from the
menu, select , then , and then .Notes:
- This method needs a stronger assumption that a specified subset of the regressors (IVs) is uncorrelated with the fixed effect or individual effect terms (ai), in addition to all regressors uncorrelated with the idiosyncratic error terms (eit).
- The above stronger assumption can be tested by
xtoverid
post-estimation command. - In order to do
xtoverid
test, the statistic must haveranktest
andxtoverid
ado files installed.
For more, see Stata help on xtoverid
or
ranktest
.
If you have questions about using statistical and mathematical software at Indiana University, contact the UITS Research Applications and Deep Learning team.
This is document bcfo in the Knowledge Base.
Last modified on 2023-05-09 14:38:57.