PanelMatch2.2.0 package

Matching Methods for Causal Inference with Time-Series Cross-Sectional Data

enforce_lead_restrictions

enforce_lead_restrictions check treatment and control units for treatm...

equality_four

equality_four Small helper function implementing estimation function f...

equality_four_placebo

equality_four_placebo

expand_treated_ts

expand_treated_ts Builds a list that contains all times in a lag windo...

handle_conditional_se

handle_conditional_se Calculates conditional standard errors analytica...

handle_mahalanobis_calculations

handle_mahalanobis_calculations Returns a matched.set object with weig...

DisplayTreatment

DisplayTreatment

clean_leads

clean_leads Function to check the lead windows in treated and control ...

balance_scatter

balance_scatter

build_maha_mats

build_maha_mats Builds the matrices that we will then use to calculate...

build_ps_data

build_ps_data

calculate_estimates

calculate_estimates

calculate_placebo_estimates

calculate_placebo_estimates

calculate_point_estimates

calculate_point_estimates Helper function that calculates the point es...

check_time_data

check_time_data

extract_differences

extract_differences This function calculates the differences from t-1 ...

find_ps

find_ps

findBinaryTreated

findBinaryTreated

get.matchedsets

get.matchedsets

get_covariate_balance

Calculate covariate balance

get_set_treatment_effects

get_set_treatment_effects

getDits

getDits returns a vector of Dit values, as defined in the paper. They ...

getWits

getWits returns a vector of Wits, as defined in the paper (equation 25...

handle_bootstrap

handle_bootstrap

handle_bootstrap_parallel

handle_bootstrap_parallel

handle_bootstrap_placebo

handle_bootstrap_placebo

handle_bootstrap_placebo_parallel

handle_bootstrap_placebo_parallel

handle_missing_data

handle_missing_data

handle_moderating_variable

handle_moderating_variable handles moderating variable calculations: I...

handle_ps_match

handle_ps_match Returns a matched.set object with weights for control ...

handle_ps_weighted

handle_ps_weighted

handle_unconditional_se

handle_conditional_se Calculates conditional standard errors analytica...

identifyDirectionalChanges

identifyDirectionalChanges Identifies changes in treatment variable fo...

lwd_refinement

lwd_refinement master function that performs refinement with listwise ...

lwd_units

lwd_units helper function that actually subsets sets down to contain u...

matched_set

matched_set

merge_formula

merge_formula

PanelEstimate

PanelEstimate

PanelMatch-package

Matching Methods for Causal Inference with Time-Series Cross-Sectional...

PanelMatch

PanelMatch

parse_and_prep

parse_and_prep

pcs

Prepare Control Units pcs and pts create data frames with the time/id ...

perform_refinement

perform_refinement Performs refinement of matched sets, ultimately ret...

perunitSum

perunitSum This is a low level function that is used to calculate a va...

perunitSum_Dit

perunitSum_Dit Similar to perunitSum, this is a low level helper funct...

placebo_test

placebo_test

plot.matched.set

Plot the distribution of the sizes of matched sets.

plot.PanelEstimate

Plot point estimates and standard errors from a PanelEstimate calculat...

prepare_data

prepare_data The calculation of point estimates and standard errors fi...

print.matched.set

Print matched.set objects.

set_lwd_refinement

set_lwd_refinement Performs the set-level operations for refinement wi...

summary.matched.set

Summarize information about a matched.set object and the matched set...

summary.PanelEstimate

Get summaries of PanelEstimate objects/calculations

Implements a set of methodological tools that enable researchers to apply matching methods to time-series cross-sectional data. Imai, Kim, and Wang (2023) <http://web.mit.edu/insong/www/pdf/tscs.pdf> proposes a nonparametric generalization of the difference-in-differences estimator, which does not rely on the linearity assumption as often done in practice. Researchers first select a method of matching each treated observation for a given unit in a particular time period with control observations from other units in the same time period that have a similar treatment and covariate history. These methods include standard matching methods based on propensity score and Mahalanobis distance, as well as weighting methods. Once matching and refinement is done, treatment effects can be estimated with standard errors. The package also offers diagnostics for researchers to assess the quality of their results.

  • Maintainer: In Song Kim
  • License: GPL (>= 3)
  • Last published: 2024-06-04