Obsidian | Level 7

## Schoenfeld residuals calculation

Does anyone know how SAS calculates Schoenfeld residuals in survival analysis? Are they scaled? My understanding is that it's the value of a covariate for a given individual subtracted by the weighted average of that covariate among individuals who failed (i.e. got the outcome of interest) at time T. I would think that in order to get the weighted average, you would need to multiply the model coefficient times the individual covariate value, and then add that to the covariate to get an expected value, which you would then take the average of. The average expected value would be among those who did and did not get the outcome of interest at time T. However, when I tried calculating this by hand, it didn’t match with the results. I’m also unsure as to how SAS calculates a residual for binary or categorical variables.

Any insight would be appreciated. Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
SAS Super FREQ

## Re: Schoenfeld residuals calculation

No. In the previous paragraph, the function d(s) is defined as

"Let d(s) = \Sigma \Delta(_iit, which is the number of subjects that have an event at t. "

3 REPLIES 3
Super User

## Re: Schoenfeld residuals calculation

Does this help?

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.2&docsetId=statug&docsetTarget=statu...

https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.2&docsetId=statug&docsetTarget=statu...

@Caetreviop543 wrote:

Does anyone know how SAS calculates Schoenfeld residuals in survival analysis? Are they scaled? My understanding is that it's the value of a covariate for a given individual subtracted by the weighted average of that covariate among individuals who failed (i.e. got the outcome of interest) at time T. I would think that in order to get the weighted average, you would need to multiply the model coefficient times the individual covariate value, and then add that to the covariate to get an expected value, which you would then take the average of. The average expected value would be among those who did and did not get the outcome of interest at time T. However, when I tried calculating this by hand, it didn’t match with the results. I’m also unsure as to how SAS calculates a residual for binary or categorical variables.

Any insight would be appreciated. Thanks in advance!

Obsidian | Level 7

## Re: Schoenfeld residuals calculation

Yes, somewhat. Is the d in the formula (attached) the deviance of the residuals? Thanks for your help!

SAS Super FREQ

## Re: Schoenfeld residuals calculation

No. In the previous paragraph, the function d(s) is defined as

"Let d(s) = \Sigma \Delta(_iit, which is the number of subjects that have an event at t. "

Discussion stats
• 3 replies
• 2010 views
• 2 likes
• 3 in conversation