Learn R Programming

matchMulti (version 1.1.12.1)

balanceMulti: Performs balance checking after multilevel matching.

Description

This function checks balance after multilevel balance. It checks balance on both level-one (student) and level-two (school) covariates.

Usage

balanceMulti(
  match.obj,
  student.cov = NULL,
  school.cov = NULL,
  include.tests = TRUE,
  single.table = FALSE
)

Value

students

Balance table for student level covariates, as a dataframe.

schools

Balance table for school level covariates, as a dataframe.

Arguments

match.obj

A multilevel match object

student.cov

Names of student level covariates that you want to check balance

school.cov

Names of school level covariates for which you want to check balance, if any.

include.tests

If TRUE include tests for balance. FALSE just report the means and differences.

single.table

If FALSE include a list of student and school covariates separately. TRUE means single balance table.

Author

Luke Keele, Penn State University, ljk20@psu.edu Sam Pimentel, University of Pennsylvania, spi@wharton.upenn.edu

Details

This function returns a list which include balance checks for before and after matching for both level-one and level-two covariates. Balance statistics include treated and control means, standardized differences, which is the difference in means divided by the pooled standard deviation before matching, and p-values for mean differences. It extracts the matched data and calls `balanceTable` for student and school level covariates.

See Also

See also matchMulti, matchMultisens, matchMultioutcome, rematchSchools

Examples

Run this code

	if (FALSE) {
# Load Catholic school data
data(catholic_schools)

student.cov <- c('minority','female','ses','mathach')

# Check balance student balance before matching
balanceTable(catholic_schools[c(student.cov,'sector')],  treatment = 'sector')

#Match schools but not students within schools
match.simple <- matchMulti(catholic_schools, treatment = 'sector',
school.id = 'school', match.students = FALSE)

#Check balance after matching - this checks both student and school balance
balanceMulti(match.simple, student.cov = student.cov)
}

Run the code above in your browser using DataLab