A reproducible evaluation of a hypothetical service program using synthetic administrative data. The project estimates the average treatment effect on participants while making the design assumptions, balance diagnostics, and sensitivity of the estimate visible.
This is a portfolio demonstration. The data are generated in the repository and do not represent a real organization, client, or participant.
Among eligible participants, what was the effect of program participation on the follow-up outcome after accounting for observed baseline differences between participants and nonparticipants?
- Generate a synthetic multisite administrative dataset with realistic selection into the program.
- Estimate propensity scores from prespecified baseline covariates.
- Perform 1:1 nearest-neighbor matching with a caliper.
- Assess standardized mean differences before and after matching.
- Estimate the participant effect with site-clustered standard errors.
- Compare the matched estimate with adjusted-regression and ATT-weighted estimates.
The estimand is the average treatment effect on the treated (ATT). The workflow treats the propensity model as a design tool: outcome results are not interpreted until common support and balance have been reviewed.
R/
01_generate_synthetic_data.R
02_estimate_effects.R
03_diagnostics.R
analysis/
program_evaluation.qmd
stata/
quasi_experimental_analysis.do
data/
README.md
.github/workflows/
validate-analysis.yml
With R 4.4 or later:
install.packages(c(
"cobalt", "dplyr", "ggplot2", "lmtest",
"MatchIt", "readr", "sandwich", "tibble"
))
source("R/01_generate_synthetic_data.R")
source("R/02_estimate_effects.R")
source("R/03_diagnostics.R")The companion Stata workflow reads the same generated CSV and estimates matching and doubly robust models. It is included to demonstrate equivalent implementation across the two environments; GitHub Actions validates the R workflow because Stata requires a commercial license.
Running the project creates:
outputs/effect_estimates.csvwith unadjusted, regression-adjusted, matched, and ATT-weighted estimatesoutputs/balance_table.csvwith pre/post-match standardized mean differencesoutputs/love_plot.pngfor covariate balanceoutputs/propensity_overlap.pngfor common-support assessment
Matching can improve comparability on observed baseline variables, but it cannot remove bias from unmeasured confounding. A real evaluation would also document intervention timing, attrition, data provenance, spillovers, missing-data mechanisms, and the plausibility of conditional exchangeability with subject-matter experts.
Program evaluation · causal inference · propensity-score matching · balance diagnostics · clustered inference · reproducible analysis · R · Stata
MIT