| binarysens {rbounds} | R Documentation |
Function to calculate Rosenbaum bounds for binary data.
binarysens(x,y, Gamma=6, GammaInc=1)
x |
Number of successes in control group. |
y |
Number of successes in treatment group. |
Gamma |
Upper-bound on gamma parameter. |
GammaInc |
To set user specified increments for gamma parameter. |
Luke Keele, Ohio State University, keele.4@osu.edu
Rosenbaum, Paul R. (2002) Observational Studies. Springer-Verlag.
See also data.prep, psens, hlsens, Match, mcontrol
#
# Example From Rosenbaum Observational Studies Pg 112
# Success: Died From Lung Cancer
# 110 Treated Successes
# 12 Control Successes
#
# Sensitivity Test
#
binarysens(12,100)
#
# Example Using Match()
#
#
#Load Matching Software and Data
#
library(Matching)
data(GerberGreenImai)
#
# Estimate Propensity Score
#
pscore.glm <- glm(PHN.C1 ~ PERSONS + VOTE96.1 + NEW +
MAJORPTY + AGE + WARD + PERSONS:VOTE96.1 + PERSONS:NEW +
AGE2, family = binomial(logit), data = GerberGreenImai)
#
#save data objects
#
D <- GerberGreenImai$PHN.C1
Y <- GerberGreenImai$VOTED98
X <- fitted(pscore.glm)
#
# Match
#
m.obj <- Match(Y = Y, Tr = D, X = X, M = 1)
summary(m.obj)
#
# One should check balance, but let's skip that step for now.
#
#
# Sensitivity Test
#
binarysens(m.obj, Gamma=2, GammaInc=.1)