nSurv: Advanced time-to-event sample size calculation In gsDesign: Group Sequential Design

Description

nSurv() is used to calculate the sample size for a clinical trial with a time-to-event endpoint and an assumption of proportional hazards. This set of routines is new with version 2.7 and will continue to be modified and refined to improve input error checking and output format with subsequent versions. It allows both the Lachin and Foulkes (1986) method (fixed trial duration) as well as the Kim and Tsiatis(1990) method (fixed enrollment rates and either fixed enrollment duration or fixed minimum follow-up). Piecewise exponential survival is supported as well as piecewise constant enrollment and dropout rates. The methods are for a 2-arm trial with treatment groups referred to as experimental and control. A stratified population is allowed as in Lachin and Foulkes (1986); this method has been extended to derive non-inferiority as well as superiority trials. Stratification also allows power calculation for meta-analyses. gsSurv() combines nSurv() with gsDesign() to derive a group sequential design for a study with a time-to-event endpoint.

print(), xtable() and summary() methods are provided to operate on the returned value from gsSurv(), an object of class gsSurv. print() is also extended to nSurv objects. The functions gsBoundSummary (data frame for tabular output), xprint (application of xtable for tabular output) and summary.gsSurv (textual summary of gsDesign or gsSurv object) may be preferred summary functions; see example in vignettes. See also gsDesign print, summary and table summary functions for output of tabular summaries of bounds for designs produced by gsSurv().

Both nEventsIA and tEventsIA require a group sequential design for a time-to-event endpoing of class gsSurv as input. nEventsIA calculates the expected number of events under the alternate hypothesis at a given interim time. tEventsIA calculates the time that the expected number of events under the alternate hypothesis is a given proportion of the total events planned for the final analysis.

Details

nSurv() produces an object of class nSurv with the number of subjects and events for a set of pre-specified trial parameters, such as accrual duration and follow-up period. The underlying power calculation is based on Lachin and Foulkes (1986) method for proportional hazards assuming a fixed underlying hazard ratio between 2 treatment groups. The method has been extended here to enable designs to test non-inferiority. Piecewise constant enrollment and failure rates are assumed and a stratified population is allowed. See also nSurvival for other Lachin and Foulkes (1986) methods assuming a constant hazard difference or exponential enrollment rate.

When study duration (T) and follow-up duration (minfup) are fixed, nSurv applies exactly the Lachin and Foulkes (1986) method of computing sample size under the proportional hazards assumption when For this computation, enrollment rates are altered proportionately to those input in gamma to achieve the power of interest.

Given the specified enrollment rate(s) input in gamma, nSurv may also be used to derive enrollment duration required for a trial to have defined power if T is input as NULL; in this case, both R (enrollment duration for each specified enrollment rate) and T (study duration) will be computed on output.

Alternatively and also using the fixed enrollment rate(s) in gamma, if minimum follow-up minfup is specified as NULL, then the enrollment duration(s) specified in R are considered fixed and minfup and T are computed to derive the desired power. This method will fail if the specified enrollment rates and durations either over-powers the trial with no additional follow-up or underpowers the trial with infinite follow-up. This method produces a corresponding error message in such cases.

The input to gsSurv is a combination of the input to nSurv() and gsDesign(). While this routine may change in the future, it is likely to be backwards compatible with the current version.

nEventsIA() is provided to compute the expected number of events at a given point in time given enrollment, event and censoring rates. The routine is used with a root finding routine to approximate the approximate timing of an interim analysis. It is also used to extend enrollment or follow-up of a fixed design to obtain a sufficient number of events to power a group sequential design.

Value

nSurv() returns an object of type nSurv with the following components:

 alpha As input. sided As input. beta Type II error; if missing, this is computed. power Power corresponding to input beta or computed if output beta is computed. lambdaC As input. etaC As input. etaE As input. gamma As input unless none of the following are NULL: T, minfup, beta; otherwise, this is a constant times the input value required to power the trial given the other input variables. ratio As input. R As input unless T was NULL on input. S As input. T As input. minfup As input. hr As input. hr0 As input. n Total expected sample size corresponding to output accrual rates and durations. d Total expected number of events under the alternate hypothesis. tol As input, except when not used in computations in which case this is returned as NULL. This and the remaining output below are not printed by the print() extension for the nSurv class. eDC A vector of expected number of events by stratum in the control group under the alternate hypothesis. eDE A vector of expected number of events by stratum in the experimental group under the alternate hypothesis. eDC0 A vector of expected number of events by stratum in the control group under the null hypothesis. eDE0 A vector of expected number of events by stratum in the experimental group under the null hypothesis. eNC A vector of the expected accrual in each stratum in the control group. eNE A vector of the expected accrual in each stratum in the experimental group. variable A text string equal to "Accrual rate" if a design was derived by varying the accrual rate, "Accrual duration" if a design was derived by varying the accrual duration, "Follow-up duration" if a design was derived by varying follow-up duration, or "Power" if accrual rates and duration as well as follow-up duration was specified and beta=NULL was input.

gsSurv() returns much of the above plus an object of class gsDesign in a variable named gs; see gsDesign for general documentation on what is returned in gs. The value of gs$n.I represents the number of endpoints required at each analysis to adequately power the trial. Other items returned by gsSurv() are:  gs A group sequential design (gsDesign) object. lambdaC As input. etaC As input. etaE As input. gamma As input unless none of the following are NULL: T, minfup, beta; otherwise, this is a constant times the input value required to power the trial given the other input variables. ratio As input. R As input unless T was NULL on input. S As input. T As input. minfup As input. hr As input. hr0 As input. eNC Total expected sample size corresponding to output accrual rates and durations. eNE Total expected sample size corresponding to output accrual rates and durations. eDC Total expected number of events under the alternate hypothesis. eDE Total expected number of events under the alternate hypothesis. tol As input, except when not used in computations in which case this is returned as NULL. This and the remaining output below are not printed by the print() extension for the nSurv class. eDC A vector of expected number of events by stratum in the control group under the alternate hypothesis. eDE A vector of expected number of events by stratum in the experimental group under the alternate hypothesis. eDC0 A vector of expected number of events by stratum in the control group under the null hypothesis. eDE0 A vector of expected number of events by stratum in the experimental group under the null hypothesis. eNC A vector of the expected accrual in each stratum in the control group. eNE A vector of the expected accrual in each stratum in the experimental group. variable A text string equal to "Accrual rate" if a design was derived by varying the accrual rate, "Accrual duration" if a design was derived by varying the accrual duration, "Follow-up duration" if a design was derived by varying follow-up duration, or "Power" if accrual rates and duration as well as follow-up duration was specified and beta=NULL was input. nEventsIA() returns the expected proportion of the final planned events observed at the input analysis time minus target when simple=TRUE. When simple=FALSE, nEventsIA returns a list with following components:  T The input value tIA. eDC The expected number of events in the control group at time the output time T. eDE The expected number of events in the experimental group at the output time T. eNC The expected enrollment in the control group at the output time T. eNE The expected enrollment in the experimental group at the output time T. tEventsIA() returns Author(s) Keaven Anderson [email protected] References Kim KM and Tsiatis AA (1990), Study duration for clinical trials with survival response and early stopping rule. Biometrics, 46, 81-92 Lachin JM and Foulkes MA (1986), Evaluation of Sample Size and Power for Analyses of Survival with Allowance for Nonuniform Patient Entry, Losses to Follow-Up, Noncompliance, and Stratification. Biometrics, 42, 507-519. Schoenfeld D (1981), The Asymptotic Properties of Nonparametric Tests for Comparing Survival Distributions. Biometrika, 68, 316-319. See Also gsBoundSummary, xprint,gsDesign package overview, Plots for group sequential designs, gsDesign, gsHR, nSurvival Examples   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 # vary accrual rate to obtain power nSurv(lambdaC=log(2)/6, hr=.5, eta=log(2)/40,gamma=1, T=36, minfup = 12) # vary accrual duration to obtain power nSurv(lambdaC=log(2)/6, hr=.5, eta=log(2)/40, gamma=6, minfup = 12) # vary follow-up duration to obtain power nSurv(lambdaC=log(2)/6, hr=.5, eta=log(2)/40, gamma=6, R=25) # piecewise constant enrollment rates (vary accrual duration) nSurv(lambdaC=log(2)/6, hr=.5, eta=log(2)/40, gamma=c(1,3,6), R=c(3,6,9), minfup=12) # stratified population (vary accrual duration) nSurv(lambdaC=matrix(log(2)/c(6,12),ncol=2), hr=.5, eta=log(2)/40, gamma=matrix(c(2,4),ncol=2), minfup=12) # piecewise exponential failure rates (vary accrual duration) nSurv(lambdaC=log(2)/c(6,12), hr=.5, eta=log(2)/40, S=3, gamma=6, minfup = 12) # combine it all: 2 strata, 2 failure rate periods nSurv(lambdaC=matrix(log(2)/c(6,12,18,24),ncol=2), hr=.5, eta=matrix(log(2)/c(40,50,45,55),ncol=2), S=3, gamma=matrix(c(3,6,5,7),ncol=2), R=c(5,10), minfup = 12) # example where only 1 month of follow-up is desired # set failure rate to 0 after 1 month using lambdaC and S nSurv(lambdaC=c(.4,0),hr=2/3,S=1,minfup=1) # group sequential design (vary accrual rate to obtain power) x<-gsSurv(k=4,sfl=sfPower,sflpar=.5,lambdaC=log(2)/6, hr=.5, eta=log(2)/40,gamma=1, T=36, minfup = 12) x print(xtable(x,footnote="This is a footnote; note that it can be wide.", caption="Caption example.")) # find expected number of events at time 12 in the above trial nEventsIA(x=x,tIA=10) # find time at which 1/4 of events are expected tEventsIA(x=x,timing=.25)  Example output Loading required package: xtable Loading required package: ggplot2 Fixed design, two-arm trial with time-to-event outcome (Lachin and Foulkes, 1986). Solving for: Accrual rate Hazard ratio H1/H0=0.5/1 Study duration: T=36 Accrual duration: 24 Min. end-of-study follow-up: minfup=12 Expected events (total, H1): 86.3258 Expected sample size (total): 119.8184 Accrual rates: Stratum 1 0-24 4.9924 Control event rates (H1): Stratum 1 0-Inf 0.1155 Censoring rates: Stratum 1 0-Inf 0.0173 Power: 100*(1-beta)=90% Type I error (1-sided): 100*alpha=2.5% Equal randomization: ratio=1 Fixed design, two-arm trial with time-to-event outcome (Lachin and Foulkes, 1986). Solving for: Accrual duration Hazard ratio H1/H0=0.5/1 Study duration: T=32.3089 Accrual duration: 20.3089 Min. end-of-study follow-up: minfup=12 Expected events (total, H1): 86.3627 Expected sample size (total): 121.8535 Accrual rates: Stratum 1 0-20.31 6 Control event rates (H1): Stratum 1 0-Inf 0.1155 Censoring rates: Stratum 1 0-Inf 0.0173 Power: 100*(1-beta)=90% Type I error (1-sided): 100*alpha=2.5% Equal randomization: ratio=1 Fixed design, two-arm trial with time-to-event outcome (Lachin and Foulkes, 1986). Solving for: Follow-up duration Hazard ratio H1/H0=0.5/1 Study duration: T=27.2508 Accrual duration: 25 Min. end-of-study follow-up: minfup=2.2508 Expected events (total, H1): 86.8927 Expected sample size (total): 150 Accrual rates: Stratum 1 0-25 6 Control event rates (H1): Stratum 1 0-Inf 0.1155 Censoring rates: Stratum 1 0-Inf 0.0173 Power: 100*(1-beta)=90% Type I error (1-sided): 100*alpha=2.5% Equal randomization: ratio=1 Fixed design, two-arm trial with time-to-event outcome (Lachin and Foulkes, 1986). Solving for: Accrual duration Hazard ratio H1/H0=0.5/1 Study duration: T=37.7809 Accrual duration: 25.7809 Min. end-of-study follow-up: minfup=12 Expected events (total, H1): 86.3632 Expected sample size (total): 121.6855 Accrual rates: Stratum 1 0-3 1 3-9 3 9-25.78 6 Control event rates (H1): Stratum 1 0-Inf 0.1155 Censoring rates: Stratum 1 0-Inf 0.0173 Power: 100*(1-beta)=90% Type I error (1-sided): 100*alpha=2.5% Equal randomization: ratio=1 Fixed design, two-arm trial with time-to-event outcome (Lachin and Foulkes, 1986). Solving for: Accrual duration Hazard ratio H1/H0=0.5/1 Study duration: T=36.6817 Accrual duration: 24.6817 Min. end-of-study follow-up: minfup=12 Expected events (total, H1): 86.8976 Expected sample size (total): 148.09 Accrual rates: Stratum 1 Stratum 2 0-24.68 2 4 Control event rates (H1): Stratum 1 Stratum 2 0-Inf 0.1155 0.0578 Censoring rates: Stratum 1 Stratum 2 0-Inf 0.0173 0.0173 Power: 100*(1-beta)=90% Type I error (1-sided): 100*alpha=2.5% Equal randomization: ratio=1 Fixed design, two-arm trial with time-to-event outcome (Lachin and Foulkes, 1986). Solving for: Accrual duration Hazard ratio H1/H0=0.5/1 Study duration: T=37.3655 Accrual duration: 25.3655 Min. end-of-study follow-up: minfup=12 Expected events (total, H1): 87.1347 Expected sample size (total): 152.1929 Accrual rates: Stratum 1 0-25.37 6 Control event rates (H1): Stratum 1 0-3 0.1155 3-Inf 0.0578 Censoring rates: Stratum 1 0-3 0.0173 3-Inf 0.0173 Power: 100*(1-beta)=90% Type I error (1-sided): 100*alpha=2.5% Equal randomization: ratio=1 Fixed design, two-arm trial with time-to-event outcome (Lachin and Foulkes, 1986). Solving for: Accrual duration Hazard ratio H1/H0=0.5/1 Study duration: T=30.097 Accrual duration: 18.097 Min. end-of-study follow-up: minfup=12 Expected events (total, H1): 88.0958 Expected sample size (total): 210.2612 Accrual rates: Stratum 1 Stratum 2 0-5 3 5 5-18.1 6 7 Control event rates (H1): Stratum 1 Stratum 2 0-3 0.1155 0.0385 3-Inf 0.0578 0.0289 Censoring rates: Stratum 1 Stratum 2 0-3 0.0173 0.0154 3-Inf 0.0139 0.0126 Power: 100*(1-beta)=90% Type I error (1-sided): 100*alpha=2.5% Equal randomization: ratio=1 Fixed design, two-arm trial with time-to-event outcome (Lachin and Foulkes, 1986). Solving for: Accrual duration Hazard ratio H1/H0=0.6667/1 Study duration: T=915.4375 Accrual duration: 914.4375 Min. end-of-study follow-up: minfup=1 Expected events (total, H1): 257.7578 Expected sample size (total): 914.4375 Accrual rates: Stratum 1 0-914.44 1 Control event rates (H1): Stratum 1 0-1 0.4 1-Inf 0.0 Censoring rates: Stratum 1 0-1 0 1-Inf 0 Power: 100*(1-beta)=90% Type I error (1-sided): 100*alpha=2.5% Equal randomization: ratio=1 There were 50 or more warnings (use warnings() to see the first 50) Time to event group sequential design with HR= 0.5 Equal randomization: ratio=1 Asymmetric two-sided group sequential design with 90 % power and 2.5 % Type I Error. Upper bound spending computations assume trial continues if lower bound is crossed. ----Lower bounds---- ----Upper bounds----- Analysis N Z Nominal p Spend+ Z Nominal p Spend++ 1 29 0.23 0.5895 0.0500 3.16 0.0008 0.0008 2 58 0.86 0.8056 0.0207 2.82 0.0024 0.0022 3 87 1.46 0.9277 0.0159 2.44 0.0074 0.0059 4 116 2.01 0.9780 0.0134 2.01 0.0220 0.0161 Total 0.1000 0.0250 + lower bound beta spending (under H1): Kim-DeMets (power) spending function with rho = 0.5. ++ alpha spending: Hwang-Shih-DeCani spending function with gamma = -4. Boundary crossing probabilities and expected sample size assume any cross stops the trial Upper boundary (power or Type I Error) Analysis Theta 1 2 3 4 Total E{N} 0.0000 0.0008 0.0022 0.0055 0.0102 0.0187 46.5 0.3489 0.0995 0.3393 0.3388 0.1224 0.9000 71.2 Lower boundary (futility or Type II Error) Analysis Theta 1 2 3 4 Total 0.0000 0.5895 0.2470 0.1079 0.0369 0.9813 0.3489 0.0500 0.0207 0.0159 0.0134 0.1000 T n Events HR futility HR efficacy IA 1 12.24228 81.46723 28.76662 0.919 0.308 IA 2 18.97078 126.24254 57.53321 0.797 0.476 IA 3 25.02728 159.70989 86.29984 0.730 0.591 Final 36.00000 159.70989 115.06648 0.687 0.687 Accrual rates: Stratum 1 0-24 6.65 Control event rates (H1): Stratum 1 0-Inf 0.12 Censoring rates: Stratum 1 0-Inf 0.02 % latex table generated in R 3.4.0 by xtable 1.8-2 package % Mon Jun 12 14:21:43 2017 \begin{table}[ht] \centering \begin{tabular}{rllll} \hline & Analysis & Value & Futility & Efficacy \\ \hline 1 & IA 1: 25$\backslash$\% & Z-value & 0.23 & 3.16 \\ 2 & N: 82 & HR & 0.92 & 0.31 \\ 3 & Events: 29 & p (1-sided) & 0.4105 & 8e-04 \\ 4 & 12.2 months & P$\backslash$\{Cross$\backslash$\} if HR=1 & 0.5895 & 8e-04 \\ 5 & & P$\backslash$\{Cross$\backslash$\} if HR=0.5 & 0.05 & 0.0995 \\ 6 &$\backslash$hline IA 2: 50$\backslash$\% & Z-value & 0.86 & 2.82 \\ 7 & N: 128 & HR & 0.8 & 0.48 \\ 8 & Events: 58 & p (1-sided) & 0.1944 & 0.0024 \\ 9 & 19 months & P$\backslash$\{Cross$\backslash$\} if HR=1 & 0.8366 & 0.003 \\ 10 & & P$\backslash$\{Cross$\backslash$\} if HR=0.5 & 0.0707 & 0.4388 \\ 11 &$\backslash$hline IA 3: 75$\backslash$\% & Z-value & 1.46 & 2.44 \\ 12 & N: 160 & HR & 0.73 & 0.59 \\ 13 & Events: 87 & p (1-sided) & 0.0723 & 0.0074 \\ 14 & 25 months & P$\backslash$\{Cross$\backslash$\} if HR=1 & 0.9445 & 0.0085 \\ 15 & & P$\backslash$\{Cross$\backslash$\} if HR=0.5 & 0.0866 & 0.7776 \\ 16 &$\backslash$hline Final analysis & Z-value & 2.01 & 2.01 \\ 17 & N: 160 & HR & 0.69 & 0.69 \\ 18 & Events: 116 & p (1-sided) & 0.022 & 0.022 \\ 19 & 36 months & P$\backslash$\{Cross$\backslash$\} if HR=1 & 0.9813 & 0.0187 \\ 20 & & P$\backslash$\{Cross$\backslash$\} if HR=0.5 & 0.1 & 0.9$\backslash\backslash\backslash$hline$\backslash$multicolumn\{4\}\{p\{ 9cm \}\}\{$\backslash$footnotesize This is a footnote; note that it can be wide. \} \\ \hline \end{tabular} \caption{Caption example.} \end{table} [1] 20.51876 There were 12 warnings (use warnings() to see them)$T
[1] 12.24228

$eDC [1] 17.92465$eDE
[1] 10.84196

$eNC [1] 40.73361$eNE
[1] 40.73361

There were 50 or more warnings (use warnings() to see the first 50)


gsDesign documentation built on May 31, 2017, 2:15 a.m.