Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Specifying ROC cutpoints

    I have run an ROC analysis and have been able to output the sensitivity, specificity, +LR, and -LR for every data point of my predictor variable. However, I want to be able to plug in certain sensitivities (ie 90%) and get the predictor variable level, specificity, +LR, and -LR for that given sensitivity. How do I do this?

  • #2
    Well, you face several obstacles here.

    1. There may not actually be any point in your data that corresponds to exactly 90% sensitivity. What would you want to do in that situation?

    2. If your sensitivity is stored as a fraction, i.e. 0.90, (as opposed to integer 90) then you also confront rounding error. There is no exact representation of 0.9 in a finite-binary computer. So conditioning on being exactly equal to 0.90 will almost always fail. (See -help precision-.)

    So let's say your data set contains variables sensitivity, specificy, lr_pos, lr_neg, predictor. In light of these obstacles, probably the most sensible thing to do is to look for observations with sensitivities within a reasonably close range of your target. So you could do things like:

    Code:
    list specificity lr* predictor if inrange(sensitivity, 0.88, 0.92) // OR SOME OTHER SUITABLE RANGE
    If your preference would be to just get a single estimate and you can't find a consistent narrow range to reduce the output to a single observation you might average:

    Code:
    summ specificity lr* predictor if inrange(sensitivity, 0.88, 0.92) // OR SUITABLE RANGE
    The suitable range will depend on how closely spaced the sensitivity values in your data set are.

    Comment


    • #3
      Thank you so much for your thoughtful response. I understand your point that my finite number of data points may not contain a sensitivity of exactly 90%, for example. I actually have been able to generate a table of every single datapoint, and have been able to find data points that are close to the my desired cutpoints. I thought there might be a way to fit a line (curve) to the ROC data points and get an estimate for specific cutpoints.

      Comment


      • #4
        Well, in the case of an ROC curve, if you have enough data points that the observed cutpoints are very close together, linear interpolation (-help ipolate-) could be a reasonable way to go.

        Comment


        • #5
          rocfit fits a smooth line through your data points and leaves behind the parametric regression coefficients that with a little algebra you could probably use to compute arbitrary points along the curve.

          Comment

          Working...
          X