GetDistance {RCTRecruit} | R Documentation |
Euclidean distance between predicted and actual recruitment
Description
Euclidean distance between predicted and actual recruitment
Usage
GetDistance(
target,
nSim = 10000L,
fillGaps = FALSE,
cauchyWt = FALSE,
efficiencyFactor = 1
)
Arguments
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).
|
Value
An object of RCTDist
class with four elements.
-
dist
: A numeric vector with length equal tonSim
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
See Also
Other Links:
GetWeekPredCI()
,
LoadData()
,
RCTRecruit-package
,
Time2Nsubjects()
,
gripsYR1
,
gripsYR2
,
gripsYR2Weekly
,
plot.RCTPredCI()
Examples
LoadData(gripsYR1, ScreenDt, Enrolled)
(res <- GetDistance(gripsYR2Weekly$enrolled))
str(res)