powered by
Generate patient accrual with Poisson distribution.
getAccrual( numsubjects, ppm, follow.up = 0, cont.recruit = FALSE, perpetual = FALSE )
Vector size of number of patients you need to get 'numsubjects' followup with values representing month of accrual.
Maximum sample size. If perpetual is TRUE, a new maximum sample size is returned.
Patients accrued per month, as an array. Length of array is the number of months in the trial.
Follow-up period in months.
Whether to continue recruitment while waiting for follow up (TRUE) of not (FALSE).
Whether to run trial perpetually (TRUE) or not (FALSE).
ppm <- rep(15, 300) monthin <- getAccrual(1000, ppm, 0) # monthin is of length 1000.
Run the code above in your browser using DataLab