From: nuria on 9 Feb 2010 10:24 Hi, I have a simple model were y is a binomial variable (1= sick, 0=not sick) and x is a continous explanatory variable (for instance, weight): proc logistic desc; model y = x/ctable pprob = (0 to 1 by .10) outroc=roc rsq clodds=wald; run; Question 1: How can I know the x value associated to each prob level, that is, associated to each combination of sensitivity and specificity? It is very important to know to set clinical cut-off points. Question 2: How can I get the 95%CI for the AUC (called "c" in the output)? Thanks for your help!
From: "Dennis G. Fisher, Ph.D." on 9 Feb 2010 12:32 Nuria, You ask a good question. We have had a similar problem and had to do this in a brute force method. What we have found helpful is a macro that was a poster at the SUGI in San Antonio that was done by people from Eli Lilly. Please post any answers that you get to the list. Thank you. Dennis Fisher Dennis G. Fisher, Ph.D. Professor and Director Center for Behavioral Research and Services California State University, Long Beach 1090 Atlantic Avenue Long Beach, CA 90813 tel: 562-495-2330 x121 fax: 562-983-1421 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L(a)LISTSERV.UGA.EDU] On Behalf Of nuria Sent: Tuesday, February 09, 2010 7:25 AM To: SAS-L(a)LISTSERV.UGA.EDU Subject: ROC curves Hi, I have a simple model were y is a binomial variable (1= sick, 0=not sick) and x is a continous explanatory variable (for instance, weight): proc logistic desc; model y = x/ctable pprob = (0 to 1 by .10) outroc=roc rsq clodds=wald; run; Question 1: How can I know the x value associated to each prob level, that is, associated to each combination of sensitivity and specificity? It is very important to know to set clinical cut-off points. Question 2: How can I get the 95%CI for the AUC (called "c" in the output)? Thanks for your help!
From: Robin R High on 9 Feb 2010 13:01 Nuria, 1) Since you can save the probabilities in the outroc = data file and also the model coefficients with ODS, you can compute the X values backwards: ods output parameterestimates=prms; proc logistic data=example ; model y = x / outroc=ROCData; run; proc print data=prms NOobs; run; proc transpose data=prms output=coef(drop=_name_) prefix=_; var estimate; id variable; run; proc print data=coef NOObs; run; * find the x values associated with each predicted value; data rocdata; set rocdata; if _n_ = 1 then set coef; drop _intercept _x; x_values = (LOG(_prob_/(1-_prob_))- _intercept)/(_x); proc print data=rocdata(obs=15) NOobs ; run; for 2) the association table is found: ods select association; proc logistic data=example; model y=x; run; You can also compute auc (the c value) with PROC FREQ and then compute the asymptotic standard error and conf intervals in a DATA step: ODS OUTPUT measures=msrs(KEEP=Statistic Value ASE); PROC FREQ DATA=example; TABLE y * x / measures; run; DATA msrs; SET msrs; IF LOWCASE(SUBSTR(statistic,11,3)) eq 'c|r' THEN DO; auc = (value/2) + .5; se_auc = ase/2; auc_upper = auc + 1.96 * se_auc; auc_lower = auc - 1.96 * se_auc; output; end; PROC PRINT DATA= msrs; run; This latter computation is described in "Analyzing Rec Oper Char Curves with SAS" by Mithat Gonen, Chapter 3 There are also bootstrapping routines to compute this interval described in chapter 3.9 Robin High UNMC From: nuria <nchapinal(a)YAHOO.COM> To: SAS-L(a)LISTSERV.UGA.EDU Date: 02/09/2010 11:12 AM Subject: ROC curves Sent by: "SAS(r) Discussion" <SAS-L(a)LISTSERV.UGA.EDU> Hi, I have a simple model were y is a binomial variable (1= sick, 0=not sick) and x is a continous explanatory variable (for instance, weight): proc logistic desc; model y = x/ctable pprob = (0 to 1 by .10) outroc=roc rsq clodds=wald; run; Question 1: How can I know the x value associated to each prob level, that is, associated to each combination of sensitivity and specificity? It is very important to know to set clinical cut-off points. Question 2: How can I get the 95%CI for the AUC (called "c" in the output)? Thanks for your help!
|
Pages: 1 Prev: help with counting occurences of a string Next: Hostname |