# Effect size on the difference between group differences (ΔA-B vs ΔA-C) using R

I am trying to calculate effect sizes, but all I can find on the web relates only to the effect size of the difference between two groups. What I am interested in, is the effect size of the difference between group differences.

Not a very clear explanation, I know... I will use the IRIS dataset as example:

I would like to know if

the difference between the Petal.Length of Species setosa and the Petal.Length of Species versicolor (Δsetosa-versicolor)

is larger or smaller than

the difference between the Petal.Length of Species setosa and the Petal.Length of Species viriginica (Δsetosa-virginica).

Therefore I would like to calculate the effect size between Δsetosa-versicolor and Δsetosa-virginica.

For my dataset, I already performed GLM and a subsequent post-hoc test using custom costrasts to assess that there is indeed a difference between groups (corresponding to a significant difference between setosa and versicolor petal length, and between setosa and virginica petal length in the IRIS dataset).

use the dist() function to calculate the difference matrix of Petal.Length between two species. But I lose the information on species, so not very useful. Moreover, I am not sure what I get... all possible pairwise comparisons? Only those between groups? subsequent comparisons? Anyway, how can then use this matrix to calculate the effect size?

as.numeric(dist(iris$$Petal.Length)) abs(apply(combn(iris$$Petal.Length,2), 2, diff))


Use the mes() function from compute.es package. But in this way I am only able to get the effect size between eg setosa and versicolor, not what I am interested in.

mes(mean(iris$$Petal.Length[iris$$Species=="setosa"],na.rm=T), mean(iris$$Petal.Length[iris$$Species=="versicolor"],na.rm=T),
sd(iris$$Petal.Length[iris$$Species=="setosa"],na.rm=T), sd(iris$$Petal.Length[iris$$Species=="versicolor"],na.rm=T),
length(iris$$Petal.Length[iris$$Species=="setosa"]), length(iris$$Petal.Length[iris$$Species=="versicolor"]))


What can I do? I am really blocked here

Thank you very much for your help! =)

PS: question re-directed from StackOverflow