Defines the accrual pattern either by accrual rates or by the proportions of patients enrolled in intervals of a given accrual duration.
Details
With rate, patients are enrolled at rate[j] patients per
unit time from time[j] on, and the accrual duration follows from
the sample size. The last rate applies until the sample size is reached.
With prop and duration, a proportion prop[j] of the
patients is enrolled uniformly in the interval starting at
time[j], and the last interval ends at duration. The
accrual rates then scale with the sample size. When
ms_size solves for the accrual duration, all interval
limits are scaled by the same factor.
Examples
# 10 patients per month in the first 3 months, then 30 per month
ms_accrual(time = c(0, 3), rate = c(10, 30))
#> Piecewise uniform accrual by rates (patients per unit time):
#> time rate
#> 0 10
#> 3 30
# 30 percent of the patients in the first 6 months of an 18-month accrual
ms_accrual(time = c(0, 6), prop = c(0.3, 0.7), duration = 18)
#> Piecewise uniform accrual by proportions, duration 18:
#> time prop
#> 0 0.3
#> 6 0.7