Learn R Programming

wikibooks (version 0.2.1)

sens.spec: sensitivity and specificity of an assessment instrument

Description

This function generates sensitivity and specificity for all possible cut-off-points of an assessment instrument using the assessment-scores.

Usage

sens.spec(x, y, risk = 1, dir = "LESS", plot = F)

Arguments

x

score of an assessment-instrument (numeric)

y

a factor which classify x to positive or negative group

risk

y-value for the positive group (e.g. 1 or "y"))

dir

"LESS" if a low (x) leads to positive group; "GREATER" whether a high (x) leads to positive group

plot

logical whether a plot should be generated

References

https://de.wikibooks.org/wiki/GNU_R:_Programmierbeispiele#Beispiel_2

Examples

Run this code
# NOT RUN {
# Using the cms-Dataset
# }
# NOT RUN {
sens.spec(cms$ascore, cms$arisk, risk=1)
# }

Run the code above in your browser using DataLab