Programming the statistical procedures from SAS

PROC PHREG

Reply
Occasional Contributor
Posts: 16

PROC PHREG

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. 

 

Grand Advisor
Posts: 16,893

Re: PROC PHREG

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

Ask a Question
Discussion stats
  • 1 reply
  • 108 views
  • 0 likes
  • 2 in conversation