No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • XTIVDFREG: new Stata command for instrumental variable estimation of large panel data models with common factors

    Together with Vasilis Sarafidis, I have released a new Stata package called xtivdfreg. The command implements a general instrumental variables approach for estimating large panel data models (large N and large T) with unobserved common factors or interactive effects, as developed by Norkute et al. (2020). The underlying idea of this approach is to project out the common factors from exogenous covariates using principal components analysis, and run IV regression using defactored covariates as instruments. The resulting "IVDF" method is valid for models with homogeneous or heterogeneous slope coefficients, and has several advantages relative to existing popular approaches (e.g. common correlated effects estimation). The algorithm accommodates unbalanced panel data and permits highly flexible instrumentation strategies.

    You can install the command from my personal website:
    net install xtivdfreg, from(
    The syntax and options are explained in the Stata help file:
    help xtivdfreg
    The help file also contains a few examples.

    For full details, see our accompanying article: Further reference:

  • #2
    Due to an issue with the way how Stata deals with interaction terms since Stata 15 (see, using interaction terms with xtivdfreg could result in unexpected error messages.

    A workaround is now implemented in the latest version 1.0.1.
    adoupdate xtivdfreg, update


    • #3
      With thanks to Kit Baum, the latest version 1.0.3 of the xtivdfreg command is now also available on SSC (in addition to my personal website):
      ssc install xtivdfreg
      Compared to earlier versions, this version has the new suboption fvar() for option iv(), which allows to extract factors from only a subset of the specified instrumental variables. This could for instance be useful if variables x and x2 are used as regressors/instruments, but the squared term should not be used for the factor extraction. Please see the help file for details.

      Our accompanying article was accepted for publication in the Stata Journal: