# What is the best way of modeling this surival data with coxph in r?

I'm trying to model my data in the best way, my project is about acid rain and polymerizing aluminium. I have exposed invertebrates to 3 different water types:

• Reference water (pH 7.3)
• Acidic al-poor water (pH 5.8)
• Acidic al-rich water (pH 5.8)

The background for my experiment is the how polymerizing aluminium affected fish. When aluminium together with acidic water is released into freshwater (with a higher pH), it starts to polymerize, and attaches onto the gills of the fish and suffocates it. Fish is more sensitive to acidic al-rich water, than to acidic al-poor water.

I wanted to explore if this also was the case for invertebrates. This was done with the three water types described above. Where reference water (untreated natural water) acted as overall reference, and I wanted to explore what happened when I exposed invertebrates to acidic al-poor and acidic al-rich water.

Therefore, some of my research questions are:

• “Is aqueous aluminium toxic to A. aquaticus”
• “Is aqueous aluminium the main cause of the previously reported high sensitivity to
freshwater acidification in A. aquaticus or not?”

I has been adviced to use the coxph for my analysis from the survival package.

Will this be the correct way of modelling my data? Where treatment is a factor with 3 levels

coxph(Surv(time, status) ~ treatment


Or should I do this, where I model every treatment individually:

coxph(Surv(time, status) ~ reference + al_poor + al_rich


I'm very grateful for any advice and help on how to model this. Thank you in advance.

The first method, with the 3-level treatment categorical predictor, is correct. If you set pH 7.3 as the reference level, you will get hazards of the 2 treatments relative to that, and a post-hoc test comparing the 2 coefficients will determine whether the effect of pH 5.8 is different depending on the presence of aluminum.*