Learn R Programming

sensitivityPStrat (version 1.0-3)

sensitivityJR: Principal stratification sensitivity analysis relaxing the monotonicity assumption.

Description

Principal stratification sensitivity analysis relaxing monotonicity as described by Jemiai and Rotnitzky (2005) and implemented by Shepherd, Redman, and Ankerst (2008).

Usage

sensitivityJR(z, s, y, beta0, beta1, phi, Pi, psi,
              selection, groupings,
              ci = 0.95, ci.method = c("analytic","bootstrap"),
              na.rm = FALSE, N.boot = 100, 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.
y
outcome vector. Can be NA for unselected records.
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
selection
The value of s indicating selection.
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.
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. Defaults to c("analytic","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 ACE. Defaults to FALSE
twoSidedTest
logical. Return a two sided confidence interval for ACE. 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 sensitivity3d
  • ACEarray; estimated values of ACE for all combinations of beta0, beta1, and phi/Pi/psi. Array dimensions are length(beta0), length(beta1), length(psi).
  • beta0beta0 values used.
  • beta1beta1 values used.
  • phiphi values used.
  • ACE.ciarray; 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 ACE element.
  • ACE.vararray; estimated variance of ACE. Array dimensions the same as ACE element.

Details

Performs a sensitivity analysis estimating the average causal effect among those who would have been selected regardless of treatment assignment (ACE) without assuming monotonicity (i.e., that one of the principal strata is empty). The method assumes no interference (i.e., potential outcomes of all subjects are unaffected by treatment assignment of other subjects) and ignorable (i.e., random) treatment assignment. ACE 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). 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

Jemiai Y (2005), "Semiparametric Methods for Inferring Treatment Effects on Outcomes Defined Only if a Post-Randomization Event Occurs," unpublished doctoral dissertation under the supervision of A. Rotnitzky, Harvard School of Public Health, Dept. of Biostatistics.

Shepherd BE, Redman MW, Ankerst DP (2008), "Does Finasteride affect the severity of prostate cancer? A causal sensitivity analysis," Journal of the American Statistical Association 2008, 484, 1392-1404. 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

sensitivityGBH, sensitivitySGD

Examples

Run this code
data(vaccine.trial)
ansJR<-with(vaccine.trial,
          sensitivityJR(z=treatment,s=hiv.outcome,y=logVL,
                    beta0=c(-1,-.75,-.5,-.25,0,.25,.5,.75,1),
                    beta1=c(-1,-.75,-.5,-.25,0,.25,.5,.75,1),
                    phi=c(0.95,0.90,0.80), selection="infected",
                    groupings=c("placebo","vaccine"),
                    N.boot=100)
         )
ansJR

Run the code above in your browser using DataLab