Propensity Score Matching (PSM) has become one of the most widely used statistical techniques for estimating causal effects in observational studies—especially when randomized controlled trials (RCTs) are not possible. Whether evaluating the impact of a marketing campaign, a medical treatment, or a policy intervention, PSM helps analysts reduce selection bias and mimic the structure of a randomized experiment.
This article explores the origins of PSM, its importance, real-world application examples, case studies, and a detailed walk-through of how to implement it using R.
Origins of Propensity Score Matching
The concept of Propensity Scores was introduced by Paul Rosenbaum and Donald Rubin (1983) to solve a crucial problem in observational research:
How can we estimate the causal effect of a treatment when random assignment is not possible?
Before PSM, analysts relied heavily on regression-based adjustments to control for differences between treatment and control groups. However, these methods often failed when the groups were substantially imbalanced.
Rosenbaum and Rubin proposed a revolutionary idea: Instead of matching on many covariates individually, researchers could summarize all covariates into a single value—the propensity score, defined as the probability of receiving the treatment given observed characteristics.
This allowed for more effective matching, reduced bias, and improved causal inference in non-experimental settings.
Understanding PSM in Simple Terms
Imagine you want to test whether a new drug improves recovery in patients. In a perfect world, you would randomly give the drug to half the patients and compare outcomes. But in reality, patients differ in age, health conditions, socioeconomic factors, and more.
These differences create selection bias.
Propensity Score Matching solves this by:
- Estimating the probability that each person receives the treatment (called the propensity score).
- Matching each treated individual with one or more similar untreated individuals based on those scores.
- Comparing outcomes within these balanced matched pairs.
This approach approximates randomization and allows for causal inference—even without a controlled experiment.
Real-Life Applications of Propensity Score Matching
PSM is widely used in fields where experiments are expensive, unethical, or impractical.
1. Healthcare and Medicine
- Evaluating the effectiveness of new medications
- Comparing surgical procedures
- Estimating treatment effects when randomized trials are not feasible
- Studying long-term effects of lifestyle interventions
2. Marketing and Business Analytics
- Measuring advertising campaign effectiveness
- Understanding the impact of promotional offers
- Evaluating loyalty program performance
- Studying customer behavior and purchase decisions
3. Economics and Policy Evaluation
- Analyzing the impact of minimum wage changes
- Estimating effects of job training programs
- Studying the efficiency of welfare policies
4. Education Research
- Evaluating the impact of tutoring programs
- Measuring effects of technology-based learning interventions
A Simple Example of PSM in Real Life
Suppose a retailer launches a digital ad campaign and wants to assess whether it actually led to more product purchases. The problem: people who respond to ads often differ from those who do not—they may be more engaged, wealthier, or previously interested.
Thus, simply comparing purchasers in both groups would be misleading.
Using PSM, the retailer can:
- Estimate each customer’s probability of responding to the ad based on age, income, or past behavior.
- Match responders and non-responders with similar profiles.
- Compare purchases after matching.
This helps isolate the true impact of the advertisement, free from confounding factors.
Step-by-Step Implementation of PSM in R
Below is a simplified explanation of how PSM works in R, based on a dataset with 1,000 customers, their demographics, whether they responded to an ad campaign, and whether they made a purchase.
1. Data Preparation
The dataset includes:
- Age
- Income
- Ad_Campaign_Response (Treatment variable)
- Bought (Outcome variable)
The first step is to load the data and observe its structure.
2. Exploring the Treatment and Control Groups
The data reveals:
- 404 respondents (treatment)
- 596 non-respondents (control)
Their average age and income differ slightly, indicating mild imbalance.
3. Estimating Treatment Effect Before Matching
A simple regression indicates a 72.9% positive effect of campaign response on purchase behavior. But this estimate may be biased because the groups are not perfectly comparable.
Building the Propensity Score Model
A logistic regression model predicts the probability of responding to the campaign based on age and income:
glm(Ad_Campaign_Response ~ Age + Income, family = binomial("logit"))
The fitted values represent each customer’s propensity score.
Checking Covariate Balance Using tableone
Using the tableone package, we can compare mean age and income between treatment and control groups before matching. The Standardized Mean Differences (SMDs) are low (<0.1), indicating good balance—but for demonstration, we proceed with matching.
Matching Algorithms in R
1. Exact Matching
Exact matching pairs individuals with identical covariates. This approach is strict and often discards many cases, especially in large or complex datasets.
In the example:
- 99 control subjects were matched with 104 treated subjects. Covariate balance improved slightly, but many records were discarded.
2. Nearest Neighbor Matching
Nearest neighbor matching identifies control subjects with the closest propensity scores to treated subjects. It is one of the most widely used methods.
In the example:
- All 404 treated subjects were matched with 404 controls.
- SMD values became extremely small (<0.01), indicating excellent balance.
This creates a dataset similar to a randomized experiment.
Outcome Analysis After Matching
Once matching is complete, the outcome variable—whether the customer made a purchase—is compared between treated and matched control subjects.
A paired t-test confirms:
The probability of purchase increases by 0.73 (73%) when a customer responds to the campaign.
The p-value is extremely small, meaning the effect is highly statistically significant.
This confirms that the ad campaign had a strong causal impact on customer purchases.
Real-World Case Studies Using Propensity Score Matching
Case Study 1: Healthcare – Comparing Treatment Outcomes
A hospital wanted to compare survival rates between patients who underwent two types of heart surgery. Randomizing patients was impossible due to ethical constraints.
Using PSM:
- Patients were matched based on age, comorbidities, BMI, and medical history.
- After matching, differences in survival rates reflected true treatment effects, not differences in patient health.
PSM enabled fair comparison and evidence-based decision-making.
Case Study 2: Marketing – Evaluating a Loyalty Program
A retailer implemented a loyalty program but couldn’t randomly assign customers to join or not.
By using PSM:
- Customers were matched on spending history, demographics, and store visit frequency.
- The analysis revealed a 15% causal lift in revenue among matched participants.
- This helped justify scaling the program across stores.
Case Study 3: Public Policy – Impact of Job Training Initiatives
An employment agency wanted to evaluate whether a job training program improved employment rates.
Using PSM:
- Trainee and non-trainee groups were matched on age, education, work experience, and unemployment duration.
- The program showed a 12% increase in employment probability, guiding policymakers in future funding decisions.
Conclusion
Propensity Score Matching is a powerful technique that bridges the gap between controlled experiments and real-world observational data. By balancing treatment and control groups, PSM allows researchers, data scientists, marketers, and policymakers to uncover true causal relationships.
Using R packages like MatchIt and tableone, analysts can efficiently estimate propensity scores, perform matching, and evaluate outcomes with precision.
PSM is invaluable wherever randomization is impractical—and when applied correctly, it becomes a cornerstone of trustworthy causal inference in modern analytics.
This article was originally published on Perceptive Analytics.
At Perceptive Analytics our mission is “to enable businesses to unlock value in data.” For over 20 years, we’ve partnered with more than 100 clients—from Fortune 500 companies to mid-sized firms—to solve complex data analytics challenges. Our services include Hire Power BI Consultants and Tableau Consultancy Company turning data into strategic insight. We would love to talk to you. Do reach out to us.
Top comments (0)