simScenPrevSensSpec {bootComb} | R Documentation |
This is a simulation to compute the coverage of the confidence interval returned by bootComb() in the case of adjusting a prevalence estimate for estimates of sensitivity and specificity.
simScenPrevSensSpec( B = 1000, p, sens, spec, nExp, nExpSens, nExpSpec, alpha = 0.05, assumeSensSpecExact = FALSE )
B |
The number of simulations to run. Defaults to 1e3. |
p |
The true value of the prevalence parameter. |
sens |
The true value of the assay sensitivity parameter. |
spec |
The true value of the assay specificity parameter |
nExp |
The size of each simulated experiment to estimate |
nExpSens |
The size of each simulated experiment to estimate |
nExpSpec |
The size of each simulated experiment to estimate |
alpha |
The confidence level; i.e. the desired coverage is 1-alpha. Defaults to 0.05. |
assumeSensSpecExact |
Logical; indicates whether coverage should also be computed for the situation where sensitivity and specificity are assumed to be known exactly. Defaults to FALSE. |
A list with 2 or 4 elements, depending whether assumeSensSpecExact
is set to FALSE or TRUE:
estimate |
A single number, the proportion of simulations for which the confidence interval contained the true prevalence parameter value. |
conf.int |
A confidence interval of coverage 1-alpha for the coverage estimate. |
estimate.sensSpecExact |
Returned only if |
conf.int.sensSpecExact |
Returned only if |
simScenPrevSensSpec(p=0.15,sens=0.85,spec=0.90,nExp=300,nExpSens=600,nExpSpec=400,B=1000) # B value only for convenience here # Increase B to 1e3 or 1e4 (be aware this may run for some time).