ROCC Object Design

Data Members

  • sens, vector of sensitivity values.
  • spec, vector of specificity values.
  • markerlabel, name of the marker.
  • caselabel, name of the state.
  • area, area under the curve.

Public Methods

  • double AreaUnderCurve ()

Private Methods

  • RocDemo (ArrayList, ArrayList, bool, ArrayList, ArrayList, ArrayList)
  • ArrayList DxRule (ArrayList, double, bool)
  • double Trapezint (ArrayList, ArrayList, double, double)
  • ArrayList Approx (ArrayList, ArrayList, ArrayList, int, string)
  • ArrayList Approx (ArrayList, ArrayList, ArrayList, string, int, double, double, int, double, string)
  • ArrayList R_approx (ArrayList, ArrayList, int, ArrayList, int, double, double, double)
  • double approx1 (double, ArrayList, ArrayList, int, appr_meth)

Primary Algorithms

  • 1. Based on userValue, generate cut points:
   udata <- unique(sort(userValue))
   delta <- min(diff(udata))/2
   cutpts <- c(udata - delta, udata[length(udata)] + delta)
  • 2. According to cut points and group, generate sensitivity and specificity:
   for (i in 1:length(cutpts)) 
   {
      pred <- rule(data, cutpts[i])
      sens[i] <- mean(pred[group==1])
      spec[i] <- mean(1 - pred[group==2])
   }
  • 3. For x = { 0, {1-specificity}, 1 } and y = { f(0), {sensitivity}, f(1) }, the area under the curve is:
   h <- diff(x)
   lx <- length(x)
   0.5 * sum(h * (y[-1] + y[-lx]))
Topic revision: r9 - 17 Jun 2005, HaojieWu
 

This site is powered by FoswikiCopyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback