
Estimates true prevalence and confidence limits for given sample size and result, according to specified method
tp(x, n, se, sp, type = "blaker", conf = 0.95)
number of positive units (scalar)
sample size (no. units sampled) (scalar)
test sensitivity (scalar)
test specificity (scalar)
method for estimating CI, one of c("normal", "c-p", "sterne", "blaker", "wilson", "all")
desired level of confidence for CI, default = 0.95 (scalar)
list with 2 elements, a matrix of apparent prevalence and lower and upper confidence limits and a matrix of true prevalence and lower and upper confidence limits using the chosen method(s)
# NOT RUN {
# examples for tp
x<- 20
n<- 120
se<- 0.9
sp<- 0.99
conf<- 0.95
tp(x, n, se, sp, "all")
tp(x, n, se, sp, "c-p")
tp(x, n, 0.95, 0.9, "c-p")
# }
Run the code above in your browser using DataLab