In search of Martingale residuals

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

In search of Martingale residuals

Margaret MacDougall
Hello

  I would like to obtain the Martingale residuals for the null version of a Cox regression model I am developing in order that I can plot them against the continuous covariates so as to check their functional forms. However, I cannot obtain these residuals via the SPSS drop-down menus. Is there an SPSS macro available which could assist me?

  Thank you in advance for your kind assistance.

  Best wishes

  Margaret


---------------------------------
 New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
Reply | Threaded
Open this post in threaded view
|

Re: In search of Martingale residuals

Kylie Lange
Hi Margaret,

Searching the SPSS knowledgebase on their support site returns this entry:

*Resolution Subject*: Cox-Snell residuals and Schoenfeld residuals can
be saved directly; martingale and deviance residuals can be computed.

*Resolution Description*:
A Cox-Snell residual is the value of the cumulative hazard function
evaluated at the current case. To save these in SPSS COXREG, check the
box for the Hazard function in the Save dialog box, or in command
syntax, specify the SAVE subcommand with the keyword HAZARD. Schoenfeld
residuals are also known as partial residuals, and are saved by checking
that box in the Save dialog box, or by specifying the PRESID keyword on
the COXREG SAVE subcommand.

Assuming that the STATUS variable is named status, that a value of 1
indicates an observed event time and that the default name of the
cumulative hazard function or Cox-Snell residuals (HAZ_1) is used, the
following commands will compute the martingale and deviance residuals
for the Cox regression model.

compute martingale=(status=1)-HAZ_1.
compute
deviance=sqrt(-2*(martingale+(status=1)*ln((status=1)-martingale))).
if martingale<0 deviance=-deviance.
formats martingale deviance (F8.5).
execute.

Appropriate changes to variable names would need to be made if any of
the assumptions noted above are not true. Also, if you are running a
release of SPSS prior to 12.0, you would need to shorten the variable
name for martingale to eight characters or fewer.

For a discussion of the various types of residuals in a Cox regression
model, see Section 5.1 (pp. 150-158) in Collett, D. (1994). Modelling
Survival Data in Medical Research. London: Chapman & Hall. (Note that
Collett refers to Schoenfeld residuals also as score residuals, but that
there is another type of residual known as a score residual, that is
distinct from a Schoenfeld residual.)

Hope this helps.

Cheers,
Kylie.


On 28/03/2007 2:37 AM, Margaret MacDougall wrote:

> Hello
>
>   I would like to obtain the Martingale residuals for the null version of a Cox regression model I am developing in order that I can plot them against the continuous covariates so as to check their functional forms. However, I cannot obtain these residuals via the SPSS drop-down menus. Is there an SPSS macro available which could assist me?
>
>   Thank you in advance for your kind assistance.
>
>   Best wishes
>
>   Margaret
>
>
Reply | Threaded
Open this post in threaded view
|

Re: In search of Martingale residuals

Margaret MacDougall
Thank you so much, Kylie. I have run the syntax. Could I please verify the URL for the knowledgebase you used.

  Many thanks

  Best wishes

  Margaret


Kylie Lange <[hidden email]> wrote:

Hi Margaret,

Searching the SPSS knowledgebase on their support site returns this entry:

Resolution Subject: Cox-Snell residuals and Schoenfeld residuals can be saved directly; martingale and deviance residuals can be computed.

Resolution Description:
A Cox-Snell residual is the value of the cumulative hazard function evaluated at the current case. To save these in SPSS COXREG, check the box for the Hazard function in the Save dialog box, or in command syntax, specify the SAVE subcommand with the keyword HAZARD. Schoenfeld residuals are also known as partial residuals, and are saved by checking that box in the Save dialog box, or by specifying the PRESID keyword on the COXREG SAVE subcommand.

Assuming that the STATUS variable is named status, that a value of 1 indicates an observed event time and that the default name of the cumulative hazard function or Cox-Snell residuals (HAZ_1) is used, the following commands will compute the martingale and deviance residuals for the Cox regression model.

compute martingale=(status=1)-HAZ_1.
compute deviance=sqrt(-2*(martingale+(status=1)*ln((status=1)-martingale))).
if martingale<0 deviance=-deviance.
formats martingale deviance (F8.5).
execute.

Appropriate changes to variable names would need to be made if any of the assumptions noted above are not true. Also, if you are running a release of SPSS prior to 12.0, you would need to shorten the variable name for martingale to eight characters or fewer.

For a discussion of the various types of residuals in a Cox regression model, see Section 5.1 (pp. 150-158) in Collett, D. (1994). Modelling Survival Data in Medical Research. London: Chapman & Hall. (Note that Collett refers to Schoenfeld residuals also as score residuals, but that there is another type of residual known as a score residual, that is distinct from a Schoenfeld residual.)

Hope this helps.

Cheers,
Kylie.


On 28/03/2007 2:37 AM, Margaret MacDougall wrote:
Hello      I would like to obtain the Martingale residuals for the null version of a Cox regression model I am developing in order that I can plot them against the continuous covariates so as to check their functional forms. However, I cannot obtain these residuals via the SPSS drop-down menus. Is there an SPSS macro available which could assist me?      Thank you in advance for your kind assistance.      Best wishes      Margaret



---------------------------------
 What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.