simulate_continuous_outcome: Simulate continuous outcome data

View source: R/simulate_trial_with_control.R

simulate_continuous_outcomeR Documentation

Simulate continuous outcome data

Description

Simulate continuous outcome data

Usage

simulate_continuous_outcome(
  nsubj = 400,
  accrual = function(n) {
     cumsum(rexp(n, 3))
 },
  means = rep(40, 4),
  sigma = 5,
  trunc = FALSE
)

Arguments

nsubj

The number of participants to simulate

accrual

A function which determines rate of accrual in weeks, default assumes mean of 3 per week

means

The mean response under each treatment

sigma

Variance of response (assumed constant over treatments)

trunc

Bound the outcome between 0 and 52 and make discrete.


jatotterdell/mfittrial documentation built on Sept. 30, 2022, 12:23 p.m.