Hi @YoloY
It looks like you are a "fresher" here at communities.sas.com, let me share some advise to help you get help faster.
If you want us to help you modify your code:
1) paste the code, not a print screen of the code,
2) explain what/how would you like the code to be modified...
Bart
Thank you for your advice. I want to add adjusted variables in the process of proc logistic. The code as follows:
%macro WMWodds(_DATASET, _GROUP, _Y) ;
ods listing close ;
proc npar1way data=&_DATASET. correct=no ;
class &_GROUP. ;
var &_Y. ;
ods output WilcoxonScores=WS(keep=Class SumOfScores) ;
run ;
proc transpose data=WS out=FLAG prefix=WSCORE_ ;
var SumOfScores ;
id CLASS ;
run ;
data _NULL_ ;
set FLAG ;
if (WSCORE_1 >= WSCORE_2) then call symput("_FLAG",1);
else call symput("_FLAG",2);
run ;
proc logistic data=&_DATASET. ;
class &_GROUP. ;
model &_GROUP.=&_Y. ;
roc ;
ods output ROCAssociation=AUROC ;
run ;
ods listing ;
data WMWODDS ;
set AUROC ;
if (&_FLAG=1) then do ;
WMWOdds=Area/(1-Area) ;
SE =StdErr/(1-Area)**2 ;
LnWMW =log(Area/(1-Area)) ;
LnSE =StdErr/(Area*(1-Area)) ;
end ;
else do ;
WMWOdds=(1-Area)/Area ;
SE =StdErr/Area**2 ;
LnWMW =log((1-Area)/Area) ;
LnSE =StdErr/(Area*(1-Area)) ;
end ;
z =quantile("NORMAL",0.975) ;
LowerCI =WMWOdds - z*SE ;
UpperCI =WMWOdds + z*SE ;
LowerCI_exp=exp(LnWMW - z*LnSE) ;
UpperCI_exp=exp(LnWMW + z*LnSE) ;
if _n_=1;
keep Area StdErr WMWOdds SE LowerCI UpperCI
LowerCI_exp UpperCI_exp ;
run ;
title "&_DATASET." ;
proc print noobs ;
run ;
%mend ;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.