R/basic2x2Stats.R

Defines functions basic2x2Stats

basic2x2Stats <- function(x, y, pos, neg)
{
   out <- vector(length = 4, mode = "numeric")
   out[1] <- sensitivity(x, y, pos)
   out[2] <- specificity(x, y, neg)
   out[3] <- posPredValue(x, y, pos)
   out[4] <- negPredValue(x, y, neg)  
   names(out) <- c("Sensitivity", "Specificity", "Pos Pred Value", "Neg Pred Value")
   out
}

Try the caret package in your browser

Any scripts or data that you put into this service are public.

caret documentation built on Aug. 9, 2022, 5:11 p.m.