sensitivitySGL: principal stratification sensitivity analysis with time to...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Principal stratification sensitivity analysis with time to event data using the method described by Shepherd, Gilbert, and Lumley (2007).

Usage

1
2
3
4
5
6
7
sensitivitySGL(z, s, d, y, v, beta, tau, time.points, selection, trigger,
               groupings, empty.principal.stratum, followup.time,
               ci=0.95, ci.method = c("analytic", "bootstrap"),
               ci.type="twoSided", custom.FUN = NULL, na.rm = FALSE,
               N.boot = 100L, interval = c(-100, 100),
               upperTest = FALSE, lowerTest = FALSE, twoSidedTest = TRUE,
               verbose = getOption("verbose"), isSlaveMode = FALSE)

Arguments

z

vector; contains the grouping values (e.g., treatment assignment) for each record.

s

vector; indicates whether a record is selected.

d

vector; indicates whether a post-selection event has occurred. Can be NA for unselected records.

y

vector; the length of time from selection until event (d) or censoring. Can be NA for unselected records.

v

numeric vector; the length of time from randomization until selection or censoring.

beta

vector; values of the sensitivity parameter β. Inf and -Inf are acceptable.

tau

maximum observed follow-up time after selection. Selection weights are constant for t>\code{tau}.

time.points

vector; time points, t, at which SCE(\var{t}) will be estimated.

selection

The value of s indicating selection.

trigger

logical; the value of d that denotes the post-selection event.

groupings

Vector of two elements c(g0,g1), 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.

empty.principal.stratum

vector of two elements c(s0,s1); describes the s values that select the empty principal stratum. If empty.principal.stratum=c(s0,s1), then stratum defined by S(\var{g0})=\var{s0} and S(\var{g1})=\var{s1} is the empty stratum. In this example s0 and s1 refer to the two possible values of s. (Note: method only works if \var{s0} != \var{s1}).

followup.time

numeric value; cut-off point for v after which records are lost to censoring.

ci

numeric vector; confidence interval level, defaults to 0.95.

ci.method

character; method by which the confidence interval and variance are calculated. Can be “analytic” or “bootstrap”.

ci.type

character vector; type of confidence interval that the corresponding ci element is referring to. Can be “upper”, “lower”, or “twoSided”. Defaults to "twoSided".

custom.FUN

function; function to calculate custom result. Fas0, Fas1, time.points, p0, p1 are available to be used as arguments in the custom function. The custom function must return a vector of elements that is the same length as time.points.

na.rm

logical; indicates whether records that are invalid due to NA values should be removed from the data set.

N.boot

integer; number of bootstrap repetitions that will be run when ci.method includes “bootstrap”.

interval

numeric vector of length 2. Controls the range limits used to by optimize to estimate α.

lowerTest

logical; Return the lower one sided p-value for SCE. Defaults to FALSE

upperTest

logical; Return the upper one sided p-value for SCE. Defaults to FALSE

twoSidedTest

logical; Return a two sided p-value for SCE. Defaults to TRUE

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.

Details

Performs a sensitivity analysis estimating the “survival causal effect” among those who would have been selected regardless of treatment assignment (SCE). The method assumes no interference (i.e., potential outcomes of all subjects are unaffected by treatment assignment of other subjects), ignorable (i.e., random) treatment assignment, monotonicity (i.e., one of the principal strata is empty), and independent censoring (i.e., time from selection to event is independent of time from selection until censoring). SCE is then identified by assuming a value of the sensitivity parameter β, where exp(β) has an odds ratio interpretation (see help for sensitivityGBH). Given selection in one treatment arm, the probability of selection if in the other treatment arm is assumed to be constant for for T(\code{z})>\code{tau}.

SCE is computed at user specified time points.

Specifying beta=-Inf or beta=Inf estimates the bounds for SCE.

Value

object of class sensitivity2d

SCE

SCE(\var{t})=Pr(T(\var{g0})<=\var{t}|S(\var{g0})=S(\var{g1})=\code{selection}) - Pr(T(\var{g1})<=\var{t}|S(\var{g0})=S(\var{g1})=\code{selection}). Array of the estimated SCE at all time.points for specified beta values. Array dimensions are length(time.points) by length(beta).

SCE.ci

array; confidence interval of SCE determined by quantile if using ci.method includes “bootstrap”. Otherwise calculated using analytic variance with large sample normal approximation. Array dimensions the same as element SCE.

SCE.var

array; estimated variance of SCE. Array dimensions the same as element SCE.

ci.map

list; mapping of confidence interval to quantile probability. Use numbers contained within as indices to the SCE.ci element.

beta

vector of user-specified β values

alphahat

vector of estimated values of α

y0

vector of unique event times in the first group.

Fas0

matrix of estimated empirical distribution function values for y0 in the first group in the always selected principal stratum. Pr(Y(\var{g0}) <= \var{y0}|S(\var{g0})=S(\var{g1})=\code{selection}; β)

y1

vector of unique event times in the second group.

Fas1

matrix of estimated empirical distribution function values for y1 in the second group in the always selected principal stratum. Pr(Y(\var{g1}) <= \var{y1}|S(\var{g0})=S(\var{g1})=\code{selection}; β)

Author(s)

Bryan E. Shepherd
Department of Biostatistics
Vanderbilt University

Charles Dupont
Department of Biostatistics
Vanderbilt University

References

Shepherd BE, Gilbert PB, Lumley T (2007), “Sensitivity analyses comparing time-to-event outcomes existing only in a subset selected postrandomization,” Journal of the American Statistical Association 102, 573-582.

See Also

sensitivityGBH, sensitivityHHS, sensitivitySGD, Surv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
data(vaccine.trial)
sens.time<-with(vaccine.trial,
                sensitivitySGL(z=treatment, s=hiv.outcome, y=followup.yearsART,
                          d=ARTinitiation, beta=c(.25, 0,-.25), tau=3,
                          time.points=c(2,3), selection="infected",
                          trigger="initiated ART", groupings=c("placebo","vaccine"),
                          empty.principal.stratum=c("not infected","infected"),
                          N.boot=50, interval=c(-200,200),
                          upperTest=TRUE, lowerTest=TRUE, twoSidedTest=TRUE)
               )
sens.time

sens.time2<-with(vaccine.trial,
                sensitivitySGL(z=treatment, s=hiv.outcome, y=followup.yearsART,
                          d=ARTinitiation, beta=c(.25, 0,-.25), tau=3,
                          time.points=c(2,3), selection="infected",
                          trigger="initiated ART", groupings=c("placebo","vaccine"),
                          empty.principal.stratum=c("not infected","infected"),
                          custom.FUN=function(Fas0,Fas1,time.points,
                ...) { Fas0(time.points) - Fas1(time.points) },
                          N.boot=50, interval=c(-200,200))
               )
sens.time2

sens.time3<-with(vaccine.trial,
                sensitivitySGL(z=treatment, s=hiv.outcome, y=followup.yearsART,
                          d=ARTinitiation, beta=c(-Inf,.25,0,-.25,Inf),
                          tau=3, time.points=c(2,3), selection="infected",
                          trigger="initiated ART", groupings=c("placebo","vaccine"),
                          empty.principal.stratum=c("not infected","infected"),
                          custom.FUN=function(Fas0,Fas1,time.points,
                ...) { Fas0(time.points) - Fas1(time.points) },
                          N.boot=50, interval=c(-200,200))
               )
sens.time3

sensitivityPStrat documentation built on May 2, 2019, 3:37 p.m.