cloppearSnSp | R Documentation |
Evaluate binomial confidence interval using Clopper-Pearson method. A function written by CVB Statistics to estimate the sensitivity and specificity of an experimental diagnostic test kit in accordance with CVB STATWI0002.
cloppearSnSp(dat, alpha = 0.05, est.Sn = TRUE)
dat |
|
alpha |
Complement of confidence level. |
est.Sn |
logical (TRUE/FALSE) Indicating if the sensitivity and its confidence interval should be supplied (TRUE) or if the specificity and its confidence interval should be supplied (FALSE). |
An object of type cp
that extends list
.
calcVal
: Named vector of point estimates and estimated simulated
intervals. See below.
data
: Test and Total values of the data. See below.
alpha
: Complement of the confidence interval as provided above.
est.Sn == TRUE
calcVal
is a list with the following elements
Sn
: Sensitivity estimate.
Sn.LL
: Lower confidence limit for sensitivity.
Sn.UL
: Upper confidence limit for sensitivity.
data
is a list with the following elements
Test.Positive
: Number of experimental test positives.
Total.Positive
: Total number of positive samples.
st.Sn == FALSE
calcVal
is a list with the following elements
Sp
: Specificity estimate.
Sp.LL
: Lower confidence limit for specificity.
Sp.UL
: Upper confidence limit for specificity.
data
is a list with the following elements
Test.Negative
: Number of experimental test negatives.
Total.Negative
: Total number of negative samples.
A matrix with a single row. If est.Sn = TRUE the columns correspond to the number of experimental test positives, the total number of positive samples, sensitivity, the lower confidence limit for sensitivity and the upper confidence limit for sensitivity. If est.Sn = FALSE, the columns correspond to the number of experimental test negatives, the total number of negative samples, specificity, the lower confidence limit for specificity and the upper confidence limit for specificity.
DiagTestKit-package
Clopper CJ, Pearson ES, 1934. The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika 26:404-413.
CP.Sn <- cloppearSnSp(dat = dat_infal, est.Sn = TRUE)
CP.Sn
# Sn = P(T+|D+): 0.987013 (95% CI: 0.953876, 0.998423)
CP.Sp <- cloppearSnSp(dat = dat_infal, est.Sn = FALSE)
CP.Sp
# Sp = P(T-|D-): 0.970297 (95% CI: 0.915643, 0.915643)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.