ETA
-
- Posts: 1
- Joined: Sun Oct 03, 2021 6:46 am
ETA
Hello. I'm new in jamovi. I would just like to ask, can this app solve ETA? not the ETA squared related to ANOVA.. just the ETA correlation.. I'm quite lost in this part of my research.
Re: ETA
Hi, @rhys_lauren.
In Jamovi, there is the Rj Module (the Swiss Army knife), where with a little R code you can get what you need, if at the moment it is not available to click and go.
I'll give you the code with this simple function (can be improved) to get the ETA you are looking for.
Copy and paste into the Rj editor and use it with your variables as you can see in the attached screenshot.
Cheers,
Maurizio
In Jamovi, there is the Rj Module (the Swiss Army knife), where with a little R code you can get what you need, if at the moment it is not available to click and go.
I'll give you the code with this simple function (can be improved) to get the ETA you are looking for.
Code: Select all
eta <- function(f, y, na.rm = FALSE) {
if (is.factor(f)) # convert factor to numeric in case it is a factor
f <- as.numeric(f)
if (!(is.vector(f) & is.vector(y)))
stop("'f' must be vectors or a factor, 'y' must be a vector", call. = FALSE)
if (na.rm) {
i <- !(is.na(f) | is.na(y)) # listwise deletion for NAs
f <- f[i]
y <- y[i]
}
enne <- tapply(y, f, FUN = length)
ymedio <- tapply(y, f, FUN = mean)
my_eta <- sum((ymedio - mean(y))^2 * enne)/sum((y - mean(y))^2)
cat('eta =', my_eta)
}
Maurizio