turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Health Care and Pharma
- /
- SAS in Health Care Related Fields
- /
- How does SAS construct a ROC curve

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-12-2016 12:25 AM

I am requesting help in understanding ROC curves as generated by PROC LOGISTIC.

I am using the data in Kleinbaum DG and Klein M : Logistic Regression.

THE data set is Knee fracture or kneefr.

** The outcome variable is fracture** and is binary.

The data set is located at http://web1.sph.emory.edu/dkleinb/logreg3.htm#data

As kneefr.sas7bdat or kneefr,dta

The predictor variables are:

FLEX [Flex the knee] Binary yes, no

WEIGHT ability to put weight on knee [yes no]

AGECAT patients age greater or less then 55years

HEAD Injury to knee head [yes no]

PATELLAR injury to patellar [yes no]

>>>>>>>>>>

**THE CODE COPIED FROM KLEINBAUM and KLEIN**

proc logistic data = kneefr descending;

model fracture = Flex weight agecat head patellar /pprob = .00 to .50 by .05 ctable;

run;

proc logistic data = kneefr descending;

model fracture = Flex weight agecat head patellar /outroc =cat;

run;

Proc Print Data=CAT (obs=10);

run;

SYMBOL = PLUS interpol = RC;

proc gplot data=CAT;

plot _SENSIT_*_1MSPEC_ ;

run;

>>>>>>>>>>>>>>>>>>>>>>>>>>>

** **

** **

** **

** **

**MY QUESTIONS**

- I can understand that from a logistic regression and feeding in the data for an individual patient one obtains a ln(0dd) for that patient. From this the probability of fracture for the individual.

- I do not understand how SAS calculates predicted probabilities by .00 to .50 by 0.5. Nor do I understand what they mean in relation to the number of fractures and /or no fractures at a probability level when printed as the ‘ctable’ or [cut off table].

- The print out of the Cat data gives the probability for I assume each patient. Obs 10 for instance is given as 0.22898. Does this mean given the cut off set at 0.300 this patient is in the positive class either as a TP or a FP.

- I am using SAS university Edition and the code for Gplot does not run. I note that with PROC PLOT a curve is produced. Is this because the University Edition does not support GPLOT?

Is this a correct assumption?

5 Is it possible to obtain a histogram of the _pos_ and _neg_ cases with the probability cut off values on the x axis.

I thank you in advance for any assistance.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to isurveyor

12-12-2016 05:57 AM

http://blogs.sas.com/content/iml/2011/07/29/computing-an-roc-curve-from-basic-principles.html

I do not understand how SAS calculates predicted probabilities by .00 to .50 by 0.5. Nor do I understand what they mean in relation to the number of fractures and /or no fractures at a probability level when printed as the ‘ctable’ or [cut off table].

It is not predict value, it is cutoff value.

- The print out of the Cat data gives the probability for I assume each patient. Obs 10 for instance is given as 0.22898. Does this mean given the cut off set at 0.300 this patient is in the positive class either as a TP or a FP.

it should be event=0. False Positive .

- I am using SAS university Edition and the code for Gplot does not run. I note that with PROC PLOT a curve is produced. Is this because the University Edition does not support GPLOT?

An alternative way is using PROC SGPLOT in UE.

Is this a correct assumption?

5 Is it possible to obtain a histogram of the _pos_ and _neg_ cases with the probability cut off values on the x axis.

Check URL.