rci: Repeated Confidence Interval

View source: R/rci.R

rciR Documentation

Repeated Confidence Interval

Description

Computes a repeated confidence interval on the hazard ratio for a group sequential study with a failure-time endpoint.

Usage

rci(
  time,
  status,
  rx,
  inf,
  control = 0,
  strat,
  conf = 0.95,
  use = 1,
  crit = NULL
)

Arguments

time

Vector of failure/censoring times

status

Vector of failure indicators (1=failure, 0=censored)

rx

Treatment variable

inf

Information times of the previous and current interim analyses (not needed if crit specified)

control

The code of rx that corresponds to the control group

strat

If given, a stratified proportional hazards model is fit, with strata defined by the unique values of strat

conf

The two-sided confidence coefficient (not needed if crit specified)

use

The type of use-function boundary (not needed if crit specified)

crit

Standard normal deviate to use as a multiplier in the RCI. Not needed if inf and use are specified

Details

Computes a repeated confidence interval on the hazard ratio. The ratio is of experimental/control, so values < 1 indicate that the experimental treatment is better (has lower hazard). The hazard ratio is estimated from the Cox proportional hazards model. Note that the RCI is on the hazard ratio scale, not the log scale.

The user can either specify the type of use function boundary use (see sequse for definitions), the information times of the previous and current interim analyses inf, and the confidence level conf, or can specify the boundary critical value on the standard normal scale at the current information time crit.

Value

Returns a vector of length 4 giving the lower confidence limit on the hazard ratio, the estimated ratio, the upper confidence limit, and the critical value on the standard normal scale at the current analysis.

References

Jennison and Turnbull (1990). Statistical Science 5:299-317.

See Also

sequse

Examples

set.seed(3)
ft <- c(rexp(100), rexp(100) / 0.67)
ct <- runif(200) * 3
fi <- ifelse(ct < ft, 0, 1)
ft <- pmin(ft, ct)
rx <- c(rep(0, 100), rep(1, 100))
rci(ft, fi, rx, inf = c(0.25, 0.54))
rci(ft, fi, rx, crit = 2.4)


raredd/desmon documentation built on May 7, 2024, 3:46 p.m.