Page 1 of 1

ETA

Posted: Sun Oct 03, 2021 6:50 am
by rhys_lauren
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

Posted: Sun Oct 03, 2021 10:42 am
by jonathon
that's not something i'm familiar with, but someone else might be able to help out.

jonathon

Re: ETA

Posted: Mon Oct 04, 2021 12:02 am
by MAgojam
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.

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)
}
Copy and paste into the Rj editor and use it with your variables as you can see in the attached screenshot.
ETA.png
ETA.png (64.12 KiB) Viewed 8343 times
Cheers,
Maurizio