R/curvesegslope.R

Defines functions curvesegslope

Documented in curvesegslope

curvesegslope <-
function(curve.fpr,curve.tpr){
  curve.segslope=c()
  for (i in 1:(dim(curve.fpr)-1))
  {
    if (curve.fpr[i]!=curve.fpr[i+1])
      curve.segslope[i]=(curve.tpr[i]-curve.tpr[i+1])/(curve.fpr[i]-curve.fpr[i+1])
    else
      curve.segslope[i]=-Inf
  }
  return(curve.segslope)
}

Try the Comp2ROC package in your browser

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

Comp2ROC documentation built on May 2, 2019, 3:35 p.m.