BookmarkSubscribeRSS Feed
buder
Fluorite | Level 6

Working on a Cox Proportional Hazard model and have a question about dummy categories and censoring. Much like regular regressions, do you need to drop one of the dummy categories? 

 

In terms of censoring, I am analyzing the effect on mortality rates. So my time dimension will be duration between surey and date of death (in years). I called this term 'survival'

 

The right censoring variable is death status, alive or dead. Where dead = 1 and alive = 0. This term was labeled 'mortality'

 

So the equation I have come up with is: 

 

proc phreg data = test; 

model survival*mortality(0) = sex age_cat_1 age_cat_2 smoking_status ...

 / rl ties=efron ;

run;

 

Any thoughts as to whether the censoring looks right and what to do about dummy variables would be greatly appreciated. 

 

1 REPLY 1
Reeza
Super User

Proc Phreg supports the class statement so I would include your categorical variable  and allow SAS to create the dummy variables. Make sure to set the parameterization method, usually param=ref. 

 

Also, isn't death the event? So then you look at mortality(1), but instead of looking at failure rates you look at survival rates? 

Not sure I'm interpreting your problem correctly. 

 

The documentation has an example on modelling with categorical variables.

 

 http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_phreg_exampl...

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
  • 1 reply
  • 1261 views
  • 0 likes
  • 2 in conversation