11.13 Packages & Functions: PanelMatch

  • The recently published PanelMatch package looks extremely promising (see announcement)
  • Various functionalities are outlined in the vignette
  • DisplayTreatment(): Visualize treatment distribution across units, across time
    • See ?DisplayTreatment for arguments
    • dense.plot = TRUE/FALSE: Allows you to remove lines between tiles in case the number of units and/or time periods is very high (make it more redable)
    • Can also be used to visualize the matched sets for particular units
  • PanelMatch(): Create refined/weighted sets of treated and control units using different matching/weighting strategies
    • See ?PanelMatch for arguments
    • lag =: Choose how many treatment history periods you want to match on
    • refinement.method =: Specifying the matching or weighting method to be used for refining the matched sets, i.e., in addition to matching on the treatment history you may want to match on the history of other variables (covariates and outcome)
    • exact.match.variables =: Specify variables for exact matching
    • covs.formula =: Provide formula object indicating which variables should be used for matching and refinement
    • lead =: Specify the lead window, i.e., for how long “after” treatment you would like to estimate effects; 0 (default) corresponds to contemporaneous treatment effect
  • get_covariate_balance(): Calculate covariate balance for user specified covariates across matched sets (see also balance_scatter())
  • PanelEstimate(): Estimate causal quantity of interest based on the matched sets (summarize results with summary() and plot())