simulateScenarios | R Documentation |
This function creates scenarios for the analysis with
performAnalyses
.
simulateScenarios( n_subjects_list, response_rates_list, scenario_numbers = seq_along(response_rates_list), n_trials = 10000 )
n_subjects_list |
A list that contains for each scenario a vector for the number of subjects per cohort. A single vector can be provided if all scenarios should have the same number of subjects. |
response_rates_list |
A list that contains for each scenario a vector for the response rates per cohort. |
scenario_numbers |
A vector of positive integers naming the scenarios,
Default: |
n_trials |
An integer indicating the number of trial simulations per response rates,
Default: |
The function simulates trials with binary outcome for each scenario. Integer values for the response rates will be treated as observed outcomes.
An object of class scenario_list
with the scenario data for each specified scenario.
Stephan Wojciekowski
saveScenarios
createTrial
performAnalyses
n_subjects <- c(10, 20, 30) rr_negative <- rep(0.1, 3) rr_nugget <- c(0.9, 0.1, 0.1) rr_positive <- rep(0.9, 3) scenarios_list <- simulateScenarios( n_subjects_list = list(n_subjects, n_subjects, n_subjects), response_rates_list = list(rr_negative, rr_nugget, rr_positive))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.