-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalized eta2 and Omega2 #42
Comments
Maybe of relevance here: |
And there is implementation of generalized omega^2 (and their CIs!) here: (And detailed post explaining it: https://www.aggieerin.com/shiny-server/tests/gosrmss.html) |
This is the if (!is.null(observed) & length(observed) > 0) {
obs <- rep(FALSE, nrow(tmp2))
for (i in observed) {
if (!any(grepl(paste0("\\b", i, "\\b"), rownames(tmp2))))
stop(paste0("Observed variable not in data: ",
i))
obs <- obs | grepl(paste0("\\b", i, "\\b"),
rownames(tmp2))
}
obs_SSn1 <- sum(tmp2$SS * obs)
obs_SSn2 <- tmp2$SS * obs
}
else {
obs_SSn1 <- 0
obs_SSn2 <- 0
}
es_df$ges <- tmp2$SS/(tmp2$SS + sum(unique(tmp2[, "Error SS"])) +
obs_SSn1 - obs_SSn2) Need to see how to implement this here. |
I think this calculation of CIs is somewhat off - the degrees of freedom (den) cannot be the same as those for the partial eta square, they would have to be smaller. |
Eta2G works (Still need to add Omega2G) library(effectsize)
options(contrasts = c('contr.sum', 'contr.poly'))
data(obk.long, package = "afex")
m_afex <- afex::aov_car(value ~ treatment * gender + Error(id),
data = obk.long, observed = "gender")
m_aov <- aov(value ~ treatment * gender + Error(id),
data = m_afex$data$long)
afex::nice(m_afex, es = "ges")
#> Anova Table (Type 3 tests)
#>
#> Response: value
#> Effect df MSE F ges p.value
#> 1 treatment 2, 10 1.52 3.94 + .289 .055
#> 2 gender 1, 10 1.52 3.66 + .189 .085
#> 3 treatment:gender 2, 10 1.52 2.86 .295 .104
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
eta_squared(m_aov, generalized = "gender")
#> Group | Parameter | Eta2 (generalized) | 90% CI
#> ------------------------------------------------------------
#> id | treatment | 0.31 | [0.00, 0.58]
#> id | gender | 0.14 | [0.00, 0.47]
#> id | treatment:gender | 0.31 | [0.00, 0.58] Created on 2020-10-09 by the reprex package (v0.3.0) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@IndrajeetPatil It is my dream that people use Epsilon squared instead of Omega squared because (1) Epsilon is actually less biased! (2) Calculating Omega is a pain in the a**... |
Ah, I see. My understanding about this is mostly based on Lakens' review of effect sizes: |
Same - but even Lakens is perfect ;) From: https://doi.org/10.1177/2515245919855053 (Note that adjusted eta is equal to epsilon) |
Thanks 👍 I will check it out. I am planning to default to generalized omega-squared in my packages, but maybe I should rethink that. |
I will eventually get to Omega2G (and maybe will try to extrapolate to Epsilon2G? We'll see...) |
I also had the same idea about omega > epsilon based on the same source but indeed this is rather compelling evidence |
Can't unsee... We must add the |
I'm putting this on ice. Implementing Omega2G is f*^% hard... |
(Originally part of #5 )
https://doi.org/10.1037/1082-989X.8.4.434
The text was updated successfully, but these errors were encountered: