Learn R Programming

rbounds (version 2.1)

binarysens: Sensitivity Test for Matched Binary Outcome

Description

Function to calculate Rosenbaum bounds for binary data.

Usage

binarysens(x,y, Gamma=6, GammaInc=1)

Arguments

x
Count of the first set of discrepant pairs in a table of treated and control outcomes.
y
Count of the second set of discrepant pairs in a table of treated and control outcomes.
Gamma
Upper-bound on gamma parameter.
GammaInc
To set user specified increments for gamma parameter.

References

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

See Also

See also data.prep, psens, hlsens, Match, mcontrol

Examples

Run this code
# Example From Rosenbaum Observational Studies Pg 112
# Success: Died From Lung Cancer
# 110 Discrepant Pairs
# 12 Discrepant Pairs

# Sensitivity Test
binarysens(12,110)

# 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 - without replacement
m.obj <- Match(Y = Y, Tr = D, X = X, M = 1, replace=FALSE)
summary(m.obj)

# One should check balance, but let's skip that step for now.

# Sensitivity Test
binarysens(m.obj, Gamma=2, GammaInc=.1)

Run the code above in your browser using DataLab