BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
EricCai
Calcite | Level 5

Dear Community,

1) How can the baseline hazard ratio, h_0(t), be estimated in Cox regression from PROC PHREG?  Ironically, the BASELINE statement does not have an option to do this.

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/statug_phreg_sect008.htm

2) Suppose that I split my data set into 2 partitions - a training set and a validation set.  (I'm thinking from a machine learning perspective here.)  I fit my Cox model with the training set, and I want to predict the hazard for the covariates in my validation set with the model that I fitted from my training set.  How do I assess the predictive accuracy of my Cox model?

Thanks,

Eric

1 ACCEPTED SOLUTION

Accepted Solutions
JacobSimonsen
Barite | Level 11

Hi Eric,

1)

You can only get the cumulated hazard function from phreg, not the hazard function itself. In the Cox-model the maximum-likelihood estimate of the cumulated hazardfunction is a stepfunction. Therefore, the estimate of the hazard-function will be zero between the event-times. Since this is not really meaningfull the hazard-function itself is not produced by phreg or any other competing coxregression software. If you really need the hazard-function itself then I will suggest to use some kernel-smoothing on the cumulated hazard-function, but this may be quite cumbersome. Alternative, an easier solution will be an accelerated failuretime model with a weibull baseline function. Then you get all parameters to obtain the hazard-function. Unfortunately, since the baseline hazard has a specific parametric form in the weibull accelerated failuretime models this model is not as flexible as the cox-model.

2)

In Cox's proportional hazard model it is counting processes that are fitted instead of the observations itself. If you only want to use predictions to see if you model fits then you can use the assess statement to see if the counting processes are fitted sufficiently well. As far as I know the predicted survival times are not calculated by phreg. Perhaps the medians from the estimated survivalfunction (obtained by the survival statement) can be used as predictions. But, they should be used carefully, especially if there are censored observations as these can not be compared to a predicted survival time.

If the main goal is to obtain predicted survival times, then again accelerated failuretime models is better suited for that purpose, because in these model the distribution of the survival times are directly fitted by some (parametric) distribution, while in the cox-model it is the counting process that are fitted. The predicted survival times can be obtained directly from the lifereg procedure.

View solution in original post

4 REPLIES 4
JacobSimonsen
Barite | Level 11

Hi Eric,

1)

You can only get the cumulated hazard function from phreg, not the hazard function itself. In the Cox-model the maximum-likelihood estimate of the cumulated hazardfunction is a stepfunction. Therefore, the estimate of the hazard-function will be zero between the event-times. Since this is not really meaningfull the hazard-function itself is not produced by phreg or any other competing coxregression software. If you really need the hazard-function itself then I will suggest to use some kernel-smoothing on the cumulated hazard-function, but this may be quite cumbersome. Alternative, an easier solution will be an accelerated failuretime model with a weibull baseline function. Then you get all parameters to obtain the hazard-function. Unfortunately, since the baseline hazard has a specific parametric form in the weibull accelerated failuretime models this model is not as flexible as the cox-model.

2)

In Cox's proportional hazard model it is counting processes that are fitted instead of the observations itself. If you only want to use predictions to see if you model fits then you can use the assess statement to see if the counting processes are fitted sufficiently well. As far as I know the predicted survival times are not calculated by phreg. Perhaps the medians from the estimated survivalfunction (obtained by the survival statement) can be used as predictions. But, they should be used carefully, especially if there are censored observations as these can not be compared to a predicted survival time.

If the main goal is to obtain predicted survival times, then again accelerated failuretime models is better suited for that purpose, because in these model the distribution of the survival times are directly fitted by some (parametric) distribution, while in the cox-model it is the counting process that are fitted. The predicted survival times can be obtained directly from the lifereg procedure.

EricCai
Calcite | Level 5

This is very helpful, Jacob!  Thank you for your detailed reply! Eric

Alddle
Fluorite | Level 6

 Dear Mr. Jacob Simonson,

 

Thank you for your good answer for this question. Could you please tell me how can I calculate the cumulative baseline subdistribution hazard in proc phreg when consider the competing risk event. That is how to use the proc cumhaz in the fine and gray model in sas. I have tried to use it, but the log described that " The CUMHAZ = option (Baseline statement) is ignored for the Fine and gray competing-risks analysis." 

Really look forward to your reply. Many thanks. 

 

Best,

 

Alddle

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 7565 views
  • 2 likes
  • 3 in conversation