Defines a distance between two schools whose students have been matched based on the size of the resulting matched sample and on the student-level covariate balance.
match2distance(
matchFrame,
treatFrame,
ctrlFrame,
student.vars,
treatment,
largeval
)
a numeric distance.
dataframe containing all matched students.
dataframe containing all students from the treated school.
dataframe containing all students from the control school.
names of variables on which to evaluate balance in the
matched sample. Must be present in the column names of each of
matchFrame
, treatFrame
and ctrlFrame
.
name of the treatment variable. Must be present in the
column names of each of matchFrame
, treatFrame
and
ctrlFrame
.
a large penalty value to be added to the distance for each student-level imbalance.
Luke Keele, Penn State University, ljk20@psu.edu
Sam Pimentel, University of California, Berkeley, spi@berkeley.edu
The distance is computed by (1) subtracting the harmonic mean of the treated
and control counts in the matched sample from largeval
(2) adding
largeval
for each covariate among studentvars
that has an
absolute standardized difference exceeding 0.2. This encourages the school
match to choose larger schools with better balance.