As background, I have data on the survival of insects on six different species of plants. The hypothesis that I'm trying to test is that each plant species produces a survival curve significantly different than all the others. I have it formatted so each row is an organism and the plant species it was grown on represented by a factor in the "Species" column.
eg. |ID|Species| |:-|:------| |1|A. curassavica| |2|S. ducamara| |3|A. sericifera| |4|A. curassavica|
When I run a CPH model in r (survival
& survminer
packages) using the Species column as predictor, I'm given a model where survival curves of five of the species are compared to that of the sixth species (I presume).
Questions:
- Is this even telling me what I want to know? Should I re-format the data so that each species is its own column with a binary indicator of if the insect was raised on that plant? (each insect was only grown on one species)
- Is there an easy way to carry out pairwise comparisons between all of the species to see if they're all significantly different from each other? (I've tried using the
pairwise_survdiff()
function but have run into errors) - Is it even necessary to do pairwise comparisons between all the different species if all the global tests for the model are significant? (eg. Likelihood ratio, Wald, logrank)