Solved
Contributor
Posts: 40

# Estimate the baseline hazard ratio and assess predictive accuracy in PROC PHREG

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.

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

Accepted Solutions
Solution
‎07-18-2014 07:33 PM
Super Contributor
Posts: 301

## Re: Estimate the baseline hazard ratio and assess predictive accuracy in PROC PHREG

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.

All Replies
Solution
‎07-18-2014 07:33 PM
Super Contributor
Posts: 301

## Re: Estimate the baseline hazard ratio and assess predictive accuracy in PROC PHREG

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.

Contributor
Posts: 40

## Re: Estimate the baseline hazard ratio and assess predictive accuracy in PROC PHREG

Occasional Contributor
Posts: 8

## Re: Estimate the baseline hazard ratio and assess predictive accuracy in PROC PHREG

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

Best,

Alddle

Occasional Contributor
Posts: 8

## Re: Estimate the baseline hazard ratio and assess predictive accuracy in PROC PHREG

Thanks all the same. My question has been relieved by the post as below.

https://communities.sas.com/t5/SAS-Statistical-Procedures/Help-with-computing-cumulative-incidence-p...

☑ This topic is solved.