sensitivitySGD: 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 relaxing monotonicity as described by Shepherd, Gilbert, and Dupont (in press).

Usage

1
2
3
4
5
6
7
8
9
sensitivitySGD(z, s, d, y, v, beta0, beta1, phi, Pi, psi, tau,
               time.points, selection, trigger, groupings,
               followup.time,
               ci=0.95, ci.method = c("bootstrap", "analytic"),
               custom.FUN = NULL, na.rm = FALSE, N.boot = 100L,
               N.events = NULL, interval = c(-100, 100),
               oneSidedTest = FALSE, twoSidedTest = TRUE, inCore = TRUE,
               verbose = getOption("verbose"), colsPerFile = 1000L,
               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.

beta0

vector; values of the sensitivity parameter linking outcome in group g0 with selection if assigned group g1.

beta1

vector; values of the sensitivity parameter linking outcome in group g1 with selection if assigned group g0.

phi, Pi, psi

vectors; sensitivity parameters specifying the joint distribution of S(g0), S(g1). Only one of the three parameters should be specified. psi is the log-odds ratio of selection. Pi is the probability of being in the always selected principal stratum (Pr(S(g0)=S(g1)=selected)). phi is the probability of selection in group g0 given selection in group g1 (Pr(S(g0)=1|S(g1)=1)).

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.

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”. Currently only works for “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”.

N.events

integer; number of selection-events (S) for each bootstrap replication when doing selection-event based bootstrapping.

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.

inCore

logical; running in memory if TRUE, running with scratch files if FALSE. Default is TRUE. For large data analysis, the user may want to switch this to FALSE to make computations faster.

colsPerFile

integer; number of columns of the scratch file to process in each pass (e.g., 100 columns).

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) without assuming monotonicity (i.e., that one of the principal stratum is empty). 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, and independent censoring (i.e., time from selection to event is independent of time from selection until censoring). SCE 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 log-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.

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.

Value

object of class sensitivity3d

SCE

array; Calculated values of SCE for all combinations of the values from beta0, beta1, phi/Pi/psi, and time.points. Array dimensions are length(time.points), length(beta0), length(beta1), length(psi).

beta0

beta0 values used.

beta1

beta1 values used.

psi

psi values used.

SCE.ci

array; Confidence interval of the SCE value. Confidence interval determined by quantile if using ci.method “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.

Author(s)

Bryan E. Shepherd
Department of Biostatistics
Vanderbilt University

Charles Dupont
Department of Biostatistics
Vanderbilt University

References

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.

See Also

sensitivitySGL, sensitivityJR, 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
data(vaccine.trial)
sens.analysis<-with(vaccine.trial,
                sensitivitySGD(z=treatment, s=hiv.outcome, y=followup.yearsART,
                          d=ARTinitiation, beta0=c(0,-.25,-.5),
                          beta1=c(0, -.25, -.5), phi=c(0.95, 0.90), tau=3,
                          time.points=c(2,3), selection="infected",
                          trigger="initiated ART",
                          groupings=c("placebo","vaccine"), ci=.95,
                          ci.method="bootstrap", N.boot=100)
               )
sens.analysis


sens.analysis2<-with(vaccine.trial,
                sensitivitySGD(z=treatment, s=hiv.outcome, y=followup.yearsART,
                          d=ARTinitiation, beta0=c(0,-.25,-.5),
                          beta1=c(0, -.25, -.5), phi=c(0.95, 0.90), tau=3,
                          time.points=c(2,3), selection="infected",
                          trigger="initiated ART",
                          groupings=c("placebo","vaccine"), ci=.95,
                          custom.FUN=function(Fas0,Fas1,...,time.points) {
                            Fas0(time.points) - Fas1(time.points)
                          },
                          ci.method="bootstrap", N.boot=100)
               )
sens.analysis2

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