Learn R Programming

sensitivityPStrat (version 1.0-3)

sensitivityGBH: Principal stratification sensitivity analysis.

Description

Performs a sensitivity analysis using the method described in Gilbert, Bosch, and Hudgens (2003).

Usage

sensitivityGBH(z, s, y, beta, selection, groupings,
               empty.principal.stratum, ci = 0.95,
               ci.method = c("analytic", "bootstrap"), na.rm = FALSE,
               N.boot = 100, interval = c(-100, 100),
               oneSidedTest = FALSE, twoSidedTest = TRUE,
               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.
beta
vector; values of the sensitivity parameter. Inf and -Inf are acceptable.
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.
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.
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
isSlaveMode
logical. Internal Use only. Used in recursion.

Value

  • an object of class sensitivity2d.
  • ACEACE=E(Y(g1)-Y(g0)|S(g1)==S(g0)==selection). Vector of the estimated ACE values for specified beta values.
  • ACE.civector; confidence interval of ACE determined by quantiles of bootstrap if ci.method includes bootstrap. Otherwise calculated using analytic variance with large sample normal approximation.
  • ACE.varvector; estimated variance of ACE.
  • betavector of user-specified beta values
  • alphahatvector of estimated values of alpha
  • y0vector of unique y values 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 y values 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 average causal effect among those who would have been selected regardless of treatment assignment (ACE). 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 monotonicity (i.e., one of the principal strata is empty). ACE is identified by assuming a value of the sensitivity parameter beta, where exp(beta) has an odds ratio interpretation:

If empty.principal.stratum=c(S(g0)==not selected, S(g1)==selected) then given selected if assigned g0, the odds of being selected if assigned g1 multiplicatively increase exp(beta) for every 1-unit increase in Y(g0).

If empty.principal.stratum=c(S(g0)==selected, S(g1)==not selected) then given selected if assigned g1, the odds of being selected if assigned g0 multiplicatively increase exp(beta) for every 1-unit increase in Y(g1).

Specifying beta=-Inf or beta=Inf calls sensitivityHHS.

References

Gilbert PB, Bosch RJ, and Hudgens MG (2003), "Sensitivity Analysis for the Assessment of Causal Vaccine Effects of Viral Load in HIV Vaccine Trials," Biometrics 59, 531-541.

See Also

sensitivityHHS, sensitivityJR, sensitivitySGL

Examples

Run this code
data(vaccine.trial)
ans<-with(vaccine.trial,
          sensitivityGBH(z=treatment,s=hiv.outcome,y=logVL,
                    beta=c(0,.25,.5,.75,1,1.25,1.5),
                    selection="infected",
                    groupings=c("placebo","vaccine"),
                    empty.principal.stratum=c("not infected","infected"),
                    N.boot=100)
         )
ans

ans<-with(vaccine.trial,
          sensitivityGBH(z=treatment,s=hiv.outcome,y=logVL,
                    beta=c(-Inf,-1,-0.75,-0.5,-0.25,0,.25,.5,.75,1,Inf),
                    selection="infected",
                    groupings=c("placebo","vaccine"),
                    empty.principal.stratum=c("not infected","infected"),
                    ci.method="bootstrap",
                    N.boot=100)
         )
ans

Run the code above in your browser using DataLab