sim_magnusson_turnbull {GSED} | R Documentation |
Simulations of trials with GSED
Description
sim_magnusson_turnbull
is used to simulate clincal trials with GSED for different type of outcome (survival, binary, continuous).
Usage
sim_magnusson_turnbull(K_stages, N_subsets, f, l, u, ratio_Delta_star_d1, type_outcome,
param_outcome=NA, n_max=NA, incl_rate=NA, mean_cur_c=NA, HR=NA, nb_required=NA,
nmax_wait=+Inf, ordering, increasing_theta=FALSE, nsim=1000, seed=42,
nsim_tot=NA, num_sc=1, updateProgress=NULL)
Arguments
K_stages |
Integer indicating the number of stages in the design. |
N_subsets |
Integer representing the number of possible subgroups. |
f |
Vector containing the prevalence rates of each subgroup. Must be of length |
l |
Vector containing the lower boundaries for stagewise decisions. Must be of length |
u |
Vector containing the upper boundaries for stagewise decisions. Must be of length |
ratio_Delta_star_d1 |
Vector containing the ratio between the (observed Fisher) information increments at each stage >1 with the (observed Fisher) information at stage 1. Must be of length |
type_outcome |
A string containing the type of outcome, either "survival", "binary", or "continuous". |
param_outcome |
Must be supplied only if |
n_max |
Integer representing the maximum number of patients to enroll in a trial. Must be supplied only if |
incl_rate |
Number representing the inclusion rate. Must be supplied only if |
mean_cur_c |
Number representing the median survival for the control group. Must be supplied only if |
HR |
Vector containing the expected hazard ratios for each subgroup. Must be of length |
nb_required |
Integer indicating the maximum number of events required. Must be supplied only if |
nmax_wait |
For |
ordering |
Boolean indicating if the subgroups (theta) are ordered. |
increasing_theta |
Boolean indicating if greater values of theta parameters represent better treatment effects. The default value is set at FALSE. |
nsim |
Integer indicating the number of trials to simulate. The default value is set at 1000. |
seed |
Interger representing the seed. The default value is set at 42. |
nsim_tot |
(for Rshiny application) |
num_sc |
(for Rshiny application) |
updateProgress |
(for Rshiny application) |
Value
A list is returned composed of:
prob_rejec |
Percentage of simulated trials (estimated probability) to reject any subgroup. |
prob_accep |
Percentage of simulated trials (estimated probability) to accept the null hypothesis, that is there is no treatment effect in any subgroup. |
list_keep |
A list of the different subgroups that were selected across all simulated trials. |
pct_keep |
Percentage of selection of each subgroup of |
rejec_stage |
Vector of percentage of simulated trials (estimated probability) to reject any subgroup at each stage. |
accep_stage |
Vector of percentage of simulated trials (estimated probability) to accept the null hypothesis (that is there is no treatment effect in any subgroup) at each stage. |
mean_pat |
Mean number of patients included across all simulated trials. |
mean_duration |
If |
Author(s)
Marie-Karelle Riviere-Jourdan eldamjh@gmail.com
References
Baldur P. Magnusson and Bruce W. Turnbull. Group sequential enrichment design incorporating subgroup selection. Statistics in Medicine, 2013. <doi:10.1002/sim.5738>
Examples
#For testing purpose only, larger number of simulations required (see in comments below)
sim_magnusson_turnbull(K_stages=2, N_subsets=3, f=c(0.6,0.2,0.2), l=c(0.7962, 2.5204),
u=c(2.7625, 2.5204), ratio_Delta_star_d1=c(1), type_outcome="binary", param_outcome=
list(matrix(c(0.4,0.4,0.4,0.6,0.6,0.6),nrow=2,ncol=3,byrow=TRUE)), n_max=1496,
ordering=FALSE, nsim=2, seed=42)
#sim_magnusson_turnbull(K_stages=2, N_subsets=3, f=c(0.6,0.2,0.2), l=c(0.7962, 2.5204),
#u=c(2.7625, 2.5204), ratio_Delta_star_d1=c(1), type_outcome="binary", param_outcome=
#list(matrix(c(0.4,0.4,0.4,0.6,0.6,0.6),nrow=2,ncol=3,byrow=TRUE)), n_max=1496,
#ordering=FALSE, nsim=1000, seed=42)
#sim_magnusson_turnbull(K_stages=2, N_subsets=3, f=c(0.6,0.2,0.2), l=c(0.7962, 2.5204),
#u=c(2.7625, 2.5204), ratio_Delta_star_d1=c(1), type_outcome="binary", param_outcome=
#list(matrix(c(0.5,0.5,0.5,0.5,0.5,0.5),nrow=2,ncol=3,byrow=TRUE)), n_max=1496,
#ordering=FALSE, nsim=1000, seed=42)
#sim_magnusson_turnbull(K_stages=2, N_subsets=4, f=c(0.25,0.25,0.25,0.25), l=c(0.98,2.35),
#u=c(2.59,2.35), ratio_Delta_star_d1=c(1), type_outcome="survival", incl_rate=1/28,
#mean_cur_c=7/log(2), HR=c(0.8,0.8,0.8,0.8), nb_required=1030, ordering=TRUE,
#increasing_theta=FALSE, nsim=1000, seed=42)