BookmarkSubscribeRSS Feed
twotwotwo
Calcite | Level 5

Hi,

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;

cards;

45.6   1

190     0

34.5    1

89       0

56       1

45       1

58       0

.......

........

;

10 REPLIES 10
Reeza
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.

twotwotwo
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!

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

twotwotwo
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!

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

twotwotwo
Calcite | Level 5

Hi, Reeza,

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

Reeza
Super User

What's your response variable?

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

Is this hw?

twotwotwo
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!

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

twotwotwo
Calcite | Level 5

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1885 views
  • 0 likes
  • 2 in conversation