proc phreg data = analysis ;
class c diabetes /descending;
model days*ind(0) = c diabetes id/ rl ;
id = c*diabetes;
hazardratio id;
run;
I am trying to run a simple Cox Regression in SAS. I cant seem to find a way to calculate log-hazard ratio for my variables in the model. The hazard ratio statement and the /rl options gives hazard ratio with 95% CI, but I want log-hazard ratio with 95% CI limits.
Please help.
You can get log-hazard ratio just by taking a log of the hazard ratio, the computations are done with the log hazards and exp is taken in the last step of the estimate (please, see an example here http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_phreg_sect030.htm ). The same applies for Wald and PL CIs ( https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_phreg_a0000000688.htm ), eg
The profile-likelihood confidence limits for the hazard ratio are obtained by exponentiating these confidence limits
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.