I did Dunnett's test and Steels test using R, but I cannot know how to calculate the effect size. Could you show me how to calculate the effect sizes for Dunnett's test and Steels test.
## https://zenn.dev/masahiro_kondo/articles/7a0250c97e41f6
#data generation
set.seed(1234)
n <- 200
th1 <-
data.frame(ID = c(1:n)) %>%
mutate(Group = case_when(
ID <= n/4 ~ "A",
ID <= 2*n/4 +10 ~ "B",
ID <= 3*n/4 -10 ~ "C",
ID <= n ~ "D"))
th1$Group <- as.factor(th1$Group)
y <- c(
round(rnorm(n=50, mean=0, sd=1),2),
round(rnorm(n=50, mean=0.2, sd=1),2),
round(rnorm(n=50, mean=0.4, sd=1),2),
round(rnorm(n=50, mean=-0.2, sd=1),2)
)
th2 <- cbind(th1, y)
###Dunnett test
library(multcomp)
fx=factor(th1$Group)
summary(glht(aov(y~fx),linfct=mcp(fx="Dunnett")))
###Steel test
Steel <-nparcomp(y ~ Group, data=th2, asy.method = "mult.t",
type = "Dunnett", control = "A",alternative = "two.sided",info = FALSE)
summary(Steel)
In order to calculate the effect size, you can use Cohen's d. To do this in R you can use multiple packages, including
lsrandeffsize.So using package
effsizeand your data (th2) we first need to extract groups in order to calculate the effect site.And the output for AB
Cohen's d
This might also help: https://www.statology.org/cohens-d-in-r/
But for the Steels test, you could try Rank-Biserial Correlation as an effect size (below is example for group A and B)
See also here: https://www.researchgate.net/post/What_is_the_most_appropriate_effect_size_type_for_mann_whitney_u_analysis
https://www.rdocumentation.org/packages/effectsize/versions/0.7.0/topics/rank_biserial