[R] How to extract z value from coxph

Thomas Lumley tlumley at u.washington.edu
Wed Aug 4 19:06:49 CEST 2004


On Wed, 4 Aug 2004, Man, Chris T. wrote:

> Hi all,
>
> I have tried to use coxph to determine which variables are significant
> in survival analysis. I also would like to use their z scores as weights
> to build a linear classification model. Although the function outputs
> the z value, but I can't access to it, so that I can write code to
> extract them automatically and pass them to the next function. Can
> someone help?
>

Use the accessor functions:

z <- coef(model)/sqrt(diag(vcov(model)))

as for most regression models.

	-thomas




More information about the R-help mailing list