Dear Dr. Therneau, Thanks a lot for your answer. I use your survival package often and I find it very useful.
Cheers, Oscar Oscar M. Rueda, PhD. Postdoctoral Research Fellow, Caldas Lab, Breast Cancer Functional Genomics. University of Cambridge. Cancer Research UK Cambridge Institute. Li Ka Shing Centre, Robinson Way. Cambridge CB2 0RE England ________________________________________ From: Therneau, Terry M., Ph.D. [thern...@mayo.edu] Sent: Wednesday, January 29, 2014 2:35 PM To: Oscar Rueda; r-help@r-project.org Subject: Re: [R] anova.coxph with subsets of data --- begin included message --- But If I do > fit <- coxph(Surv(futime, fustat) ~ resid.ds *rx + ecog.ps, data = ovarian, > subset=ovarian$age>50) > anova(fit) > fit2 <- coxph(Surv(futime, fustat) ~ resid.ds +rx + ecog.ps, data=ovarian, > subset=ovarian$age>50) > anova(fit2,fit) The first p-value seems to be wrong. Would anybody please explain to me why? Cheers, Oscar ---- end inclusion ---- The p-value seems wrong because it is wrong. You've found a bug in the survival package. (It has to do with missing values, and the attempt of anova.coxph to ensure that it does not fit a sequence of models such that an observation is dropped partway through the list.) Terry Therneau ______________________________________________ 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.