[R] about the cox result

Yihui Xie xieyihui at gmail.com
Tue Nov 3 16:02:53 CET 2009


coef(summary(fit_cox)) should give you what you wanted.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-6609 Web: http://yihui.name
Department of Statistics, Iowa State University
3211 Snedecor Hall, Ames, IA



On Tue, Nov 3, 2009 at 12:31 AM, 孟欣 <lm_mengxin at 163.com> wrote:
> Hi all:
> I finished cox analysis like this:
> fit_cox<-coxph(Surv(dat$Time, dat$death) ~ dat$CD4 + strata(dat$gender),data=dat);
>> fit_cox
> Call:
> coxph(formula = Surv(data_ori$Time, data_ori$death) ~ data_ori$drug +
>    strata(data_ori$gender), data = data_ori)
>
>                  coef exp(coef) se(coef)    z    p
> data_ori$drugddI 0.216      1.24    0.146 1.47 0.14
> Likelihood ratio test=2.17  on 1 df, p=0.140  n= 467
>
> I wanna extract the result:
> 0.216      1.24    0.146 1.47 0.14 and the corresponding name "coef exp(coef) se(coef)    z    p"
> from fit_cox.
>
> I use the command:
> str(fit_cox),but I can only find 0.216 of the result,but the other four results( 1.24    0.146 1.47 0.14) can't be found.
>
>
> Anyone can help me?
> Thanks a lot!




More information about the R-help mailing list