[R] Package "survival" --- Difference of coxph strata with subset?

ryusuke ryusukekenji at hotmail.com
Sun Jul 10 11:37:04 CEST 2011


[code]>require("survival")
> coxph(Surv(futime,fustat)~age + strata(rx),ovarian)
Call:
coxph(formula = Surv(futime, fustat) ~ age + strata(rx), data = ovarian)


     coef exp(coef) se(coef)   z      p
age 0.137      1.15   0.0474 2.9 0.0038

Likelihood ratio test=12.7  on 1 df, p=0.000368  n= 26, number of events= 12 
> coxph(Surv(futime,fustat)~age, ovarian, subset=rx==1)
Call:
coxph(formula = Surv(futime, fustat) ~ age, data = ovarian, subset = rx ==
1)


     coef exp(coef) se(coef)    z     p
age 0.115      1.12   0.0456 2.52 0.012

Likelihood ratio test=8.68  on 1 df, p=0.00321  n= 13, number of events= 7 
> coxph(Surv(futime,fustat)~age, ovarian, subset=rx==2)
Call:
coxph(formula = Surv(futime, fustat) ~ age, data = ovarian, subset = rx ==
2)


     coef exp(coef) se(coef)    z     p
age 0.351      1.42    0.183 1.92 0.055

Likelihood ratio test=6  on 1 df, p=0.0143  n= 13, number of events= 5
[/code]

May I know why I cant separate 
     coxph(Surv(futime,fustat)~age + strata(rx),ovarian)
To be
     coxph(formula = Surv(futime, fustat) ~ age, data = ovarian, subset = rx
== 1)
     coxph(formula = Surv(futime, fustat) ~ age, data = ovarian, subset = rx
== 2)
May I know the difference of these issue? Many thanks...

--
View this message in context: http://r.789695.n4.nabble.com/Package-survival-Difference-of-coxph-strata-with-subset-tp3657397p3657397.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list