Help using Base SAS procedures

Risk Prediction Model - Cox

New Contributor
Posts: 4

Risk Prediction Model - Cox


I have patient-level clinical trial data, and wish to apply a risk prediction model (Cox PH model) to calculate the group level hazard ratio comparing an intervention with a placebo. How do I do this?


E.g. Risk prediction model: HR =e^(a + b1x + b2x....)

Need to apply to individual level data which compares the risk of events.

Then generate group-level hazard ratio.


Regular Contributor
Posts: 155

Re: Risk Prediction Model - Cox

risk prediction is quite a different task to estimating the hazards ratio of the treatment effect. And the "patient-level data" is taken for granted when discussing a clinical trial. There are good examples online re how to fit cox regression models eg from sas' website:

Super User
Posts: 23,683

Re: Risk Prediction Model - Cox

You say Cox PH and Hazard Ratio, so I'm going to assume you want PROC PHREG. 


Here's a link to the documentation with an example:


You can download the data (see top of example) and run the code. I would recommend you do that before trying it on your own data.

If you have categorical data make sure you look at the CLASS statement, and the PARAM and REF options. 



Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation