Learn R Programming

adaptr (version 1.4.0)

get_ys_norm: Generate normally distributed continuous outcomes

Description

Used internally. Function factory used to generate a function that generates outcomes from normal distributions.

Usage

get_ys_norm(arms, means, sds)

Value

A function which takes the argument allocs (a character vector with the allocations) and returns a numeric vector of the same length with the corresponding, randomly generated outcomes (from normal distributions).

Arguments

arms

character vector, arms as specified in setup_trial_norm().

means

numeric vector, true means in all arms as specified in setup_trial_norm().

sds

numeric vector, true standard deviations (sds) in all arms as specified in setup_trial_norm().