rci | R Documentation |
Computes a repeated confidence interval on the hazard ratio for a group sequential study with a failure-time endpoint.
rci(
time,
status,
rx,
inf,
control = 0,
strat,
conf = 0.95,
use = 1,
crit = NULL
)
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 |
control |
The code of |
strat |
If given, a stratified proportional hazards model is fit, with
strata defined by the unique values of |
conf |
The two-sided confidence coefficient (not needed if |
use |
The type of use-function boundary (not needed if |
crit |
Standard normal deviate to use as a multiplier in the RCI. Not
needed if |
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
.
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.
Jennison and Turnbull (1990). Statistical Science 5:299-317.
sequse
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.