define_enroll_rate {gsDesign2} | R Documentation |
Define enrollment rate
Description
Define the enrollment rate of subjects for a study as following a piecewise exponential distribution.
Usage
define_enroll_rate(duration, rate, stratum = "All")
Arguments
duration |
A numeric vector of ordered piecewise study duration interval. |
rate |
A numeric vector of enrollment rate in each |
stratum |
A character vector of stratum name. |
Details
The duration
are ordered piecewise for a duration equal to
, where
.
The enrollment rates are defined in each duration with the same length.
For a study with multiple strata, different duration and rates can be specified in each stratum.
Value
An enroll_rate
data frame.
Examples
# Define enroll rate without stratum
define_enroll_rate(
duration = c(2, 2, 10),
rate = c(3, 6, 9)
)
# Define enroll rate with stratum
define_enroll_rate(
duration = rep(c(2, 2, 2, 18), 3),
rate = c((1:4) / 3, (1:4) / 2, (1:4) / 6),
stratum = c(array("High", 4), array("Moderate", 4), array("Low", 4))
)
[Package gsDesign2 version 1.1.2 Index]