sensSpec: Sensitivity and Specificity Analysis of a 2x2 Matrix

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/sensSpec.R

Description

This function provides detailed information regarding the comparison of two competing methods, for example self-report and gold-standard treatment through a sensitivity/specificity analysis.

Usage

1
sensSpec(X, alpha=0.05, CL=TRUE, digits=3)

Arguments

X

A 2x2 matrix, with Gold Standard Class A and B in the columns and Comparison Method A and B in the rows.

CL

Logical: If TRUE, Confidence Intervals are calculated and displayed in summary method.

alpha

The desired Type I Error Rate for Hypothesis Tests and Confidence Intervals

digits

Number of Digits to round calculations

Details

This function is designed to calculate Sensitivity, Specificity, Youden's J and Percent Agreement. These tools are used to assess the validity of a new instrument or self-report against the current gold standard. In general, self-report is less expensive, but may be subject to information bias. Computational formulae can be found in the reference.

Value

X

The original input matrix.

sens

The point estimate of sensitivity

spec

The point estimate of specificity

PA

The point estimate of Percent Agreement

YoudenJ

The point estimate of Youden's J

sens.s

The standard deviation of sensitivity

spec.s

The standard deviation of specificity

PA.s

The standard deviation of Percent Agreement

YoudenJ.s

The standard deviation of Youden's J

sens.CIL

The lower bound of the constructed confidence interval for true sensitivity.

sens.CIU

The upper bound of the constructed confidence interval for true sensitivity

spec.CIL

The lower bound of the constructed confidence interval for true specificity.

spec.CIU

The upper bound of the constructed confidence interval for true specificity.

PA.CIL

The lower bound of the constructed confidence interval for Percent Agreement.

PA.CIU

The upper bound of the constructed confidence interval for Percent Agreement.

YoudenJ.CIL

The lower bound of the constructed confidence interval for Youden's J.

YoudenJ.CIU

The upper bound of the constructed confidence interval for Youden's J.

alpha

The desired Type I Error Rate for Hypothesis Tests and Confidence Intervals

digits

Number of Digits to round calculations

Note

All confidence limits rely on simple asymptotic theory, as such, confidence limits may lie outside of [0,1]. A more accurate method is available in the twoby2 function of the Epi package, which employs a logit transformation.

Author(s)

Michael Rotondi, mrotondi@yorku.ca

References

Szklo M and Nieto FJ. Epidemiology: Beyond the Basics, Jones and Bartlett: Boston, 2007.

See Also

kappa

Examples

1
2
3
## Not run: From Szklo and Nieto, p. 315
dat <- cbind(c(18,1), c(19,11));
summary(sensSpec(dat));

Example output

 Detailed Sensitivity and Specitivity Output 
 
Input Matrix: 
           Gold Standard A Gold Standard B
Reported A              18              19
Reported B               1              11

The sample sensitivity is: 94.7% 
95% Confidence Limits for true sensitivity are: [84.7, 104.8]

The sample of specificity is: 36.7% 
95% Confidence Limits for true specificity are: [19.4, 53.9]

The sample value of Youden's J is: 31.4
95% Confidence Limits for Youden's J are: [11.4, 51.4]

Sample value for Percent Agreement (PA) is: 59.2% 
95% Confidence Limits for PA are: [45.4, 72.9]
 

epibasix documentation built on May 2, 2019, 10:08 a.m.

Related to sensSpec in epibasix...