[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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.