0
$\begingroup$

I have a mixed effects model with a binomial outcome which I constructed using glmer from the lme4 package in R. In the output from summary(model) I get estimates for each of the fixed effects. This is fine for continuous and dichotomous variables, however, for categorical variables with >2 levels this does not work (as the output produces contrasts). To get the effects for these, I use the anova or drop1 functions. However, these do not include any measure of effect size.

Using the effectsize package, I tried effectsize(model) which provides effect sizes and confidence intervals for the output produced by summary(model), however, what I am interested in is the global effect of a categorical variable with >2 levels (the equivalent to Cohen's d when conducting a normal ANOVA).

How can I calculate this?

$\endgroup$
3
  • $\begingroup$ How would you define such a global effect size? $\endgroup$ Commented Aug 25, 2021 at 2:09
  • $\begingroup$ the equivalent to cohen's d when conducting a normal ANOVA $\endgroup$
    – becbot
    Commented Aug 25, 2021 at 7:28
  • $\begingroup$ Please add that new information to the post as an edit! not only as a comment. Not everybody reads comments, and we want posts to be self-contained. $\endgroup$ Commented Aug 25, 2021 at 11:30

1 Answer 1

0
$\begingroup$

There aren't really global effect sizes for glm(m)s.

You can try Nagelkerke's pseudo-$R^2$. E.g.:

m1 <- glm(gear ~ hp, data = mtcars,
          family = poisson())

m2 <- glm(gear ~ hp + am, data = mtcars,
          family = poisson())

performance::r2(m1)
#> # R2 for Generalized Linear Regression
#>   Nagelkerke's R2: 0.017

performance::r2(m2)
#> # R2 for Generalized Linear Regression
#>   Nagelkerke's R2: 0.657

Created on 2022-01-13 by the reprex package (v2.0.1)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.