BookmarkSubscribeRSS Feed
isurveyor
Calcite | Level 5

 

 

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

  1. 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.

 

  1. 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].

 

  1. 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.

 

  1. 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.

 

 

1 REPLY 1
Ksharp
Super User

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

 

http://blogs.sas.com/content/iml/2011/06/03/a-statistical-application-of-numerical-integration-the-a...

 

 

 

 

 

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.

 

 

  1. 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 . 

 

 

  1. 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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 1 reply
  • 1125 views
  • 0 likes
  • 2 in conversation