05-10-2017 08:10 AM
I want to minimize the euclidean distance between the point (0,1) and my ROC curve. I have trained my logistic model in the set train2007 and want to test the model on the set pred2008. I have tried this code:
proc logistic data=sasdata.train2007;
model flag(event="1") = TL_TA EAT_TA / CTABLE outroc=troc;
score data=sasdata.pred2008 out=valpred outroc=vroc;
the thing is, CTABLE only gives me the misclassification for the train2007 dataset. I want to find the misclassification for the pred2008 dataset and find the optimal cut off point by minimizing the euclidean distance in that dataset.
05-10-2017 09:47 AM
Since you can get ROC table , you can get that cut off point ( make _FALPOS_ and _FALNEG_ as small as it could)
05-10-2017 10:31 AM - edited 05-10-2017 11:14 AM
And one more thing. My first observation has the lowest mis classifikation, it has only false negatives of 1000. That means that the optimal cuttoff would be in (0,0). However, my ROC curve looks like the attached document. We can see from the curve that thats now where the least euclidean from (0,1) to the curve is not (0,0). I thought the minimum euclidean distance would be where the minimum misclassification of both false positives and false negatives is? And from the ROC curve, thats not the point (0,0)
05-11-2017 08:10 AM
OUTROC table also could give you sensitity and 1-specitify
I don't understand your euclidean distance here. You mean the point (slope=1)?
05-11-2017 08:35 AM
Actually, i think I'm just misunderstanding exactly what the minimum euclidean distance from (0,1) to the ROC curve is saying. The articles say it's a way of finding an optimal cut off point. I though the minimum euclidean distance cutoff point gave me where both false negatives and false positves is at a minimum, but thats not what the minimum euclidean distance gives me; i just want to know what it is it gives me then?
05-11-2017 08:50 AM - edited 05-11-2017 09:09 AM
I think you mean the point which has slope=1.
You can get it by calculated slope .
Here y is sensitity, x is 1-specitity.
you can calculated these slope by the two obs next to each other.
when you see slope > 1 and after slope < 1, then you can get slope=1 point.