Learn R Programming

sensitivityPStrat (version 1.0-3)

sensitivitySGL: principal stratification sensitivity analysis with time to event data

Description

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

Usage

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"), 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.
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.
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.

Value

  • object of class sensitivity2d
  • SCESCE(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.ciarray; 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.vararray; estimated variance of SCE. Array dimentions the same as element SCE.
  • betavector of user-specified beta values
  • alphahatvector of estimated values of alpha
  • y0vector of unique event times in the first group.
  • Fas0matrix 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)<="" description="">
  • y1vector of unique event times in the second group.
  • Fas1matrix 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)<="" description="">

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.

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

Run this code
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

Run the code above in your browser using DataLab