This function performs simulation based trial design evaluations for a set of specified dose-response models
Usage
assessDesign(
n_patients,
mods,
prior_list,
sd,
n_sim = 1000,
alpha_crit_val = 0.05,
modeling = FALSE,
simple = TRUE,
avg_fit = TRUE,
reestimate = FALSE,
contr = NULL,
dr_means = NULL,
delta = NULL,
evidence_level = NULL,
med_selection = c("avgFit", "bestFit")
)
Arguments
- n_patients
Vector specifying the planned number of patients per dose group. A minimum of 2 patients are required in each group.
- mods
An object of class "Mods" as specified in the DoseFinding package.
- prior_list
A prior_list object specifying the utilized prior for the different dose groups
- sd
A positive value, specification of assumed sd
- n_sim
Number of simulations to be performed
- alpha_crit_val
(Un-adjusted) Critical value to be used for the MCP testing step. Passed to the getCritProb() function for the calculation of adjusted critical values (on the probability scale). Default is 0.05.
- modeling
Boolean variable defining whether the Mod part of Bayesian MCP-Mod will be performed in the assessment. More heavy on resources. Default FALSE.
- simple
Boolean variable defining whether simplified fit will be applied. Passed to the getModelFits function. Default FALSE.
- avg_fit
Boolean variable, defining whether an average fit (based on generalized AIC weights) should be performed in addition to the individual models. Default TRUE.
- reestimate
Boolean variable defining whether critical value should be calculated with re-estimated contrasts (see getCritProb function for more details). Default FALSE
- contr
An object of class 'optContr' as created by the getContr() function. Allows specification of a fixed contrasts matrix. Default NULL
- dr_means
A vector, allows specification of individual (not model based) assumed effects per dose group. Default NULL
- delta
A numeric value for the threshold Delta for the MED assessment. If NULL, no MED assessment is performed. Default NULL.
- evidence_level
A numeric value between 0 and 1 for the evidence level gamma for the MED assessment. Only required for Bayesian MED assessment, see ?getMED for details. Default NULL.
- med_selection
A string, either "avgFit" or "bestFit", for the method of MED selection. Default "avgFit".
Value
Returns success probabilities for the different assumed dose-response shapes, attributes also includes information around average success rate (across all assumed models) and prior Effective sample size
Examples
mods <- DoseFinding::Mods(linear = NULL,
emax = c(0.5, 1.2),
exponential = 2,
doses = c(0, 0.5, 2,4, 8),
maxEff = 6)
sd <- 12
prior_list <- list(Ctrl = RBesT::mixnorm(comp1 = c(w = 1, m = 0, s = 12), sigma = 2),
DG_1 = RBesT::mixnorm(comp1 = c(w = 1, m = 1, s = 12), sigma = 2),
DG_2 = RBesT::mixnorm(comp1 = c(w = 1, m = 1.2, s = 11), sigma = 2) ,
DG_3 = RBesT::mixnorm(comp1 = c(w = 1, m = 1.3, s = 11), sigma = 2) ,
DG_4 = RBesT::mixnorm(comp1 = c(w = 1, m = 2, s = 13), sigma = 2))
n_patients <- c(40, 60, 60, 60, 60)
success_probabilities <- assessDesign(
n_patients = n_patients,
mods = mods,
prior_list = prior_list,
sd = sd,
n_sim = 1e2) # speed up example run time
success_probabilities
#> $linear
#> Bayesian Multiple Comparison Procedure
#> Estimated Success Rate: 0.86
#> N Simulations: 100
#> Model Shape: lin emax1 emax2 exp
#> Significance Freq: 0.81 0.62 0.78 0.76
#>
#> $emax1
#> Bayesian Multiple Comparison Procedure
#> Estimated Success Rate: 0.9
#> N Simulations: 100
#> Model Shape: lin emax1 emax2 exp
#> Significance Freq: 0.58 0.87 0.82 0.29
#>
#> $emax2
#> Bayesian Multiple Comparison Procedure
#> Estimated Success Rate: 0.9
#> N Simulations: 100
#> Model Shape: lin emax1 emax2 exp
#> Significance Freq: 0.72 0.87 0.85 0.46
#>
#> $exponential
#> Bayesian Multiple Comparison Procedure
#> Estimated Success Rate: 0.89
#> N Simulations: 100
#> Model Shape: lin emax1 emax2 exp
#> Significance Freq: 0.83 0.40 0.60 0.88
#>
#> attr(,"avgSuccessRate")
#> [1] 0.8875
#> attr(,"placEff")
#> [1] 0
#> attr(,"maxEff")
#> [1] 6
#> attr(,"sampleSize")
#> [1] 40 60 60 60 60
#> attr(,"priorESS")
#> Ctrl DG_1 DG_2 DG_3 DG_4
#> 0 0 0 0 0
if (interactive()) { # takes typically > 5 seconds
# with MED estimation without bootstrapping
# see ?getMED for details
success_probabilities <- assessDesign(
n_patients = n_patients,
mods = mods,
prior_list = prior_list,
sd = sd,
modeling = TRUE,
n_sim = 10, # speed up example run time
delta = 7)
success_probabilities
# with MED estimation with bootstrapping
success_probabilities <- assessDesign(
n_patients = n_patients,
mods = mods,
prior_list = prior_list,
sd = sd,
modeling = TRUE,
n_sim = 10, # speed up example run time
delta = 7,
evidence_level = 0.8)
success_probabilities
}