Learn R Programming

gsearly (version 1.0.0)

gsearlyModel: Model based estimates of sample size and power for group sequential designs with early outcomes

Description

Provides sample sizes and power for group sequential designs with early outcomes defined by a recruitment and correlation model, recruitment period and interim analysis time-points.

Usage

gsearlyModel(rmodel="fix", trecruit, s, tfu, tinterims, pow=0.9, n=NULL,
        theta, tref=c(1,2), vphi=0.5, m=2, cmodel="uniform", sd=1, rho=0.5,
        fp, tn, treatnames=c("control", "treat"),
        sopt=list(r=18, bisect=list(min=20, max=10000, niter=1000, tol=0.001)))

Value

An object of class gsearly is a list containing the following components.

title

Package title and version number.

call

Call to gsearlyModel.

rdata

A list of the recruitment model (rmodel), the recruitment period (trecruit), the number of follow-up time-points (s), the follow-up time points (tfu), on the scale of trecruit (tfu$tfu) and on the standardized scale (tfu$stfu), the study sample size (n) for the control and treatment groups and the total (control, treat, total), the weight for the unequal group sizes (vphi), the recruitment model parameter (m), the interims analyses time-points (tinterims), in the units of trecruit, and the numbers of study participants recruited and with outcome data at each of the interims (interims).

idata

A list of the correlation model (cmodel), consisting of the correlation model type (cmodel$type), parameter (cmodel$rho) and correlation matrix (cmodel$corrmat), the standard deviation (sd), interim and final analysis times (tinterims) and the information fraction (tau) and variance of the treatment effect estimate (vbeta) at times tinterims.

power

A list of the total number of the looks (nlooks), treatment effect (theta), the target power (setpow), the false positive (fp) and true negative rates (tn), the lower (lowerror) and upper (upperror) boundaries and stopping probabilities (bound, prob) for each look and the total stopping probabilities (totalerror) summed across looks (futility, efficacy).

Arguments

rmodel

Recruitment model, options are c("fix", "dlin", "ilin", "dquad", "iquad", "dilin", "idlin", "diquad", "idquad", "filin", "fdlin", "ilinf", "dlinf") with default="fix".

trecruit

The recruitment period (an integer >1) which is used to define the base units for all analyses and plotting functions (which are on a scale of 1:trecruit) and is usually the smallest practical study time unit; e.g. if trecruit=30 months, then tinterims and tfu should also be set in units of months.

s

The study outcome is observed at a sequence of s occasions, with s - 1 early outcomes. An integer value, 2 <= s <= 10, the upper limit is purely for reasons of practical implementation.

tfu

A vector of length s, of follow-up time points, in the same units as trecruit.

tinterims

A vector of ordered numeric interim analysis time-points, in the same units as trecruit.

pow

The study target power. If n is set, then this is ignored and the study power is reported.

n

The total study sample size (control + treatment groups). If this is set to NULL then the bisection algorithm is used to find n to give power pow.

theta

The treatment effect, in the same units as sd. Current implementation forces a positive value for theta.

tref

A vector of integers of length 2 that defines the correlation parameter rho for the exponential model; the parameter rho is the correlation between data at times tfu[tref[1]] and tfu[tref[2]], with default c(1,2); see tfuStandard.

vphi

A weight for unequal group sizes 0 < vphi < 1 where the ratio of control to treatment group participants is vphi / (1 - vphi), with default of 0.5 (equal group sizes).

m

A parameter (1 <= m < Inf) that sets the recruitment model breakpoint for those models that have two phases (e.g. "diquad" or "dilin"). Ignored for models that do not have two phases.

cmodel

The correlation model is set to either "uniform" or "exponential"; see corrExp, corrUnif.

sd

The standard deviation (0 < sd < Inf) of the outcome, that is assumed to be the same in both arms and at each time-point.

rho

The correlation parameter (0 <= rho < 1) associated with correlation model cmodel.

fp

A vector (of length tinterims + 1) of false positive rates; see Examples.

tn

A vector (of length tinterims + 1) of true negative rates; see Examples.

treatnames

Names used for the two study groups, referred to elsewhere as the first (or 0) and second (or 1) groups, with default c("control","treat").

sopt

List of settings for the gsBound and gsProbability functions in the gsDesign package and settings for the bisection algorithm with default list(r=18, bisect=list(min=20, max=10000, niter=1000, tol=0.001)). The min, max, niter and tol settings represent the minimum and maximum starting points, maximum number of iterations and tolerance for the bisection algorithm.

See Also

expectSampsize, fixedSampsize, roundInterims, corrExp, corrUnif

Examples

Run this code

 # RCT planning:

 # Recruitment is expected to take 36 months (trecruit) with three
 # follow-up times (s) for outcomes at 3, 6 and 12 months (tfu) and
 # interim analyses (tinterims) at 18 and 30 months.
 # Study procedures and experience suggest that "dilin" (m=2) is likely
 # to be a good approximation to temporal patterns of recruitment and data
 # accrual (rmodel). Correlations between outcomes at 3, 6 and 12 are
 # assumed to follow a uniform model (cmodel) with parameter  (rho) set to 0.5.
 # Randomisation to the two study arms will be on a 1:1 basis (vphi=0.5).
 # The standard deviation of the final 12m outcome is expected to be 20,
 # and the anticipated treatment effect (theta) 8.

 # Primary interest for the RCT is in stopping early for futility.
 # Therefore the following values for the false positive and true
 # negative rates were selected.
 # Vectors of cumulative probabilities for crossing boundaries under the
 # null hypothesis (of no treatment difference).
 fp <- c(0.0000,0.0010,0.0250)
 tn <- c(0.2400,0.7200,0.9750)

 # For 90 percent power (pow), a call to gsearlyModel provides a feasible design
 rctdesign <- gsearlyModel(rmodel="dilin", trecruit=36, s=3, tfu=c(3,6,12),
                   tinterims=c(18,30), pow=0.9, vphi=0.5, m=2,
                   cmodel="uniform", sd=20, rho=0.5, theta=8, fp=fp, tn=tn)
 rctdesign

 # If n is set, rather than pow, then we can explore power for lower n
 update(rctdesign, n=136)

 # Expected numbers of participants at interim analyses
 rctdesign$rdata$interims

 # Information at these interims and final analysis
 rctdesign$idata$interims

 # Upper and lower stopping boundaries and probabilities
 rctdesign$power$lowerror
 rctdesign$power$upperror

Run the code above in your browser using DataLab