Description Usage Arguments Value Examples
View source: R/set_recruitment.R
A function to build a recruitment dataframe by some general conditions e.g. targeted total number of recruitments per group and recruitment timePoints.
1 | set_recruitment(targetN, timePoints, fn = "linear", ...)
|
targetN |
a vector of length 1 or two defining the targeted total number of recruitments.
If |
timePoints |
a vector defining the timepoint of each recruitment or a positive number defining the
amount of recruitments (needs |
fn |
a string defining the shape of the cummulative recruitment. Default is set to "linear". |
k |
a positive number defining the k:1 treatment allocation (treatment:control). Optional, if
|
timeLimits |
a vector of length two defining the timepoint of the first and the last recruitment.
Optional if |
a data.frame
containing the number of recruitments of the treament and control group "T"
and "C"
per timepoint time
.
1 2 3 4 5 6 7 | # Two different approches to define a recruitment of 1071 patients
# with an allokation of 2:1 (treatment:control), where 24 batches of
# recruits are wanted. The recruitment is assumed to take place at the
# beginning of each month over 24 month.
set_recruitment(targetN=c(714,357), timePoints=0:23)
set_recruitment(targetN=1071, k=2, timePoints=24, timeLimits=c(0,23))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.