Hausman-Taylor estimator Notes
Hausman-Taylor in R
The following example is from here.
Example: The fixed effects model, however, does not allow time-invariant variables such as educ or black. Since the problem of the random effects model is endogeneity, one can use instrumental variables methods when time-invariant regressors must be in the model. The Hausman-Taylor estimator uses instrumental variables in a random effects model; it assumes four categories of regressors: time-varying exogenous, time-varying endogenous, time-invariant exogenous, and time-invariant endogenous. The number of time-varying variables must be at least equal to the number of time-invariant ones. In our wage model, suppose exper, tenure and union are time-varying exogenous, south is time-varying endogenous, black is time-invariant exogenous, and educ is time-invariant endogenous. The same plm()
function allows carrying out Hausman-Taylor estimation by setting model=
“ht”.
wage.HT <- plm(lwage~educ+exper+I(exper^2)+
tenure+I(tenure^2)+black+south+union |
exper+I(exper^2)+tenure+I(tenure^2)+union+black,
data=nlspd, model="ht")
kable(tidy(wage.HT), digits=5, caption=
"Hausman-Taylor estimates for the wage equation")
Note that, the instruments are specified at the end of the formula after a |
sign (pipe). For more details, check
library(plm)
browseVignettes("plm")
Reference
check the plm
📦 in R.
plm
📦 github repo: https://github.com/ycroissant/plm?tab=readme-ov-fileplm
📦 cran: https://cran.r-project.org/web/packages/plm/index.html