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"),
               custom.FUN = NULL, na.rm = FALSE,
               N.boot = 100L, interval = c(-100, 100),
               oneSidedTest = 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>tau.

time.points

vector; time points, t, at which SCE(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(g0)==s0 and S(g1)==s1 is the empty stratum. In this example s0 and s1 refer to the two possible values of s. (Note: method only works if s0 != 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”.

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 optimise to estimate alphahat.

oneSidedTest

logical. Return a one sided confidence interval for SCE(t). Defaults to FALSE.

twoSidedTest

logical. Return a two sided confidence interval for SCE(t). Defaults to TRUE.

verbose

logical; prints dots when bootstrapping to show that something is happening.

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 beta, where exp(beta) 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(z)>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(t)=Pr(T(g0)<=t|S(g0)=S(g1)=selection) - Pr(T(g1)<=t|S(g0)=S(g1)=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 “bootstrap”. Otherwise calculated using analytic variance with large sample normal approximation. Array dimentions the same as element SCE.

SCE.var

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

beta

vector of user-specified beta values

alphahat

vector of estimated values of alpha

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(g0) <= y0|S(g0)=S(g1)=selection; beta)

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(g1) <= y1|S(g0)=S(g1)=selection; beta)

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
data(vaccine.trial)
sens.time<-with(vaccine.trial,
                sensitivitySGL(z=treatment, s=hiv.outcome, y=followup.yearsART,
                          d=ARTinitiation, beta=c(.25, 0,-.25,-.5), 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=100, interval=c(-200,200))
               )
sens.time

sens.time2<-with(vaccine.trial,
                sensitivitySGL(z=treatment, s=hiv.outcome, y=followup.yearsART,
                          d=ARTinitiation, beta=c(.25, 0,-.25,-.5), 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=100, interval=c(-200,200))
               )
sens.time2

sensitivityPStrat documentation built on May 2, 2019, 5:14 p.m.