| GetDistance | R Documentation |
Euclidean distance between predicted and actual recruitment
GetDistance(
target,
nSim = 10000L,
fillGaps = FALSE,
cauchyWt = FALSE,
efficiencyFactor = 1
)
target |
A vector with the actual recruitment by week |
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 RCTDist class with four elements.
dist:
A numeric vector with length equal to nSim containing the simulated
Euclidean distance.
CI: A numeric vector with the median and the 95% CI Euclidean distance.
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:
GetWeekPredCI(),
LoadData(),
RCTRecruit-package,
Time2Nsubjects(),
gripsYR1,
gripsYR2,
gripsYR2Weekly,
plot.RCTPredCI()
LoadData(gripsYR1, ScreenDt, Enrolled)
(res <- GetDistance(gripsYR2Weekly$enrolled))
str(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.