Thank you for your hopfull help. I did the same thing with an other example: data tab2;
input var1 resp_q$13.;
datalines;
3 Non-répondeur
3 Non-répondeur
3 Non-répondeur
3 Répondeur
4 Non-répondeur
4 Non-répondeur
4 Répondeur
5 Non-répondeur
5 Non-répondeur
5 Répondeur
6 Répondeur
6 Répondeur
7 Non-répondeur
7 Non-répondeur
7 Non-répondeur
7 Non-répondeur
7 Non-répondeur
8 Non-répondeur
8 Répondeur
9 Répondeur
11 Répondeur
;
run;
proc logistic data=tab2 rocoptions(optimal=youden id=id);
id var1;
model resp_q(event='Répondeur')=var1 / outroc=roc_var1 ;
run; ROC curve of proc logistic: The threshold of maximum Youden's index is 8. Output ROC_VAR1: If I take the row of maximum Youden's index: _POS_=3, _NEG_=12, _FALPOS_=1 and _FALNEG=5. Then I do this to verify: data x; set tab2; pred=(var1<=8); run;
proc freq data=x; table pred*resp_q; run; The resulting table doesn't agree with the _POS_, _NEG, _FALPOS_, and _FALNEG_ values in the OUTROC=ROC_VAR1. But if I put ">=8" instead of "<=8", it's good: data x2; set tab2; pred=(var1>=8); run;
proc freq data=x2; table pred*resp_q; run; Why in the first example I have to use "<=" and in the second ">=" ? Thank you.
... View more