John Field
2007-Dec-31 02:15 UTC
[R] Survival analysis with no events in one treatment group
I'm trying to fit a Cox proportional hazards model to some hospital admission data. About 25% of the patients have had at least one admission, and of these, 40% have had two admissions within the 12 month period of the study. Each patients has had one of 4 treatments, and one of the treatment groups has had no admissions for the period. I used: surv.obj<-Surv(time=time1,time2=time2,event=event,type="counting") model<-coxph(surv.obj~Treatment+cluster(Subject)) and, as explained in the coxph help page, I get a warning message about convergence because the MLE of one of the coefficients is infinite since there are no admissions in one group. I'm looking for suggestions about how to proceed with an analysis of these data. I'd prefer not to ignore the fact that there are multiple admissions, but any alternative ideas I have at the moment do this. Many thanks, John Field ================================Faculty of Health Sciences Statistical Support Service The University of Adelaide, Australia 5005
Daniel Malter
2007-Dec-31 02:29 UTC
[R] Survival analysis with no events in one treatment group
Hi John, I am on the slow side - can you provide sample code. How can one treatment group have no admissions? Let's say there are treatments W, X, Y, Z. Do you mean that NONE of the patients who got admitted the first time and, say, received treatment X during the first admission, have ever had a second admission (in your data). And for the other treatments W, Y, and Z some of those who got admitted the first time came in a second time? Cheers and a happy new year's eve, Daniel ------------------------- cuncta stricte discussurus ------------------------- -----Urspr?ngliche Nachricht----- Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im Auftrag von John Field Gesendet: Sunday, December 30, 2007 9:16 PM An: R-help at r-project.org Betreff: [R] Survival analysis with no events in one treatment group I'm trying to fit a Cox proportional hazards model to some hospital admission data. About 25% of the patients have had at least one admission, and of these, 40% have had two admissions within the 12 month period of the study. Each patients has had one of 4 treatments, and one of the treatment groups has had no admissions for the period. I used: surv.obj<-Surv(time=time1,time2=time2,event=event,type="counting") model<-coxph(surv.obj~Treatment+cluster(Subject)) and, as explained in the coxph help page, I get a warning message about convergence because the MLE of one of the coefficients is infinite since there are no admissions in one group. I'm looking for suggestions about how to proceed with an analysis of these data. I'd prefer not to ignore the fact that there are multiple admissions, but any alternative ideas I have at the moment do this. Many thanks, John Field ================================Faculty of Health Sciences Statistical Support Service The University of Adelaide, Australia 5005 ______________________________________________ R-help at 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.
Daniel Malter
2007-Dec-31 02:35 UTC
[R] Survival analysis with no events in one treatment group
Hi again, I meant some rows of sample data, rather than sample code. Sorry about that. Daniel ------------------------- cuncta stricte discussurus ------------------------- -----Urspr?ngliche Nachricht----- Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im Auftrag von John Field Gesendet: Sunday, December 30, 2007 9:16 PM An: R-help at r-project.org Betreff: [R] Survival analysis with no events in one treatment group I'm trying to fit a Cox proportional hazards model to some hospital admission data. About 25% of the patients have had at least one admission, and of these, 40% have had two admissions within the 12 month period of the study. Each patients has had one of 4 treatments, and one of the treatment groups has had no admissions for the period. I used: surv.obj<-Surv(time=time1,time2=time2,event=event,type="counting") model<-coxph(surv.obj~Treatment+cluster(Subject)) and, as explained in the coxph help page, I get a warning message about convergence because the MLE of one of the coefficients is infinite since there are no admissions in one group. I'm looking for suggestions about how to proceed with an analysis of these data. I'd prefer not to ignore the fact that there are multiple admissions, but any alternative ideas I have at the moment do this. Many thanks, John Field ================================Faculty of Health Sciences Statistical Support Service The University of Adelaide, Australia 5005 ______________________________________________ R-help at 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.
Terry Therneau
2007-Dec-31 15:29 UTC
[R] Survival analysis with no events in one treatment group
John, The key issue with a data set that has no events in one group is that the usual Wald tests, i.e., beta/se(beta), do not work. They is based on a Taylor series argument of the usual type: f(x) = f(x0) + a polynomial in (x-x0), and for infinite beta "x" and "x0" are so far apart that the approximation isn't even close. The score and likelihood ratio statistics are just fine, however. So if you completely ignore any printout that involves the "infinite beta" columns of the estimated variance matrix all should be well. In your case, a second issue is that the likelihood ratio test is not valid for data sets with multiple events per subject. You have to account for the within subject correlation in some way, either by moving to a random effects model or a gee type variance. You have done the latter by adding "cluster" to your coxph call. Thus, only the "robust score test" line of your final output is reliable. The LR test is tainted by multiple events, and the robust Wald by the infinite beta. Use summary() to print all the test statistics. Assume you have variables x1 and x2 in a model, and want to test the importance of adding x3. Stepwise regression programs often use score tests for this, but most users have never done it and don't know how. > fit1 <- coxph(Surv(time1, time2, event) ~ x1 + x2 + cluster(subject), subset= (!is.na(x3))) > fit2 <- coxph(Surv(time1, time2, event) ~ x1 + x2 + x3 + cluster(subject), init=c(coef(fit1), 0)) Now the "robust score test" in fit2 is a test of (coef1, coef2, 0) [no need for x3] vs the model with x3. If you have no missing values you can skip the subset argument, but make sure that the two fits are actually on the same data set: always check that the "n=" part of the printout matches. Terry Therneau Mayo Clinic