simulate_outcome_data: Simulate outcome data

View source: R/simulate_trial_longitudinal.R

simulate_outcome_dataR Documentation

Simulate outcome data

Description

Simulate outcome data

Usage

simulate_outcome_data(
  nsims = 50,
  nsubj = 200,
  accrual = function(n) 1:n,
  beta = c(0, 2, 4, 6, 0, -2.5, -2.5, -2.5, 0, 2.5, 2.5, 2.5, 0, 0, 0, 0),
  sigma_e = 5,
  sigma_u = 1
)

Arguments

nsims

Number of sets of outcome data to simulate

nsubj

Number of subjects

accrual

Accrual function for use in 'simulate_accrual_data'

beta

Fixed effects parameters

sigma_e

Variance of residuals for outcome

sigma_u

Variance of subject specific intercepts

Value

A data.table giving outcome data


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