Learn R Programming

confidenceSim (version 0.1.0)

getAccrual: Get Accrual

Description

Generate patient accrual with Poisson distribution.

Usage

getAccrual(
  numsubjects,
  ppm,
  follow.up = 0,
  cont.recruit = FALSE,
  perpetual = FALSE
)

Value

Vector size of number of patients you need to get 'numsubjects' followup with values representing month of accrual.

Arguments

numsubjects

Maximum sample size. If perpetual is TRUE, a new maximum sample size is returned.

ppm

Patients accrued per month, as an array. Length of array is the number of months in the trial.

follow.up

Follow-up period in months.

cont.recruit

Whether to continue recruitment while waiting for follow up (TRUE) of not (FALSE).

perpetual

Whether to run trial perpetually (TRUE) or not (FALSE).

Examples

Run this code
ppm <- rep(15, 300)
monthin <- getAccrual(1000, ppm, 0)
# monthin is of length 1000.

Run the code above in your browser using DataLab