[R] help--Cox ph model

Song, Guangchun Guangchun.Song at stjude.org
Mon Mar 10 17:43:18 CET 2003


Dear r-users,

I want to use the Cox's ph model to analyze survival data set.  How can I
extract the model coefs. and Wald test p-value or Score?

For example: I use the data set melanom in iSwR package.

> library(survival)
> data(melanom)
> attach(melanom)
> cox.model <- coxph(Surv(days,status==1)~sex)
> summary(cox.model)
Call:
coxph(formula = Surv(days, status == 1) ~ sex)

  n= 205 

     coef exp(coef) se(coef)    z     p
sex 0.662      1.94    0.265 2.50 0.013

    exp(coef) exp(-coef) lower .95 upper .95
sex      1.94      0.516      1.15      3.26

Rsquare= 0.03   (max possible= 0.937 )
Likelihood ratio test= 6.15  on 1 df,   p=0.0131
Wald test            = 6.24  on 1 df,   p=0.0125
Score (logrank) test = 6.47  on 1 df,   p=0.0110


Thanks.

Guangchun



More information about the R-help mailing list