View source: R/matchMultisens.R
matchMultisens | R Documentation |
Function to calculate Rosenbaum bounds for continuous outcomes after multilevel matching.
matchMultisens(
obj,
out.name = NULL,
schl_id_name = NULL,
treat.name = NULL,
Gamma = 1
)
obj |
A multilevel match object |
out.name |
Outcome variable name |
schl_id_name |
Level 2 ID variable name, that is this variable identifies clusters matched in the data. |
treat.name |
Treatment indicator name |
Gamma |
Sensitivity analysis parameter value. Default is one. |
This function returns a single p-value, but actually conducts two tests. The first assumes that the treatment effect does not vary with cluster size. The second allows the treatment effect to vary with cluster size. The function returns a single p-value that is corrected for multiple testing. This p-value is the upper bound for a single Gamma value
pval |
Upper bound on one-sided approximate p-value for test of the sharp null. |
Luke Keele, Penn State University, ljk20@psu.edu
Sam Pimentel, University of Pennsylvania, spi@wharton.upenn.edu
Rosenbaum, Paul R. (2002) Observational Studies. Springer-Verlag.
See Also as matchMulti
,
matchMultioutcome
## Not run:
# 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")
# Perform sensitivity analysis using Rosenbaum bound -- increase Gamma to increase effect of
# possible hidden confounder
matchMultisens(match.simple, out.name = "mathach",
schl_id_name = "school",
treat.name = "sector", Gamma=1.3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.