View source: R/simulate_trial_longitudinal.R
simulate_accrual_data | R Documentation |
Simulate accrual data
simulate_accrual_data( nsubj = 200, accrual = function(n) round(cumsum(rexp(n, 3))), dropout = function(n) sample(c(1, Inf), n, replace = T, prob = c(0.2, 0.8)) )
nsubj |
The number of subjects |
accrual |
An accrual function which returns 'nsubj' ordered randomisation times in weeks |
dropout |
A drop-out function which returns 'nsubj' times-to-drop-out, one for each subject. 'Inf' means no drop-out (not implemented) |
A data.table giving the accrual data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.