BookmarkSubscribeRSS Feed
jaelee22
Fluorite | Level 6

I am trying to find some measurements based on disease adjusting for age.

2 groups - has disease and healthy. The mean difference in age is about 10 years. 

I have 4 different types of measurements but I don't know to do an AUC adjusting for age. 

Please help. 

 

%modstyle(name=linestyle, parent=statistical, type=CLM, linestyles=Solid MediumDash Solid)
ods listing style=linestyle;

proc template; 
define statgraph Graphics.AUC; 
   notes "Receiver Operating Characteristic Overlaid Curves";
   dynamic _byline_ _bytitle_ _byfootnote_;
   BeginGraph / designwidth=defaultDesignHeight;
      entrytitle 'Age Adjusted AUC of vessel parameters';
	  entryfootnote '*from a logistic regression controlling for inter-eye correlation*';
      layout overlayequated / equatetype=square yaxisopts=(gridDisplay=auto_on label="Sensitivity" shortlabel="TPF" offsetmin=0.05 offsetmax=0.05) 
xaxisopts=(gridDisplay=auto_on label="1 - Specificity" shortlabel="FPF" offsetmin=0.05
         offsetmax=0.05) commonaxisopts=(tickvaluelist=(0 .25 .5 .75 1) viewmin=0 viewmax=1);
         lineparm x=0 y=0 slope=1 / clip=true extend=true;
         seriesplot y=_SENSIT_ x=_1MSPEC_ / tip=(group y x) group=_ROC_ index=_GROUP_ name="Step" primary=true;
         discretelegend "Step" / title="ROC Curve (Area)";
      endlayout;
      if (_BYTITLE_)
         entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT;
      else
         if (_BYFOOTNOTE_)
            entryfootnote halign=left _BYLINE_;
         endif;
      endif;
   EndGraph;
end;run;


proc genmod data=rr_g;
class PID;
model age=VAD_A;
repeated subject=PID;
output out=out1 predicted=pre1;run;

proc genmod data=rr_g;
class PID;
model age=Flux_a;
repeated subject=PID;
output out=out2 predicted=pre2;run;

proc sort data=out1;by PID; proc sort data=out2; by PID; run;
data pregee;merge out1 out2 ;by PID;if not missing(pre1) and not missing(pre2);run;

ods graphics on; ods trace on; ods select ROCOverlay;
ods output ROCOverlay=ROCOverlaydata;proc logistic data=pregee;model age(event='1')=;
roc 'VAD' pred=pre1;
roc 'Flux' pred=pre2;
roccontrast/estimate=allpairs; run;

data rocoverlaydata2;set rocoverlaydata;if _ROC_='Model  (0.5000)' then delete;run;

proc sgrender data = rocoverlaydata2 template = Graphics.AUC; run;

ods graphics off; ods html close;
4 REPLIES 4
Reeza
Super User
If age is your outcome variable (left hand side of model statement) how you can you adjust for it as well?
jaelee22
Fluorite | Level 6

I guess my model is wrong. The outcome variable should measured parameters. 

Should it be switched?

 

Reeza
Super User
Given what you've posted here I don't know.
Do you know how to do logistic regression with repeated data?
jaelee22
Fluorite | Level 6

I have used Proc Genmod in the past do to a logistic regression with repeated data. But I have never got a formal training in SAS, mostly reading and forums. 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1341 views
  • 0 likes
  • 2 in conversation