BookmarkSubscribeRSS Feed
2 REPLIES 2
yabwon
Onyx | Level 15

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

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



YoloY
Calcite | Level 5

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 ;

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 430 views
  • 0 likes
  • 2 in conversation