BookmarkSubscribeRSS Feed
Calcite | Level 5


I have the data like the following. disease=1 means having the disease; disease=0 means no disease.  Can I draw the cumulative risk graph?  The x-axis is the response (continuous variable), y-axis should be the cumulative risk (probability??) of having the disease. How can I do it?  Thanks!

data test;

input response disease;


45.6   1

190     0

34.5    1

89       0

56       1

45       1

58       0




Super User

Possibly dumb question, but if you have the disease isn't your probability of cumulative risk of having the disease 1?

If you're getting the cumulative risk data from a proc some have the ability to plot them from within the procedures.

If not you could use Proc SGPLOT.

Calcite | Level 5

Thanks for your reply.  Probably I should ask how to calculate the cumulative risk?  Do you know any proc can do it?  Thanks!

Super User

I'm not sure what your data represents.

My guess is it looks like survival data based on your question and then you'd use proc lifetest or proc phreg.

0/1 is your censor variable and response is the time to either having the disease or not, if its not a time measurement then reply back.

Try proc lifetest and check the options.

Calcite | Level 5

Thanks Reeza!  It is not a survival data.  The response is a measurement for a patient.  For this kind of data, how can I do it? Thanks!

Super User

I think you've posted before about this and again the question is still too general to give any comments without more specifics.

If you can't post more details then I recommend finding some similar published articles and seeing what method they used, ie logistic, survival, and then more help could be provided around the specific procedure rather than a general question.. 

Calcite | Level 5

Hi, Reeza,

I did not post this question before.  What other information do you want for this question? 

Super User

What's your response variable?

What's your research question that you're trying to answer?

Is this hw?

Calcite | Level 5

My response variable is one measurement for the patient, like the blood pressure, height, BMI....

My research question is to see: with the measurement differing, what is the risk for a person to get the disease (disease=1). 

Please let me know if you have other questions.  Thanks!

Super User

Ok, I guess with that type of data, I'd be looking at a logistic regression and odds of getting the disease.

See  Example 51.13 Complementary Log-Log Model for Infection Rates

In the SAS 9.2 Docs.

The last table plotted should help give you what you're looking for.

Calcite | Level 5

Thanks! I then found that the effectplot is what I want....


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!

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
  • 10 replies
  • 2 in conversation