Description Usage Arguments Details Value Author(s)

View source: R/matchMulti-internal.R

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.

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

`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 |

`treatment` |
name of the treatment variable. Must be present in the column names of each of |

`largeval` |
a large penalty value to be added to the distance for each student-level imbalance. |

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.

a numeric distance.

Luke Keele, Penn State University, ljk20@psu.edu

Sam Pimentel, University of Pennsylvania, spi@wharton.upenn.edu

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.