Learn R Programming

sensitivityPStrat (version 1.0-3)

sensitivitySGD: principal stratification sensitivity analysis with time to event data relaxing monotonicity assumption.

Description

Principal stratification sensitivity analysis with time to event data relaxing monotonicity as described by Shepherd, Gilbert, and Dupont (in press).

Usage

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

Value

  • object of class sensitivity3d
  • SCEarray; 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).
  • beta0beta0 values used.
  • beta1beta1 values used.
  • psipsi values used.
  • SCE.ciarray; 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.vararray; estimated variance of SCE. Array dimensions the same as element SCE.

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.

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

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

Run the code above in your browser using DataLab