Description Usage Arguments Details Value Author(s) References See Also Examples
Principal stratification sensitivity analysis relaxing monotonicity as described by Jemiai and Rotnitzky (2005) and implemented by Shepherd, Redman, and Ankerst (2008).
1 2 3 4 5 6 7  sensitivityJR(z, s, y, beta0, beta1, phi, Pi, psi,
selection, groupings,
ci = 0.95, ci.method = c("analytic","bootstrap"),
ci.type = "twoSided", custom.FUN=NULL, na.rm = FALSE,
N.boot = 100, interval = c(100, 100),
upperTest = FALSE, lowerTest = FALSE, twoSidedTest = TRUE,
verbose=getOption("verbose"), isSlaveMode = FALSE)

z 
vector; contains the grouping values (e.g., treatment assignment) for each record. 
s 
vector; indicates whether a record is selected. 
y 
vector; outcome values. Can be 
beta0 
vector; values of the sensitivity parameter β0 linking outcome in group g0 with selection if assigned group g1. 
beta1 
vector; values of the sensitivity parameter β1 linking outcome in group g1 with selection if assigned group g0. 
phi, Pi, psi 
vector; sensitivity parameters specifying the joint distribution of
S(\var{g0}), S(\var{g1}). Only one of the three
parameters should be specified. 
selection 
The value of 
groupings 
vector of two elements 
ci 
numeric vector; confidence interval value. Defaults to 
ci.method 
character; method by which the confidence interval and
variance are calculated. Can be “analytic” or
“bootstrap”. Defaults to 
ci.type 
character vector; type of confidence interval that the corresponding

custom.FUN 
function; function to calculate custom result. 
na.rm 
logical; indicates whether records that are invalid due to 
N.boot 
integer; number of bootstrap repetitions that will be run when

interval 
numeric vector of length 2. Controls the range limits used by optimize to estimate α0 and α1. 
lowerTest 
logical. Return the lower one sided pvalue for the ACE. Defaults
to 
upperTest 
logical. Return the upper one sided pvalue for the ACE. Defaults
to 
twoSidedTest 
logical. Return a two sided pvalue for the ACE. Defaults
to 
verbose 
logical; prints dots when bootstrapping to show that something is happening. Bootstrapping can take a long time. 
isSlaveMode 
logical. Internal Use only. Used in recursion. 
Performs a sensitivity analysis estimating the average causal effect
among those who would have been selected regardless of treatment
assignment (ACE) without assuming monotonicity (i.e., that one of the
principal strata is empty). The method assumes no interference (i.e.,
potential outcomes of all subjects are unaffected by treatment
assignment of other subjects) and ignorable (i.e., random) treatment
assignment. ACE is identified by assuming values for the sensitivity
parameters beta0
, beta1
, and one of the parameters phi
, psi
, or Pi
.
The sensitivity parameters beta0
and beta1
have a logodds ratio
interpretation (see help for sensitivityGBH
).
Only one of the parameters phi
, psi
, or Pi
should
be specified as all depend on each other. psi
is unrestrained
taking any value on the real line. The other parameters, psi
and Pi
have constraints and there will be estimation problems
if these parameters are set at values outside the of their range of
acceptable values based on the observed data. See Shepherd, Gilbert,
Dupont (in press) for more details.
object of class sensitivity3d
ACE 
array; estimated values of ACE for all combinations of 
ACE.ci 
array; confidence interval determined by 
ACE.var 
array; estimated variance of ACE. Array dimensions the same as 
ACE.p 
vector; estimated pvalue of ACE. 
beta0 
vector; β values used for the first group. 
alphahat0 
vector; estimated α values for the first group. 
Fas0 
function; estimator for the distribution function of y0 in the first group in the always selected stratum. 
beta1 
vector; β values used for the second group. 
alphahat1 
vector; estimated α values for the second group. 
Fas1 
function; estimator for the distribution function of y1 in the second group in the always selected stratum. 
phi 
vector; phi values used. 
Pi 
vector; Pi values used. 
psi 
vector; psi values used. 
ci.map 
list; mapping of confidence interval to quantile probability. Use
numbers contained within as indices to the 
Bryan E. Shepherd
Department of Biostatistics
Vanderbilt University
Charles Dupont
Department of Biostatistics
Vanderbilt University
Jemiai Y (2005), “Semiparametric Methods for Inferring Treatment Effects on Outcomes Defined Only if a PostRandomization Event Occurs,” unpublished doctoral dissertation under the supervision of A. Rotnitzky, Harvard School of Public Health, Dept. of Biostatistics.
Shepherd BE, Redman MW, Ankerst DP (2008), “Does Finasteride affect the severity of prostate cancer? A causal sensitivity analysis,” Journal of the American Statistical Association 2008, 484, 13921404.
Shepherd BE, Gilbert PB, and Dupont CT, “Sensitivity analyses comparing timetoevent outcomes only existing in a subset selected postrandomization and relaxing monotonicity,” Biometrics, in press.
sensitivityGBH
,
sensitivitySGD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23  data(vaccine.trial)
ansJR<with(vaccine.trial,
sensitivityJR(z=treatment,s=hiv.outcome,y=logVL,
beta0=c(1,.5,0,.5,1),
beta1=c(1,.5,0,.5,1),
phi=c(0.95,0.9), selection="infected",
groupings=c("placebo","vaccine"),
N.boot=100)
)
ansJR
data(vaccine.trial)
ansJR<with(vaccine.trial,
sensitivityJR(z=treatment,s=hiv.outcome,y=logVL,
beta0=c(1,.5,0,.5,1),
beta1=c(1,.5,0,.5,1),
phi=c(0.95,0.9), selection="infected",
groupings=c("placebo","vaccine"),
custom.FUN=function(mu0, mu1, ...) mu1  mu0,
upperTest=TRUE, lowerTest=TRUE, twoSidedTest=TRUE,
N.boot=100)
)
ansJR

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.