Time2Nsubjects | R Documentation |
Simulate the number of weeks needed to recruit a given number of subjects
Time2Nsubjects(
nSub = 50L,
nSim = 10000L,
fillGaps = FALSE,
cauchyWt = FALSE,
efficiencyFactor = 1
)
nSub |
Number of subjects to recruit (default = 50L) |
nSim |
Number of simulations to run (default = 1e4L). Accepted values are in the |
fillGaps |
Whether to fill recruitment gaps in the data (default = FALSE). |
cauchyWt |
Whether to use Cauchy weights for sampling.
If FALSE (default), |
efficiencyFactor |
An efficiency coefficient to apply to the recruitment rate (default = 1).
|
An object of RCTNWeeks
class with four elements.
weeks
is an integer vector with length equal to nSim
containing the
simulation results.
CI
shows the median and the 95% CI.
call.
: The call (deparsed) that created the object
cargs
: A list with the arguments of the call that created the object
including the default arguments
Other Links:
GetDistance()
,
GetWeekPredCI()
,
LoadData()
,
RCTRecruit-package
,
gripsYR1
,
gripsYR2
,
gripsYR2Weekly
,
plot.RCTPredCI()
LoadData(gripsYR1, ScreenDt, Enrolled)
(res <- Time2Nsubjects())
str(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.