When I use proc logistic with SCORE statement,
I wonder if there is a way of setting the cut-off value to help decision?
I also saw a PRIOREVENT statement in the proc logistic,
I wonder what doese this statement mean?
No. If you put validate table in score statement, you can generate Confuse Matrix. data train valid; set sashelp.class; if _n_ le 12 then output train; else output valid; run; proc logistic data=train; model sex=weight height age/ ctable; score data=valid out=score; run; proc tabulate data=score; class f_sex i_sex; table f_sex,i_sex; run;
proc logistic data=sashelp.class; model sex=weight height age/ ctable; run;
Thanks Ksharp,
As I have both training and validation set, I would be more interested in the confusion matrix for my validation data.
If you use proc logist data=taining; model y = x1 x2 x3 / CTABLE pprob=0.3; score data= validation; run;, then the confusion matrix from output would be probably for the training set instead of validation set. Am I right? So How can I create a confusion matrix for my validation data?
No. If you put validate table in score statement, you can generate Confuse Matrix. data train valid; set sashelp.class; if _n_ le 12 then output train; else output valid; run; proc logistic data=train; model sex=weight height age/ ctable; score data=valid out=score; run; proc tabulate data=score; class f_sex i_sex; table f_sex,i_sex; run;
Thanks KSharp,
When I modified my input like the following:
proc logistic data=train des;
model default=&selected PLOTS / CTABLE pprob=0.5;
score data=valid
out=scoval
outroc=roc;
run;
I will have the following warning message:
WARNING: Some plots have more than 5000 observations and are suppressed. Specify the
PLOTS(MAXPOINTS=NONE) option in the PROC LOGISTIC statement to display the plots.
However, this message will disappear if I remove the CTABLE STATMENT.
You can use the following to suppress these warning info. ods select none; proc logistic......... ods select all;
It looks like there is a complete explanation and example for multinomial response in the SAS note
Most of the syntax and ideas should translate to the case of a binary response, since binary is a special case of multinomial.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.