07-04-2016 07:32 PM
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 ;
Any thoughts as to whether the censoring looks right and what to do about dummy variables would be greatly appreciated.
07-04-2016 08:19 PM
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.