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.

  1. plm 📦 github repo: https://github.com/ycroissant/plm?tab=readme-ov-file
  2. plm 📦 cran: https://cran.r-project.org/web/packages/plm/index.html

Additional Resources for Panel Data Analysis

  1. 计量经济学笔记(三):面板数据分析
Chen Xing
Chen Xing
Founder & Data Scientist

Enjoy Life & Enjoy Work!

Related