Learn R Programming

sensitivityPStrat (version 1.0-3)

sensitivityHHS: principal stratifictation sensitivity analysis using the HHS method.

Description

Performs a principal stratifictation sensitivity analysis using the method described in Hudgens, Hoering, and Self (2003).

Usage

sensitivityHHS(z, s, y, bound = c("upper", "lower"), selection,
               groupings, empty.principal.stratum, ci = 0.95,
               ci.method = c("bootstrap", "analytic"), na.rm = FALSE,
               N.boot = 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.
bound
vector selecting which bound should be calculated, upper and/or lower. Partial string matching is performed.
selection
The value of s indicating selection.
groupings
Vector of two elements c(g0,g1), first element g0 being the value of z which 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"). 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.
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 at the specified bounds.
  • 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 (NOT YET WORKING).
  • ACE.varvector; estimated variance of ACE.
  • 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 at the bounds. Pr(Y(g0) <= y0|s(g0)="S(g1)=selection)
  • 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 at the bounds. Pr(Y(g1) <= y1|s(g0)="S(g1)=selection)

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 still not identified after making these assumptions, so this method computes the lower and upper bounds of the estimated ACE. These bounds correspond to the values one would get if using sensitivityGBH and specifying the sensitivity parameter beta as -Inf or Inf.

References

Hudgens MG, Hoering A, and Self SG (2003), "On the Analysis of Viral Load Endpoints in HIV Vaccien Trials," Statistics in Medicine 22, 2281-2298.

See Also

sensitivityGBH, sensitivityJR, sensitivitySGL

Examples

Run this code
data(vaccine.trial)
est.bounds<-with(vaccine.trial,
                 sensitivityHHS(z=treatment, s=hiv.outcome, y=logVL,
                     selection="infected", groupings=c("placebo","vaccine"),
                     empty.principal.stratum=c("not infected","infected"),
                     N.boot=100)
                )
est.bounds

Run the code above in your browser using DataLab