Learn R Programming

matchMulti (version 1.1.12.1)

assembleMatch: Collect Matched Samples

Description

After students and schools have both been matched separately, assembles the matched student samples corresponding to the school match into a single dataframe of student-level data.

Usage

assembleMatch(student.matches, school.match, school.id, treatment)

Value

a dataframe containing the full set of matched samples for the multilevel match.

Arguments

student.matches

a list of lists object produced by matchStudents, with each element of the second list containing a dataframe composed of a matched sample for a different treated-control school pairing.

school.match

a dataframe, produced by matchSchools, with two columns, one containing treated school IDs and the other containing matched control school IDs.

school.id

the name of the column storing the unique school identifier (in the dataframes stored in student.matches)

treatment

the name of the column storing the binary treatment status indicator (in the dataframes stored in student.matches)

Author

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

Sam Pimentel, University of California, Berkeley, spi@berkeley.edu