Lecture 8.
Matching
MGT 2002 Statistics II
Feng-An Yang1
1 Departmentof Agricultural Economics
National Taiwan University
1 / 45
Outline
Introduction
Conditional Independence Assumption
Matching
Common Support Assumption
Practical Issues in Matching
Propensity Score Matching
Application
Summary
2 / 45
Introduction
▶ Our goal is to estimate the Average Treatment Effect (ATE)
ATE = E [Y1i ] − E [Y0i ]
▶ However, with observational data, we can only observe
outcomes for one potential state—treated or untreated—not
both
E [Y1i |Ti = 1] − E [Y0i |Ti = 0]
▶ As a result, the estimated effect may differ from the true ATE
due to non-random treatment assignment
▶ This is where the independence assumption becomes crucial
3 / 45
Introduction
Independence Assumption
Treatment assignment is independent of potential outcomes:
(Y1i , Y0i ) ⊥⊥ Ti
▶ This implies that the treatment assignment is random
▶ Individuals who received and did not receive the treatment
are, on average, similar in all respects that affect the outcome
▶ Individuals who received the treatment would have
experienced the same outcome in the absence of treatment as
those who did not receive it, and vice versa:
▶ E [Y1i |Ti = 1] = E [Y1i |Ti = 0] = E [Y1i ]
▶ E [Y0i |Ti = 1] = E [Y0i |Ti = 0] = E [Y0i ]
▶ If this assumption holds, we can identify the causal effect
E [Y1i |Ti = 1] − E [Y0i |Ti = 0] = E [Y1i ] − E [Y0i ] = ATE
4 / 45
Introduction
▶ Is this assumption likely to hold in real-world settings?
▶ Let’s revisit the example of the relationship between health
insurance and doctor visits
▶ Do you believe that:
▶ E [Y1i |with insurance] = E [Y1i |without insurance]
▶ E [Y0i |with insurance] = E [Y0i |without insurance]
▶ If the independence assumption holds, then individual
characteristics should, on average, be similar between
individuals with and without health insurance
▶ This condition is known as covariate balance
5 / 45
Introduction
▶ Covariates are the observed characteristics of individuals that
may influence both treatment assignment and the outcome
▶ Covariate balance means that the distribution of these
covariates is similar between the treatment group and the
control group
▶ In practice, we usually check the sample means between the
two groups to investigate the covariate balance
▶ This can be done by conducting mean comparison t-tests
between the treatment and control groups for each covariate
▶ If the independence assumption holds, we would expect:
Insured individuals Uninsured individuals
Covariate
(Treatment) (Control)
Age (years) 44.8 45.1
Income (USD/year) 49,700 49,200
Pre-existing condition 0.59 0.58
Education (years) 14.9 15.1
6 / 45
Introduction
▶ In observational settings, the independence assumption often
does not hold
▶ Individuals may self-select into the treatment group based on
factors related to the outcome
▶ Those who choose to purchase health insurance may be
systematically different from those who do not
▶ For example, they may have worse health, higher income, or
greater risk aversion
Insured individuals Uninsured individuals
Covariate
(Treatment) (Control)
Age (years) 45.2 39.8
Income (USD/year) 52,000 38,500
Pre-existing condition 0.62 0.35
Education (years) 15.1 12.3
7 / 45
Introduction
▶ Given the differences in observed characteristics (covariates)
between the treatment and control groups, what if we could
account for these differences directly?
▶ Then, any remaining differences in outcomes may be more
credibly attributed to the treatment effect
▶ In other words, we aim to “replicate” a randomized
experiment by making the treatment and control groups
comparable on observed variables
▶ Here, we would need to make a stronger assumption
8 / 45
Conditional Independence Assumption
Conditional Independence Assumption (CIA)
Treatment assignment is independent of potential outcomes,
conditional on observed covariates
(Y1i , Y0i ) ⊥
⊥ Ti |Xi
▶ Treatment assignment is as good as random once we control
for observed covariates Xi
▶ Also Known as the Selection on Observables assumption
▶ The expected outcome individuals would have experience
with/without the treatment is the same between those who
received the treatment and those who did not for each value
of Xi
E [Y1i |Ti = 1, Xi ] = E [Y1i |Ti = 0, Xi ]
E [Y0i |Ti = 1, Xi ] = E [Y0i |Ti = 0, Xi ]
9 / 45
Conditional Independence Assumption
▶ Recall our example: estimating the effect of health insurance
on the number of doctor visits
▶ Individuals who purchase insurance are older, sicker, more
educated, and have higher income
▶ Under the CIA, after controlling for observed characteristics
like age, income, health status, and education, the decision to
purchase insurance is as good as random
▶ Among individuals with the same observed covariates, whether
someone has insurance or not is independent of their potential
doctor visits under both insurance and no insurance
▶ So we can compare insured and uninsured individuals with
similar covariates to estimate the effect of health insurance
10 / 45
Conditional Independence Assumption
treatment effect = E [Y1i |Ti = 1|Xi ] − E [Y0i |Ti = 0|Xi ]
= E [Y1i − Y0i |Ti = |Xi ]
+ (E [Y0i |Ti = 1, Xi ] − E [Y0i |Ti = 0, Xi ])
= E [Y1i − Y0i |Ti = 1|Xi ] = ATT
▶ Under the CIA, we can estimate the Average Treatment effect
on the Treated (ATT)
▶ Recall that ATT refers to the average effect of the treatment
on those who actually received it
▶ This is often of practical and policy interest because many
real-world policy questions focus on how effective a program
or intervention was for its actual participants
▶ Did health insurance improve doctor visits for people who
chose to enroll?
▶ Did a job training program increase earnings for those who
attended?
11 / 45
Matching
ATT = E [Y1i − Y0i |Ti = 1|Xi ]
▶ With observational data, we observe Y1i for treated units, but
we do not observe their counterfactual Y0i
▶ What can we do?
▶ What if we impute the missing potential outcome for each
treated unit using information from one or more control units
with the closest values of X ?
▶ By conditioning on X , we can approximate E [Y0i |Ti = 1|Xi ]
▶ This method is called Matching
12 / 45
Matching
Let’s illustrate matching using a hypothetical example
▶ Outcome variable: Number of doctor visits
▶ Treatment variable: Having health insurance
▶ Covariates: age and self-reported health status (1-10)
▶ Treatment group: 5 individuals with health insurance
▶ Control group: 10 individuals without insurance
▶ Suppose that age and health status are the only observable
factors that affect both health insurance coverage and the
number of doctor visits
13 / 45
Matching
Treatment Control
ID Age Health Visits ID Age Health Visits
T1 52 4 8 C1 31 8 2
T2 55 3 9 C2 53 3 7
T3 50 5 7 C3 30 8 2
T4 48 4 6 C4 48 4 5
T5 53 3 9 C5 53 3 6
C6 55 3 5
C7 29 9 1
C8 50 5 4
C9 32 7 3
C10 52 4 6
51.6 3.8 7.8 43.3 5.4 4.1
▶ Individuals with health insurance are, on average, older, sicker,
and see doctors more often than those without insurance
▶ Without accounting for age and health status, the estimated
effect of insurance on the number of doctor visits is
3.7(= 7.8 − 4.1)
14 / 45
Matching
Treatment Matched Control
ID Age Health Visits ID Age Health Visits
T1 52 4 8 C10 52 4 6
T2 55 3 9 C6 55 3 6
T3 50 5 7 C8 50 5 4
T4 48 4 6 C4 48 4 5
T5 53 3 9 C2,C5 53 3 6.5
51.6 3.8 7.8 51.6 3.8 5.5
▶ After matching, individuals with health insurance now have
the same average age and health status as those without
insurance
▶ Conditional on age and health status, the estimated effect of
insurance on the number of doctor visits is 2.3(= 7.8 − 5.5)
15 / 45
What We Learn from This Matching Exercise?
▶ In observational settings, treatment and control groups may
differ substantially in observed characteristics (e.g., age,
health status), which can bias causal estimates
▶ Matching helps us construct a more comparable control group
by pairing treated individuals with similar individuals from the
control group based on observed covariates
▶ Here, we implemented exact matching, which only works
when there are control units with identical covariate values —
a condition that often requires a rich dataset
▶ Implicit in our example, we see another important assumption
needed for the matching procedure to work
16 / 45
Common Support Assumption
▶ Matching relies on the availability of similar individuals across
treatment and control groups
▶ What if some treated individuals have no comparable
counterparts in the control group?
▶ Some treated individuals will have no comparable matches,
making it impossible to estimate their counterfactual
outcomes
▶ This brings us to an important requirement for matching to
work
17 / 45
Common Support Assumption
Common Support Assumption
There must be sufficient overlap in the distribution of observed
covariates between treated and control groups
0 < P (T = 1|X ) < 1
▶ For any combination of covariates X , there must be both
treated and control individuals
▶ This assumption ensures that each treated unit can be
matched to a control unit (and vice versa)
▶ If some treated individuals have covariate values not observed
in the control group, we cannot estimate their counterfactual
outcomes
18 / 45
Common Support Assumption
Density
0 0.2 0.4 0.6 0.8
Propensity Score
Treatment Control
19 / 45
Common Support Assumption
1
0.8
Common Support Region
Density
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1
Propensity Score
Treatment Control
20 / 45
Common Support Assumption
▶ If only a few units fall outside the common support, we can
restrict the sample to the region of common support (also
known as trimming)
▶ However, this means the estimated treatment effect will only
generalize to treated individuals within the common support,
not to the entire treated population
▶ If a large proportion of treated individuals lack comparable
counterparts, matching may not be appropriate, and
alternative methods should be considered
▶ Therefore, it is crucial to check for common support before
implementing matching procedures
21 / 45
Summary
▶ The matching method offers a way to approximate the missing
counterfactual outcome by using control individuals who share
similar observed characteristics with treated individuals
▶ The conditional independence assumption (CIA) implies that,
once we control for observed covariates, treatment assignment
is as good as random conditional on observables
▶ Under the CIA, control individuals with the same covariate
values as treated individuals can serve as valid counterfactuals
▶ The common support assumption ensures that for each
treated individual, there exists at least one comparable control
unit with the same covariate values
▶ However, in practice, there are important considerations and
limitations when implementing matching methods
22 / 45
Regression vs Matching under the CIA
▶ So far, we’ve focused on matching—but why not just use a
regression model that controls for observable covariates?
▶ For a regression model to yield an unbiased estimate of the
treatment effect, it implicitly assumes correct model
specification (i.e., the functional form is correctly specified
and no key variables are omitted)
▶ Matching has an advantage in this regard: it is a
non-parametric method that directly compares the outcomes
of treated individuals with matched controls, and is therefore
less reliant on functional form assumptions
23 / 45
Regression vs Matching under the CIA
Regression
▶ Uses all available data to estimate the relationship between
treatment and outcome, controlling for covariates
▶ Implicitly imposes a functional form (e.g., linearity)
▶ Can extrapolate beyond the region of common support
▶ Can be sensitive to model specification
Matching
▶ Constructs treatment effect by comparing treated units with
control units that have similar covariate values
▶ No functional form assumption
▶ Avoids extrapolation by restricting comparisons to comparable
observations
▶ Reduces bias from model misspecification, but may suffer
from lower efficiency and limited matches
24 / 45
Practical Issues in Matching
Continuous variables
▶ It is often difficult to find a control unit with exactly the same
value on continuous covariates (e.g., height, weight)
▶ Possible solutions include:
▶ Categorizing continuous variables
▶ Matching on the closest value (e.g., nearest neighbor)
▶ These approaches are more flexible but may result in lower
matching quality
Sample Size
▶ In small samples, it may be difficult to find suitable matches
for treated units
▶ Fewer observations reduce the likelihood of finding
comparable controls
25 / 45
Practical Issues in Matching
Common Support
▶ For matching to work, each treated individual must have at
least one comparable control individuals
▶ Lack of common support can lead to loss of generalizability or
bias
Number of Covariates
▶ As the number of covariates increases, it becomes harder to
find exact or close matches
▶ This is known as the “curse of dimensionality”
26 / 45
Propensity Score Matching
How to deal with the curse of dimensionality?
▶ Matching on many covariates directly becomes increasingly
difficult as the number of covariates grows
▶ Can we reduce the dimensionality of the matching problem
without losing key information?
Propensity Score Matching
▶ Rosenbaum and Rubin (1983) proposed using the propensity
score as a balancing score
▶ Matching on the propensity score allows us to achieve
covariate balance in expectation without matching on every
covariate directly
▶ This reduces the problem to one dimension, making matching
more feasible and efficient
27 / 45
Propensity Score Matching
Propensity Score
The propensity score is the conditional probability of receiving
treatment given a set of observed covariates
P(Ti = 1|Xi ) ≡ P(Xi ) ≡ Pi
▶ The central idea is to condense all the information contained
in Xi into a single scalar: the propensity score
▶ Propensity scores are estimated using a binary choice model
(since treatment status is binary: treated vs. not treated)
▶ Common models: logit or probit
▶ These models are used when the dependent variable is binary
▶ Details of these models are beyond the scope of this course
28 / 45
Propensity Score Matching
Conditional Independence Assumption (CIA)
If treatment assignment Ti is independent of potential outcomes
(Y1i , Y0i ) conditional on observed covariates Xi , then Ti is
independent of potential outcomes conditional on the propensity
score Pi
(Y1i , Y0i ) ⊥
⊥ Ti |Xi ⇒ (Y1i , Y0i ) ⊥
⊥ Ti |P(Xi )
▶ This implies that conditioning on the single index—the
propensity score P(Xi )—is sufficient to establish independence
between treatment assignment and the potential outcomes
▶ It addresses the dimensionality problem by reducing the
high-dimensional covariate space to a single scalar value
29 / 45
Propensity Score Matching
Validity of Conditional Independence Assumption
▶ After matching on the propensity score, we should check
whether the distribution of covariates is similar between
treated and matched control groups
▶ As discussed earlier, in practice, we usually check the sample
means between the two groups to investigate the covariate
balance
▶ Insignificant differences in covariates between the treatment
group and the matched control group provide indirect evidence
that the conditional independence assumption is likely to hold
▶ Note that we can only provide indirect evidence, as identifying
assumptions are not directly testable
30 / 45
Propensity Score Matching
Common Support Assumption
There must be sufficient overlap in the distribution of propensity
score between treated and control groups
0 < P (T = 1|X ) < 1
▶ For each value of propensity score among treated individuals,
there exists at least one comparable control invididuals with a
similar value of the propensity score
▶ This assumption ensures that each treated unit can be
matched to a control unit (and vice versa)
31 / 45
Propensity Score Matching
▶ There are several ways to estimate treatment effects with
propensity scores
▶ Matching on the Propensity Score
▶ Stratification
▶ Inverse Probability Weighting
▶ Covariate Adjustment
▶ Here, I will only cover matching on the propensity score
▶ Once the propensity scores are estimated, treated and control
individuals with similar scores can be matched
▶ The next step involves selecting a matching algorithm to
identify suitable matches
32 / 45
Common Matching Algorithms
Nearest Neighbor Matching (will only cover this)
▶ Each treated unit is matched to the control unit with the
closest propensity score
Caliper Matching
▶ Matches are only made if the difference in scores is within a
pre-specified range
Radius Matching
▶ Treated units are matched to all controls within a certain
radius of the propensity score
Kernel or Local Linear Matching
▶ Weighted average of all control units, with weights decreasing
with distance in the propensity score
33 / 45
Nearest Neighbor Matching
▶ For each treated unit, find one (or more) control unit(s) with
the closest propensity score
▶ These matched control units are used to estimate the
counterfactual outcome for each treated unit
▶ Average Treatment Effect on the Treated (ATT)
[= 1
X
ATT Yi − Yj(i)
NT
i∈{Ti =1}
▶ Yi is the outcome for treated unit i
▶ Yj(i) is the outcome for the nearest matched control unit to i
▶ The calculation of standard error of the ATT is more
complicated and is omitted here
34 / 45
The Effect of Exercise on BMI
▶ Obesity and overweight are major public health challenges
linked to chronic conditions such as diabetes, heart disease,
and certain cancers
▶ Regular physical activity is widely recommended as a way to
reduce or maintain Body Mass Index (BMI)
▶ Understanding the causal effect of exercise on BMI can help
inform public health campaigns and school and workplace
fitness initiatives
▶ Here, we will use real-life data to investigate the effect of
exercise on BMI
35 / 45
The Effect of Exercise on BMI
▶ Research question: Does regular exercise reduce BMI?
▶ Treatment: Whether or not an individual participate any
physical activity
▶ Outcome: BMI
▶ Data: 1990 Behavioral Risk Factor Surveillance System
Challenge
▶ People who exercise regularly may differ in many ways from
those who don’t (e.g., education, health)
▶ These differences make it challenging to identify the causal
effect of exercise on BMI
▶ To address this issue, we control for relevant observable
covariates in the analysis
▶ For simplicity, the analysis will include the following
covariates: Age, Male, White, Married, College, and Employed
36 / 45
Sample Means by Treatment Status Before Matching
Variable Treatment Control Difference
Age 43.315 49.226 -5.911***
Male 0.443 0.410 0.032***
White 0.861 0.790 0.071***
Married 0.572 0.546 0.026***
College 0.516 0.299 0.217***
Employed 0.658 0.564 0.095***
Observations 55,287 23,402
▶ Individuals who exercise are systematically and significantly
different from those who do not exercise
▶ For example, individuals who exercise tend to be younger and
more educated
▶ These differences motivate the use of Propensity Score
Matching (PSM), as it provides a way to adjust for observable
differences between individuals who do and do not exercise
37 / 45
Nearest Neighbor Matching
▶ We implement one-to-one nearest neighbor matching
▶ For each individual who exercises, we find one individual from
the non-exercising group with the closest propensity score
▶ Matching is performed with replacement
▶ Before presenting the estimated treatment effects, we first
assess the validity of key identifying assumptions:
▶ Conditional Independence Assumption (CIA)
▶ Common Support Assumption
38 / 45
Sample Means by Treatment Status After Matching
Variable Treatment Control Difference
Age 43.315 43.301 0.014
Male 0.443 0.439 0.003
White 0.861 0.863 -0.003
Married 0.572 0.572 0.000
College 0.516 0.514 0.002
Employed 0.658 0.660 -0.001
Observations 55,287 55,287
▶ After matching, the differences in covariates between the two
groups become very small and statistically insignificant
▶ This indicates that covariate balance is achieved and suggests
that the Conditional Independence Assumption (CIA) likely
holds
▶ Individuals who exercise now have similar observed
characteristics to their matched counterparts who do not
exercise
39 / 45
Common Support Assumption
4
Density
Density
2
0
.2 .4 .6 .8 1 .2 .4 .6 .8 1
Propensity Score Propensity score
Treatment Control Treatment Control
▶ There is sufficient overlap in the density distribution of the
propensity score between individuals who exercise and those
who do not
▶ This suggests that the common support assumption likely
holds
40 / 45
Estimation results
Model 1 Model 2 Model 3
ATT -1.106*** -0.755*** -0.056
(0.048) (0.049) (0.230)
Standard errors in parenthesis
▶ Model 1: BMIi = α + θExercisei + ϵi
▶ This is equivalent to calculating the mean difference in BMI
between individuals who exercise and those who do not
▶ Model 2: BMIi = α + θExercisei + Xi β + ϵi
▶ Xi includes Age, Male, White, Married, College, and Employed
▶ Model 3: One-to-One nearest neighbor matching
▶ This represents the mean difference in BMI between individuals
who exercise and their matched counterparts who do not
exercise
▶ The ATT represents the estimated effect of exercise on BMI
41 / 45
Estimation results
Model 1 Model 2 Model 3
ATT -1.106*** -0.755*** -0.056
(0.048) (0.049) (0.230)
Standard errors in parenthesis
▶ In Model 1, the estimated ATT suggests that individuals who
exercise have a 1.106 lower BMI, on average
▶ In Model 2, after controlling for observable covariates, the
estimated effect drops to -0.755, indicating that part of the
initial effect was driven by differences in observed
characteristics
▶ In Model 3, using one-to-one nearest neighbor matching, the
estimated effect further reduces to -0.056 and becomes
statistically insignificant
▶ This substantial reduction suggests that much of the
difference in BMI is explained by observable characteristics,
rather than the causal impact of exercise itself
42 / 45
Key Takeaways from Matching Methods
▶ In observational studies, random assignment of treatment is
typically not feasible
▶ A simple comparison of average outcomes between treated
and control groups is likely to suffer from selection bias
▶ Matching helps mitigate this bias by constructing the
counterfactual outcome for each treated unit using control
units with similar observed characteristics
▶ The Conditional Independence Assumption is essential—it
states that, conditional on observed covariates, treatment
assignment is independent of potential outcomes and
effectively random
▶ The Common Support Assumption requires sufficient overlap
in the distribution of covariates between treated and control
groups, ensuring that each treated unit has comparable
control units for matching
43 / 45
Key Takeaways from Matching Methods
▶ Exact Matching
▶ Matches treated and control units with exactly the same
values of observed covariates
▶ Conceptually simple and intuitive
▶ Often impractical with many covariates or continuous variables
(curse of dimensionality)
▶ Propensity Score Matching (PSM)
▶ Matches units based on their estimated probability of receiving
treatment, given observed covariates
▶ Reduces multidimensional covariate space to a single score
▶ More feasible with high-dimensional data
44 / 45
Limitations and When to Be Cautious
▶ Matching can only account for observed confounders
▶ It relies heavily on the Conditional Independence Assumption
▶ This is a very strong assumption, and in many real-world
settings, unobserved confounders that affect both the
outcome and the treatment may still exist
▶ It is often difficult to convincingly argue that all relevant
confounders have been observed and properly controlled for
▶ Therefore, matching should be seen as a last resort, used
when better research designs are not available
45 / 45