File: basic2x2Stats.R

package info (click to toggle)
r-cran-caret 7.0-1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,036 kB
  • sloc: ansic: 210; sh: 10; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
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
}