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)
NA
for unselected records.
psi
is the log-odds ratio of
selection. Pi
is the probability of being in the always
selected principal stratum ($Pr(S(\var{g0}) = S(\var{g1}) =
selected)$). phi
is the probability of selection in group
g0 given selection in group g1
($Pr(S(\var{g0}) = 1|S(\var{g1}) = 1)$).
s
indicating selection.
c(g0,g1)
; describes to
possible group values. The first element g0 being the value of
z
the delineates the first group, the last element g1
being the value of z
which delineates the second group.
0.95
c("analytic","bootstrap")
ci
element is referring to. Can be upper,
lower, or twoSided. Defaults to
"twoSided"
.
mu0
,
mu1
, p0
, p1
are available to be used as
arguments in the custom function, where
$\code{mu0} = E(Y(\var{g0})|S(\var{g0}) = S(\var{g1}) = selected)$,
$\code{mu1} = E(Y(\var{g1})|S(\var{g0}) = S(\var{g1}) = selected)$,
$\code{p0} = P(S(\var{g0}) = selected)$, and
$\code{p1} = P(S(\var{g1}) = selected)$. The custom function
must return a single value.
NA
values should be removed from the data set.
ci.method
includes bootstrap.
FALSE
FALSE
TRUE
sensitivity3d
beta0
,
beta1
, and phi
, Pi
, psi
. Array
dimensions are length(beta0)
, length(beta1)
,
length(psi)
.
quantile
if
ci.method
includes bootstrap. Otherwise calculated
using analytic variance with large sample normal approximation.
Array dimensions the same as ACE
element.
ACE
element.
SCE.ci
element.
beta0
, beta1
, and one of the parameters phi
, psi
, or Pi
.
The sensitivity parameters beta0
and beta1
have a log-odds 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.
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, 1392-1404. Shepherd BE, Gilbert PB, and Dupont CT, Sensitivity analyses comparing time-to-event outcomes only existing in a subset selected postrandomization and relaxing monotonicity, Biometrics, in press.
sensitivityGBH
,
sensitivitySGD
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
Run the code above in your browser using DataLab