I have data on survival (time in minutes) for animals (salt-marsh hoppers Orchestia gammarellus) from saline and brackish plots, and my model shows a statistically clear interaction between salinity and dry weight (see image below). (actually my model is a GLM with gamma distribution).
I would like to calculate how large this effect is, but I know I cannot use something like Cohen's d, which would partition out the covariate. I was thinking about partial correlation, $\eta^2_{partial}$, which is calculated as $\eta^2_{partial} = \frac{SS_{Treat}}{SS_{Treat} + SS_{Res}}$ (according to this post).
If we look at the image below and focus on the Brackish treatment (red line), my gut feeling is that the effect size is the ratio between the sum of squares of only the red points to the red line versus the sum of squares of all points to the red line (not the overall average). Is this indeed what partial correlation does? Does this not create a smaller number when the difference is larger? Or is $SS_{Res}$ for all points against an overall trendline?
How do I calculate effect size for ANCOVA in R?
I have tried running pcor.test
from the ppcor
library, but that accepts only continuous explanatory variables.
Sample data:
survival_time dry_weight salinity
552 6.7542 B
554 4.9427 A