Learn R Programming

matchMulti (version 1.0)

matchMultioutcome: Performs an outcome analysis after multilevel matching.

Description

This function returns a point estimate, 95% confidence interval, and p-values for the matched multilevel data. All results are based on randomization inference.

Usage

matchMultioutcome(obj, out.name = NULL, schl_id_name = NULL, 
treat.name = NULL, end.1 = -1000, end.2 = 1000)

Arguments

obj
A multilevel match object.
out.name
Outcome variable name
schl_id_name
Level 2 ID variabel name. This variable identifies the clusters in the data that you want to match.
treat.name
Treatment variable name, must be zero or one.
end.1
Lower bound for point estimate search, default is -1000.
end.2
Upper bound for point estimate search, default is 1000.

Value

  • pval.cOne-sided approximate p-value for test of the sharp null.
  • pval.pOne-sided approximate p-value for test of the sharp null assuming treatment effects vary with cluster size
  • ci1Lower bound for 95% confidence interval.
  • ci2Upper bound for 95% confidence interval.
  • p.estPoint estimate for the group level treatment effect.

Details

It may be necessary to adjust the lower and upper bounds if one expects the treatment effect confidence interval to be outside the range of -1000 or 1000.

References

Rosenbaum, Paul R. (2002) Observational Studies. Springer-Verlag.

See Also

See Also as matchMulti, matchMultisens

Examples

Run this code
# 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)

#Estimate treatment effect
output <- matchMultioutcome(match.simple, out.name = "mathach",
schl_id_name = "school",  treat.name = "sector")

Run the code above in your browser using DataLab