DesignLibrary (version 0.1.0)

multi_arm_designer: Create a design with multiple experimental arms

Description

This designer creates a design m_arms experimental arms, each assigned with equal probabilities.

Usage

multi_arm_designer(N = 30, m_arms = 3, means = rep(0, m_arms),
  sds = rep(1, m_arms), conditions = 1:m_arms, fixed = NULL)

Arguments

N

An integer. Sample size.

m_arms

An integer. Number of arms.

means

A numeric vector of length m_arms. Average outcome in each arm.

sds

A nonnegative numeric vector of length m_arms. Standard deviations for each of the arms.

conditions

A vector of length m_arms. The names of each arm. It can be numeric or a character without blank spaces.

fixed

A character vector. Names of arguments to be fixed in design. By default m_arms and conditions are always fixed.

Value

A function that returns a design.

Examples

Run this code
# NOT RUN {
# To make a design using default arguments:
design <- multi_arm_designer()


# A design with different mean and sd in each arm
design <- multi_arm_designer(means = c(0, 0.5, 2), sd =  c(1, 0.1, 0.5))

design <- multi_arm_designer(N = 80, m_arms = 4, means = 1:4,
                             fixed = c("means", "sds"))

# }

Run the code above in your browser using DataLab