11.12 Packages & Functions: wfe & PanelMatch

  • Ideally, now use wfe package and the wfe() function (K. Imai and Kim 2019b) or the PanelMatch package and the corresponding function PanelMatch()
  • wfe(): Fitting the Weighted Fixed Effects Model for Causal Inference
    • unit.index = and time.index =: Specify the index variables (unit’s id and time)
    • method =: unit for unit, time for time fixed effects
    • qoi =: Quantity of interest45
    • estimator =: Default NULL (should be fe); One of fd, did, or Mdid
    • For the rest see ?wfe
  • The just published PanelMatch package looks extremely promising and will likely replace earlier packages such as plm or wfe (see announcement)
    • Currently, the lab sessions are a mixture of these packages

References

Imai, Kosuke, and In Song Kim. 2019b. “When Should We Use Unit Fixed Effects Regression Models for Causal Inference with Longitudinal Data?” Am. J. Pol. Sci. 63 (2): 467–90.


  1. One of ate or att. The default is ate. If set to att in implementing fd and did estimators, the comparison of the treated observation is restricted to the control observation from the previous time period but not with the control observation from the next time period.