BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
iuri_leite
Fluorite | Level 6

Dear Colleagues,

I have two measures, MPR and Relato30, that I wish to compare against a gold standard: TFV_CAT. Given that I'm working with longitudinal data, I am employing PROC GEE for a dichotomous response.

Below is the code I am using:


proc gee data=dbs_jovens;
class copid;
model tfv_cat(event="1")=mpr/ dist=bin;
repeated subject=copid;
output out=model_mpr p=p_mpr;
run;


proc logistic data=model_mpr;
model tfv_cat(event="1")= / nofit outroc=roc_mpr;
roc pred=p_mpr;
run;

 

proc gee data=dbs_jovens;
class copid;
model tfv_cat(event="1")=relato30/ dist=bin;
repeated subject=copid;
output out=model_relato30 p=p_relato30;
run;


proc logistic data=model_relato30;
model tfv_cat(event="1")= / nofit outroc=roc_relato30;
roc pred=p_relato30;
run;

I would like to test the differences between the curves. Do I need to create a unique dataset that includes the ROC curves from both models (roc_mpr and roc_relato30)?

Thank you in advance.

Regards,
Iuri

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

Put your two predicted probability variables together in the same data set and then use PROC LOGISTIC with two ROC statements and an ROCCONTRAST statement. Below is an example using the data in the "Comparing ROC curves" example in the PROC LOGISTIC documentation. It will work the same way with your GEE models.

proc genmod data=roc;
model popind(event="1")=alb / d=b;
output out=out p=palb;
run;
proc genmod data=out;
model popind(event="1")=tp / d=b;
output out=out p=ptp;
run;
proc logistic data=out;
model popind(event="1")= / nofit;
roc 'alb' pred=palb;
roc 'tp' pred=ptp;
roccontrast; 
run;

View solution in original post

3 REPLIES 3
StatDave
SAS Super FREQ

Put your two predicted probability variables together in the same data set and then use PROC LOGISTIC with two ROC statements and an ROCCONTRAST statement. Below is an example using the data in the "Comparing ROC curves" example in the PROC LOGISTIC documentation. It will work the same way with your GEE models.

proc genmod data=roc;
model popind(event="1")=alb / d=b;
output out=out p=palb;
run;
proc genmod data=out;
model popind(event="1")=tp / d=b;
output out=out p=ptp;
run;
proc logistic data=out;
model popind(event="1")= / nofit;
roc 'alb' pred=palb;
roc 'tp' pred=ptp;
roccontrast; 
run;
iuri_leite
Fluorite | Level 6

Dear @StatDave,

it worked fine.

Many thanks.

Regards,

Iuri

sbxkoenk
SAS Super FREQ

Create and compare ROC curves for any predictive model
By Rick Wicklin on The DO Loop November 14, 2018
https://blogs.sas.com/content/iml/2018/11/14/compare-roc-curves-sas.html

 

Usage Note 52973: Plot and compare ROC curves from a fitted model used to score validation or other data
https://support.sas.com/kb/52/973.html

 

Usage Note 45339: Plot and compare ROC curves from logistic models fit to independent samples
https://support.sas.com/kb/45/339.html

 

Koen

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 584 views
  • 0 likes
  • 3 in conversation