Propensity Score Calculator
Estimate treatment assignment probability.
Calculate inverse probability weights for treatment effect estimation
Probability of treatment (0 < p < 1)
Enter propensity score or group statistics to calculate weights or balance
Use propensity scores to reduce confounding in observational studies when randomization isn't possible. The propensity score balances treatment and control groups on observed covariates, mimicking a randomized experiment.
What Is a Propensity Score?
The propensity score is the probability of receiving treatment given observed covariates:
Where:
- T = treatment indicator (1 = treated, 0 = control)
- X = vector of observed covariates
Why Propensity Scores Work
Key theorem (Rosenbaum & Rubin, 1983): If treatment assignment is ignorable given X, it's also ignorable given e(X).
This means instead of matching on many covariates, you can match on a single score.
Estimating Propensity Scores
Logistic Regression (Most Common)
Fit logistic regression with treatment as outcome, covariates as predictors.
Alternative Methods
| Method | When to Use |
|---|---|
| Logistic regression | Default choice, interpretable |
| Probit regression | Similar to logistic |
| Random forests | Complex interactions, many covariates |
| Gradient boosting | High-dimensional data |
| Neural networks | Very complex relationships |
Machine learning methods may improve prediction but reduce interpretability.
Using Propensity Scores
1. Matching
Pair treated units with control units having similar propensity scores.
Nearest neighbor matching: For each treated unit, find the control with closest propensity score.
Caliper matching: Match only if |e_treated - e_control| < caliper (often 0.2 Γ SD of propensity score).
1:k matching: Match each treated unit to k controls (increases precision, may reduce balance).
2. Stratification (Subclassification)
Divide sample into strata based on propensity score quintiles:
Five strata typically remove 90% of bias from measured confounders.
3. Inverse Probability Weighting (IPW)
Weight each observation by inverse of propensity score:
For treated:
For control:
IPW estimator for ATE:
4. Doubly Robust Estimation
Combines outcome modeling with propensity weighting:
Consistent if either the propensity or outcome model is correct.
Checking Balance
After applying propensity scores, verify that covariates are balanced between groups.
Standardized Mean Difference (SMD)
Target: |SMD| < 0.1 for all covariates
Variance Ratio
Target: 0.5 < VR < 2.0
Visual Checks
- Love plots (SMD before vs. after)
- Propensity score distributions by group
- Covariate distributions within strata
Example Analysis
Research question: Effect of job training on earnings
Data:
- 185 treated (received training)
- 429 control (no training)
- Covariates: age, education, prior earnings, race, married
Step 1: Estimate propensity scores
Logistic regression:
- Treatment ~ age + education + earnings_1974 + race + married
- Predicted probabilities = propensity scores
Step 2: Check overlap
- Treated: mean e(X) = 0.42, range [0.05, 0.89]
- Control: mean e(X) = 0.31, range [0.02, 0.78]
- Good overlap in middle, some extreme values
Step 3: Match or weight
- 1:1 nearest neighbor matching with caliper = 0.05
- 150 matched pairs (35 treated droppedβno good match)
Step 4: Check balance
- Before matching: age SMD = 0.35, education SMD = 0.28
- After matching: age SMD = 0.04, education SMD = 0.03
Step 5: Estimate effect
- ATT = 487, $3,101)
- Interpretation: Training increased earnings by ~$1,800
Treatment Effect Estimands
| Estimand | Definition | Method |
|---|---|---|
| ATE | Effect for random person | IPW, stratification |
| ATT | Effect for those treated | Matching |
| ATC | Effect for controls if treated | Modified weights |
Different methods estimate different quantities. Be clear about your target.
Common Problems
Lack of Overlap
If propensity distributions don't overlap, comparison is extrapolation.
Solutions:
- Trim extreme propensity scores (e.g., drop e < 0.1 or e > 0.9)
- Report effects only for overlap region
- Consider different estimand
Extreme Weights
With IPW, small propensity scores β huge weights β unstable estimates.
Solutions:
- Trim or stabilize weights
- Stabilized weights: multiply by marginal treatment probability
- Set maximum weight (e.g., 10Γ mean)
Model Misspecification
If propensity model is wrong, bias remains.
Solutions:
- Include interactions and polynomials
- Use doubly robust methods
- Try multiple specifications
Sensitivity Analysis
Propensity scores only control for observed confounders. Unobserved confounding can bias results.
Sensitivity analysis asks: How strong would unmeasured confounding need to be to explain away the effect?
Common approaches:
- Rosenbaum bounds
- E-values
- Sensitivity functions
Propensity Score vs. Alternatives
| Method | Pros | Cons |
|---|---|---|
| Propensity matching | Intuitive, balances all covariates | May lose observations |
| Regression adjustment | Uses all data | Extrapolation risk |
| IPW | Uses all data | Sensitive to extreme weights |
| Doubly robust | Protection from misspecification | More complex |
| Instrumental variables | Handles unobserved confounding | Requires valid instrument |
Reporting Guidelines
Include:
- How propensity scores were estimated (model, variables)
- Overlap assessment
- Balance statistics (before/after)
- Number of observations used
- Which estimand (ATE, ATT)
- Sensitivity analysis for unmeasured confounding
Example: "Propensity scores were estimated via logistic regression including age, sex, baseline severity, and comorbidities. After 1:1 nearest-neighbor matching (caliper = 0.2 SD), all standardized mean differences were < 0.1. The ATT was 5.2 points (95% CI: 2.1, 8.3). Sensitivity analysis indicated that an unmeasured confounder would need OR > 2.5 with both treatment and outcome to nullify the effect."
Historical Context
Paul Rosenbaum and Donald Rubin introduced propensity scores in 1983, building on Rubin's causal inference framework. The method transformed observational research by providing a practical way to address confounding. Extensions like doubly robust estimation and machine learning-based scores continue to advance the field.
Related Calculations
- Logistic Regression Calculator β Estimate propensity scores
- Odds Ratio Calculator β Effect measures
- Relative Risk Calculator β Risk comparison
- Confidence Interval Calculator β Inference
Summary
Propensity scores estimate the probability of treatment given covariates, enabling causal inference in observational studies. Use matching, stratification, or weighting to balance groups. Check balance with standardized differences; target |SMD| < 0.1. Be aware of limitations: propensity scores only control for observed confounders. Always conduct sensitivity analysis for unmeasured confounding. Report your methods, balance checks, and the specific estimand (ATE vs ATT).