This class can be used to simulate the arrival times of patients in a simulated clinical trial. The function NewAccrualProcess returns an object used to simulate arrival times for patients by calling SimulateArrivalTime. The class assumes After calling NewAccrualProces you can call SimulateArrivalTimes to generate a vector of accrual times.

# S4 method for AccrualMethods
SimulateArrivalTimes(cAP)

Arguments

vQtyPatsPerMonth

A vector (possibly of length 1 for constant rate) for the number of patient accrued each month

nMaxQtyPatients

The maximum of of patient recruitment times to simulate.

nMaxMonthsOfAccrual

The maximum number of months that you want to simulate accrual for.

Details

If both nMaxQtyPatients and nMaxMonthsOfAccrual are supplied then the returned vector will be at most nMaxQtyPatients in length. However, when nMaxMonthsOfAccrual all values will be less than nMaxMonthsOfAccrual so the length of the returned vector could be less than nMaxQtyPatient.

See also

NewAccrualProcess for creating the object.

Examples

vPatsPerMonth <- c(5, 10, 15, 20, 30, 40, 50) # The ramp up in expected Pat/month nMaxQtyPats <- 100 # Maximum of 100 patients ap <- NewAccrualProcess( vQtyPatsPerMonth = vPatsPerMonth, nMaxQtyPatients = nMaxQtyPats ) vAccTimes <- SimulateArrivalTimes( ap )