Learn R Programming

matchMulti (version 1.0)

match2distance: Compute School Distance from a Student Match

Description

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.

Usage

match2distance(matchFrame, treatFrame, ctrlFrame, student.vars, treatment, largeval)

Arguments

matchFrame
dataframe containing all matched students.
treatFrame
dataframe containing all students from the treated school.
ctrlFrame
dataframe containing all students from the control school.
student.vars
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.
treatment
name of the treatment variable. Must be present in the column names of each of matchFrame, treatFrame and ctrlFrame.
largeval
a large penalty value to be added to the distance for each student-level imbalance.

Value

  • a numeric distance.

Details

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.