Learn R Programming

SSRMST (version 0.1.1)

ssrmst: Sample Size Calculation using Restricted Mean Survival Time

Description

The package calculates the study sample size and power in designing clinical trials using the difference in restricted mean survival time (RMST). Two types of one-sided tests, non-inferiority and superiority tests, are prepared. Under certain conditions, 2,000 sets of realizations in default are generated for calculating confidence intervals of RMST differences. Then the power is calculated, i.e., the chance that the lower bound of 2,000 confidence intervals of RMST differences falls above a margin.

Usage

ssrmst(ac_rate=NULL, ac_period=NULL, ac_number=NULL, tot_time, tau,
       shape0=1, scale0, shape1=1, scale1, margin=0, allocation1=0.5,
       one_sided_alpha=0.025, seed=NULL, ntest=2000)

Arguments

ac_rate
Accrual rate: the number of patients per unit time.
ac_period
Accrual period: the time point at last accrual.
ac_number
Accrual number: the total number of accrual patients.
tot_time
Total study time: the time point at last follow-up.
tau
Truncation time point to calculate RMSTs.
shape0, shape1
Shape parameters for the Weibull distribution in both the control (arm0) and the treatment (arm1).
scale0, scale1
Scale parameters for the Weibull distribution in both the control (arm0) and the treatment (arm1). Note that when the PH assumption is assumed, the value of the scale parameter in the treatment (arm1) needs to be larger than or equal to that in the control (arm0), because the difference of the RMSTs (arm1 minus arm0) is of interest.
margin
Non-inferiority margin: a clinically acceptable difference in RMST. A value of minus margin is used to evaluate the power. When default (margin = 0), a superiority test is selected.
allocation1
Proportion of patients allocated to the treatment (arm1). Default value is 0.5.
one_sided_alpha
Nominal type I error level as one-sided. When default (one_sided_alpha = 0.025), 0.95 confidence intervals of the difference in RMST are estimated to calculate the power.
seed
Random seed used for the sampling. Default is NULL.
ntest
Number of iterations. When default (ntest = 2000), 2,000 sets of realizations are generated for calculating confidence intervals of RMST differences.

Value

A list with components:

result
Total study population and expected number of events.

power1
The power based on separate variance, i.e., the chance that the lower bound of 2,000 confidence intervals of difference in RMST falls above a value of minus margin in a non-inferiority test (or above 0 in a superiority test).

power2
The power based on pooled variance, i.e., the chance that the lower bound of 2,000 confidence intervals of difference in RMST falls above a value of minus margin in a non-inferiority test (or above 0 in a superiority test).

ac_rate
Accrual rate used in the analyses.

ac_period
Accrual period used in the analyses.

ac_number
Accrual number used in the analyses.

ac_type
Accrual type: 1; the number of patients per unit time is automatically calculated by specifying the parameters (ac_rate and ac_period), 2; the accrual rate is automatically calculated by specifying the parameters (ac_period and ac_number), 3; the accrual period is automatically calculated by specifying the parameters (ac_rate and ac_number).

tot_time
Total study time used in the analyses.

margin
Margin used in the analyses.

tau
Truncation time point used in the analyses.

one_sided_alpha
Nominal type I error level as one-sided used in the analyses.

note
Note regarding the truncation time, tau.

Details

For more details, please refer to the vignette: browseVignettes(package = "SSRMST")

References

Uno H, Wittes J, Fu H, Solomon SD, Claggett B, Tian L, Cai T, Pfeffer MA, Evans SR, Wei LJ. Alternatives to Hazard Ratios for Comparing the Efficacy or Safety of Therapies in non-inferiority Studies. Annals of Internal Medicine 2015, 163, 127-134.

See Also

survival survRM2

Examples

Run this code
 #---Example data

 #--Non-inferiority test
 ac_rate   = 15
 ac_period = 35
 tot_time  = 510
 tau       = 500
 scale0    = 8500
 scale1    = 8500
 margin    = 18

 a = ssrmst(ac_rate=ac_rate, ac_period=ac_period, tot_time=tot_time,
            tau=tau, scale0=scale0, scale1=scale1, margin=margin, ntest=20)
 print(a)


 #--Superiority test
 ac_rate   = 15
 ac_period = 35
 tot_time  = 510
 tau       = 500
 scale0    = 4000
 scale1    = 8500
 b = ssrmst(ac_rate=ac_rate, ac_period=ac_period, tot_time=tot_time,
            tau=tau, scale0=scale0, scale1=scale1, ntest=20)
 print(b)

Run the code above in your browser using DataLab