0

I'd like to calculate the confidence intervals for the epsilon-squared effect size statistic in R. Here is the code I'm using to calculate the epsilon-squared value:

#set up two vectors, a numerical vector and a factor vector (grouping variable)
x=c(3,2,4,7,4,6,9,2,3,4,1,0,8,6,9,5,3,3,6,7,8,2,8,9)
y=as.factor(c(rep("cond1",12),rep("cond2",12)))

#run kruskal-wallis test
kruskal.test(x~y)
library(rcompanion)
df=data.frame(x,y)

#calculate epsilon squared
epsilonSquared(x = df$x, 
           g = df$y)

This gives me my effect size. But the function only outputs a single figure. How can I calculate the confidence intervals of the effect size, please?

clrp
  • 11
  • 1
  • 2

1 Answers1

2

You can read the help, what I just did:

ci If TRUE, returns confidence intervals by bootstrap. May be slow.

epsilonSquared(x = df$x, 
               g = df$y,ci = T)

  epsilon.squared lower.ci upper.ci
1           0.185  0.00479     0.54
denis
  • 5,580
  • 1
  • 13
  • 40
  • Thank you! This returned a single value for me - until I updated the package! Now it returns CI values - thank you so much – clrp Feb 10 '19 at 06:10
  • you are welcome. Don't hesitate to accept the answer if it indeed answered the question – denis Feb 10 '19 at 18:56