R/curvesegsloperef.R

Defines functions curvesegsloperef

Documented in curvesegsloperef

curvesegsloperef <-
function(curve.fpr,curve.tpr,ref.point) {
  curve.slope=c()
  for (i in 1:dim(curve.fpr))
  {
    if (curve.fpr[i]-ref.point[1]==0)
      curve.slope[i]=-Inf
    else
      curve.slope[i]=(curve.tpr[i]-ref.point[2])/(curve.fpr[i]-ref.point[1])
  }
  return(curve.slope)
}

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.