Description Usage Arguments Value References Examples

View source: R/sensitivity.specificity.R

This function calculates the sensitivity and specificity for a diagnostic test. Definition of these two concepts can be found in Agresti (2018, ISBN: 978-1-119-40528-3).

1 | ```
sensitivity.specificity(A, show.matrix = FALSE)
``` |

`A` |
a 2x2 matrix object where A[1,1] contains the number of people with the disease and with a positive test result; A[1,2], the number of people without the disease with a positive test result; A[2,1], the number of people with the disease with a negative test result; A[2,2], the number of people without the disease and with a negative test result. |

`show.matrix` |
a logical value indicating whether the matrix A must be shown. |

A vector object of two components: The first one cointains the sensitivity and the second component, the specificity.

Agresti, A. (2018). An introduction to categorical data analysis. John Wiley & Sons. ISBN: 978-1-119-40528-3.

1 2 | ```
A<-matrix(c(744,231,421,659),nrow=2)
sensitivity.specificity(A,show.matrix=TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.