0
$\begingroup$

I know that in an ANOVA with multiple factors (let's say x1 and x2), the sum of their respective classic eta squared (not 'partial' eta squared) cannot be greater than one and should approximate the total variance of y explained by those factors combined. In my testing, I find that when x1 and x2 are negatively correlated, the sum of their eta squared can be greater than one, as in:

set.seed(1)
n=100
x1 = rnorm(n=n, mean=0, sd=1)
x2 = -1*x1 + rnorm(n, mean=0, sd=.4)
cor.test(x2,x1)$estimate                 # r = -0.919

y = x1 + x2 + rnorm(n, mean=0, sd=.1)

df = data.frame(cbind(x1=x1, x2=x2, y=y))
mod = lm(y ~ x1 + x2, df)
lsr::etaSquared(mod)
# eta.sq_x1 = 0.790     eta.sq_x2 = 0.931

Conversely, when x1 and x2 are positively correlated, their respective eta squared tend toward zero, as in:

set.seed(1)
n=100
x1 = rnorm(n=n, mean=0, sd=1)
x2 = x1+rnorm(n, mean=0, sd=.4)
cor.test(x2,x1)$estimate                 # r = 0.920

y = x1 + x2 + rnorm(n, mean=0, sd=.1)

df = data.frame(cbind(x1=x1, x2=x2, y=y))
mod = lm( y ~ x1 + x2, df)
lsr::etaSquared(mod)
# eta.sq_x1 = 0.038     eta.sq_x2 = 0.042

I would have intuitively thought that in either case, their sum to approximate the R2 from a regression since the eta squared should break down the part of the total variance of y explained by each predictor --> their sum should be close to the overall variance explained by the model, shouldn't it?

I am clearly missing something important here, would anyone know how/why the collinearity between both factors impacts on their eta squared?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.