Learn R Programming

bhmbasket (version 1.0.0)

createTrial: createTrial

Description

This function creates an object of class scenario_list for a single trial outcome, which can subsequently be analyzed with other functions of bhmbasket, e.g. performAnalyses

Usage

createTrial(n_subjects, n_responders)

Value

An object of class scenario_list with the scenario data for a single trial outcome.

Arguments

n_subjects

A vector of integers for the number of subjects in the trial outcome

n_responders

A vector of integers for the number of responders in the trial outcome

Author

Stephan Wojciekowski

Details

This function is a wrapper for simulateScenarios with

simulateScenarios(
 n_subjects_list     = list(n_subjects),
 response_rates_list = list(n_responders),
 n_trials            = 1)

See Also

simulateScenarios performAnalyses

Examples

Run this code
 trial_outcome <- createTrial(n_subjects   = c(10, 20, 30, 40),
                              n_responders = c( 1,  2,  3,  4))

Run the code above in your browser using DataLab