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;
I guess my model is wrong. The outcome variable should measured parameters.
Should it be switched?
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.