condpowcure: Perform Simulation to Calculate Conditional Power of a...

View source: R/condpowcure.R

condpowcureR Documentation

Perform Simulation to Calculate Conditional Power of a Logrank Test

Description

Performs a simulation to calculate conditional power of a logrank test in a group sequential experiment with failure times generated from a cure rate model.

Usage

condpowcure(
  time,
  status,
  rx,
  nsamp = 500,
  crit.val = 1.96,
  control = 0,
  control.cure,
  control.rate,
  test.cure,
  test.rate,
  inf.time = 1,
  total.inf,
  add.acc = 0,
  add.acc.period,
  p.con = 0.5
)

Arguments

time

Failure/censoring times in the current data

status

failure indicator for current data (1=failure, 0=censored)

rx

treatment variable in current data

nsamp

number of samples to generate in the simulation

crit.val

critical values to be used at future analyses

control

the code of rx for the control group

control.cure

the cure fraction in the control group

control.rate

the failure rate in the conditional exponential distribution for non-cured subjects in the control group

test.cure

the cure fraction in the experimental treatment group

test.rate

the failure rate in the conditional exponential distribution for non-cured subjects in the experimental treatment group

inf.time

information times of future analyses

total.inf

Number of failures at full information

add.acc

Additional number of cases that will be accrued

add.acc.period

Duration of time over which the add.acc cases will be accrued

p.con

The proportion randomized to the control group

Details

Adds add.acc cases and generates additional follow-up for subjects already entered but censored in the current data. Failure times are generated from exponential cure rate models, with fractions control.cure and test.cure that will never fail and exponential distributions for the failure times of those who will eventually fail.

Additional interim analyses are performed when inf.time * total.inf failures are observed. The critical values used for rejecting the null at these additional interim analyses are specified in crit.value. The number of additional analyses is the length of inf.time and crit.value. The information of the current data should not be included. Full information (inf.time = 1) must be explicitly included. Information times should be in increasing order.

After generating the additional data, the function performs the interim analyses, and determines whether the upper boundary is crossed. This is repeated nsamp times, giving an estimate of the probability of eventually rejecting the null under the specified distributions, conditional on the current data. Low conditional power under the target alternative for the study might be justification for stopping early.

It is very important that consistent time units be used for all arguments and for the current data.

Value

Returns the proportion of samples where the upper boundary was crossed, and its simulation standard error. Also prints the value of the logrank statistic for the current data.

References

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

Betensky (1997). Biometrics, 53:794-806.

See Also

condpow; sequse; acondpow

Examples

## current data
set.seed(3)
ft <- c(ifelse(runif(100) < 0.6, rexp(100), 100), ifelse(runif(100) < 0.55,
        rexp(100) / 0.95, 100))
ct <- runif(200) * 4
fi <- ifelse(ct < ft, 0, 1)
ft <- pmin(ft, ct)
rx <- c(rep(0, 100), rep(1, 100))

## currently at 0.375 information -- assume no prior interim analyses
critv <- sequse(c(0.375, 0.7, 1))[-1]

condpowcure(ft, fi, rx, nsamp = 10, crit.val = critv, control.cure = 0.4,
            control.rate = 1, test.cure = 0.6, test.rate = 0.75,
            inf.time = c(0.7, 1), total.inf = 200, add.acc = 200, add.acc.period = 1)

## Not run: 
## use larger nsamp in practice:
condpowcure(ft, fi, rx, nsamp = 1000, crit.val = critv, control.cure = 0.4,
            control.rate = 1, test.cure = 0.6, test.rate = 0.75,
            inf.time = c(0.7, 1), total.inf = 200, add.acc = 200, add.acc.period = 1)
## Observed Z = 1.43
## [1] 0.958

## End(Not run)


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