rocthreshold {alternativeROC} | R Documentation |
rocthreshold
Description
Compute ROC sensitivity, specificity and threshold for a given cutoff.
Usage
rocthreshold(x, y, cut, input, prevalence = NULL, annotate = FALSE)
Arguments
x |
either a ROC object or the predictor to build the ROC curve |
y |
if x is not a ROC object, the binary outcome of the ROC curve |
cut |
cutoff value |
input |
cutoff type, either sensitivity, specificity, threshold, PPV or NPV |
prevalence |
Prevalence of the endpoint in the study population. |
annotate |
if TRUE, the full ROC curve is returned as an attribute |
Details
This function computes the sensitivity, specificity, threshold, PPV and NPV at a given cutoff value from a ROC curve.
NPV and PPV are computed only if a prevalence is provided as input.
If the ROC curve is not provided, it will be computed from the predictor and outcome.
Value
a vector with sensitivity, specificity, threshold, PPV and NPV at the given cutoff.
[Package alternativeROC version 1.0.0 Index]