This repository contains a simple, interactive web demo that illustrates omitted variable bias in regression analysis using Propensity Score Matching (PSM). It allows users to explore how excluding important covariates can bias treatment effect estimates.
DCL Final.html
β Main interactive HTML page containing the demo logic with checkboxes and Plotly visualizations.DCL.qmd
β Source file likely written in Quarto Markdown used to generate the HTML version (not viewable directly here).styles.css
β External CSS styles for UI enhancements.
- Interactive variable selection for matching covariates.
- Dynamic visualization of regression estimates:
- Biased model (omitting a confounding variable).
- True model (including confounding variable).
- Educational use case demonstrating how omitting variables can distort causal inference.
To run the demo locally:
- Clone this repository:
git clone https://github.com/your-username/psm-omitted-variable-demo.git cd psm-omitted-variable-demo
- Open the
DCL Final.html
file in your browser.
Note: Ensure you have an internet connection as the demo uses the Plotly CDN.
This tool is great for:
- Econometrics or causal inference classes.
- Demonstrating the intuition behind omitted variable bias.
- Explaining the benefits of PSM in observational data analysis.
MIT License. Feel free to use and modify.