[R-sig-eco] Comparing survival curves

Gordon Fox gfox at usf.edu
Thu Sep 6 14:27:40 CEST 2012


> I'm doing survival analysis comparing 8 populations. I've used the survdiff 
function for comparing
> survival curves and the result I obtained says that the survivorship curves 
are different (p=1.55e-15).
> Now I want to know if all the curves differ or if there are some of them that 
don't. What function should I use
> for doing this comparison? I thought about running the test again with every 
possible comparison between
> the populations, but this seems like the long way of doing this.

Hi Adriana,
I don't know an R function that will handle this automatically (though it 
wouldn't surprise me if someone out there has done it, as it wouldn't be very 
difficult). Some years ago I wrote some SAS code to do what I think you're 
asking for; it shouldn't be hard to translate that part of the code into R.

The idea behind it is in my chapter on survival analysis in the 
Scheiner & Gurevitch book (Design and analysis of ecological statistics) -- you 
want the 2nd edition, not the 1st. If you want the SAS code (and a discussion of 
these kinds of statistical tests) it's at 
http://www.oup.com/us/companion.websites/9780195131888/chapter13/. 

One big issue (discussed in the Appendix at the URL above) is that tests asking 
whether survival curves are different can sometimes be confusing -- because it 
depends on what you mean by "different" -- for example, some tests give a wrong 
answer (or maybe I should say the answer to a different question than most 
people probably mean) if two curves cross one another. You can get a lot of 
information from visually examining the curves themselves. 

Gordon

AdRiAnA HuMaNeS <adrihumanes at ...> writes:



More information about the R-sig-ecology mailing list