Thank you for your reply!
I could solve this problem. I appreciate your help.
Nagi
Check the last curve .
data F;
set sashelp.class(where=(sex='F'));
y=ifn(_n_>4,1,0);
run;
data M;
set sashelp.class(where=(sex='M'));
y=ifn(_n_>4,1,0);
run;
data test;
set sashelp.class;
y=ifn(_n_<4,1,0);
if _n_<10;
run;
data test_f;
set f test(drop=y);
run;
data test_m;
set m test(drop=y);
run;
proc logistic data=test_f;
model y=age weight height;
output out=pred_f(where=(y is missing)) p=pred_f;
run;
proc logistic data=test_m;
model y=age weight height;
output out=pred_m(where=(y is missing)) p=pred_m;
run;
data want;
merge test(keep=y)
pred_f(keep=pred_f) pred_m(keep=pred_m);
run;
proc logistic data=want;
model y=pred_f pred_m/nofit;
roc 'F' pred=pred_f ;
roc 'M' pred=pred_m;
run;
I just made some dummy Y . i.e. the first 4 obs have y=1 ,others have y=0 .
Thank you for your reply!
I could solve this problem. I appreciate your help.
Nagi
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.