powlgrnk6: Calculate the Power of a Group Sequential Logrank Test

View source: R/powlgrnk6.R

powlgrnk6R Documentation

Calculate the Power of a Group Sequential Logrank Test

Description

Performs a simulation to calculate the power of a group sequential logrank test using an error spending rate function upper boundary with repeated confidence intervals for early stopping in favor of the null hypothesis. Assumes exponential distributions for the failure times.

Usage

powlgrnk6(
  Npg,
  control.rate,
  test.rate,
  acc.per,
  total.inf,
  anal.int,
  min.inf = 0.25,
  nsamp = 5000,
  alpha = 0.025,
  conf = 1 - 2 * alpha,
  ratio = control.rate/test.rate,
  use = 1,
  use.rci = use,
  trunc = alpha/50,
  gft = function(rx, cr, tr, ...) rexp(length(rx))/(c(cr, tr)[rx + 1]),
  ...
)

Arguments

Npg

Planned number of subjects in the each treatment group (control and experimental)

control.rate

Exponential failure rate for the control group

test.rate

Exponential failure rate for the experimental treatment group

acc.per

Length of time over which the 2*Npg subjects will be accrued

total.inf

Total number of failures at full information

anal.int

The length of time between planned interim analyses

min.inf

The minimum information that must be available at the first interim analysis

nsamp

number of samples to generate in the simulation

alpha

One-sided significance level for rejecting the null hypothesis, expressed as a proportion (rather than a percent)

conf

The two-sided confidence level (proportion) for the repeated confidence interval used for early stopping in favor of the null. If conf <=0 or >=1 then the RCI is not used.

ratio

The study will be stopped in favor of the null when the upper RCI on the hazard ratio (control/experimental) < ratio

use

The type of boundary used in sequse for the upper boundary

use.rci

The type of boundary used in sequse for the RCI

trunc

If 0<trunc<1, then the upper boundary is truncated at the significance level given by trunc; that is, if the nominal significance level of the upper boundary is < trunc, the critical value corresponding to trunc is used instead. The default is .0005 when alpha=.025.

gft

Function to generate a sample of failure times. Default uses exponential distributions with rates control.rate for the control group and test.rate for the experimental treatment group

...

Additional arguments to gft()

Details

Performs a simulation to estimate the rejection probability under the specified failure rates of a group sequential logrank test. 2*Npg subjects will be accrued uniformly over acc.per time units, and followed until total.inf failures are available. The first interim analysis is performed when at least total.inf*min.inf failures are available. Following that, interim analyses are performed every anal.int units of time. The final analysis is performed at total.inf failures, even if that does not occur at an otherwise scheduled analysis. It is extremely important that the time units used in the values of control.rate, test.rate, acc.per, and anal.int be the same (eg all in years and number events per year). The upper boundary for rejecting the null hypothesis is obtained from the sequse function, using the boundary of type use. The study will be stopped early in favor of the null hypothesis if the upper RCI on the hazard ratio (control/experimental) is < ratio (that is, if the target difference falls outside the RCI). The confidence level and the shape of the boundary of the RCI can be different in the RCI than in the upper boundary.

The truncated boundary with use=6 is different (and probably preferred) to the default settings with use=1 and trunc=alpha/50. The latter takes the standard O'Brien-Fleming boundary and truncates it at early analyses with no other adjustment, giving a test of slightly inflated size. The amount of the inflation is generally negligible, though (see Freidlin, Korn and George, 1999). Using use=6 truncates the boundary at alpha/50 (do not specify a larger value of trunc), but adjusts the rest of the boundary to give the correct size.

Failure distributions other than the exponential can be used by providing a function to generate samples from the desired distribution via the gft argument. This function will be called as gft(rx,control.rate,test.rate,...), where rx is a vector of length 2*Npg, coded 0 for the control group and 1 for the experimental treatment group, control.rate and test.rate are the values given in the call to powlgrnk6, and ... can be used to pass additional arguments to gft(). While any distributions can be used, it should be noted that the logrank test and RCI methodology are probably only appropriate when the study is targeting a proportional hazards alternative.

Value

Returns a 5 x nsamp matrix giving the results for each sample in the corresponding column, of class ‘powlgrnk6’. The first row gives a code indicating the type of stopping that occurred (1=crossed upper boundary, 2=stopped in favor of the null, 3=reached full information without crossing either boundary), the second gives the logrank test statistic at the analysis where the study stopped (on the standard normal scale), the third gives the information time when the study stopped, the 4th the number of time units from the start of the study until the study was stopped, and the 5th gives the total number of interim analyses performed (including at full information, if reached).

References

Freidlin, Korn and George, 1999. Controlled Clinical Trials 20:395-407.

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

See Also

sequse; rci; print.powlgrnk6; seqopr; seqss

Examples

## power under the alternative; 7 years accrual, analyses every 1/2 year
## one-sided 0.025 test, with an 80% RCI used for early stopping in
## favor of H0
## use larger nsamp (examples for illustration only)
out <- powlgrnk6(210, 0.11889, 0.11889 / 1.5, 7, 233, 0.5, nsamp = 10, conf = 0.80)
table(out[1, ]) / ncol(out)
apply(out[3:5, ], 1, mean)
out

## size under H0; note specification of ratio to keep the stopping rule
## the same as under the alternative
out <- powlgrnk6(210, 0.11889, 0.11889, 7, 233, 0.5, nsamp = 10,
                 conf = 0.80, ratio = 1.5)
table(out[1, ]) / ncol(out)
apply(out[3:5, ], 1, mean)

## power without RCI
out <- powlgrnk6(210, 0.11889, 0.11889 / 1.5, 7, 233, 0.5, nsamp = 10, conf = 1)
table(out[1, ]) / ncol(out)
apply(out[3:5, ], 1, mean)

## size without truncation
out <- powlgrnk6(210, 0.11889, 0.11889, 7, 233, 0.5, nsamp = 10,
                 conf = 0.80, ratio = 1.5, trunc=0)
table(out[1, ]) / ncol(out)
apply(out[3:5, ], 1, mean)


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