[R-sig-ME] Calculating proportion variance explained by random effects in zi-component

Anthony R. Ives @r|ve@ @end|ng |rom w|@c@edu
Mon Dec 19 15:01:16 CET 2022


Dominik,

Are you sure you want to report the proportion of variance each random effect explains? I know this is very common, but I think it is more informative to report a partial R2 for each the random effects. A partial R2 would give heuristically the explanatory power of the model lost when a random effect is removed. In your particular case, this will be much easier to compute. Partial R2s based on likelihoods only require the logLik of the full and reduced models. You could just use the code from the package rr2 (which might need a few changes for glmmTMB()).

Cheers, Tony

From: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org> on behalf of Ziaja, Dominik <dominik-ziaja using web.de>
Date: Monday, December 19, 2022 at 7:39 AM
To: r-sig-mixed-models using r-project.org <r-sig-mixed-models using r-project.org>
Subject: [R-sig-ME] Calculating proportion variance explained by random effects in zi-component
Dear GLMM-modelers,

I would like to report the proportion of variance each random effect
explains in addition to the fixed effects. For this, I use the
"get_variance" function from the insight package for the conditional
components. For the data I want to model I needed to implement a
zero-inflation model (not a hurdle model) However, I can't really find a
downstream wrapper/implementation to use the get_variance function onto
the zero-inflation component (as is the case for e.g. emmeans, Anova).

Using the VarCorr function/the summary output I'm able to get the
variances of the individual random effects. However, I don't exactly
know how to calculate the other sums of variances reported with the
insight package (var.fixed, var.residual, var.distribution,
var.dispersion).

I was thinking of 3 different ways to achieve this goal and was
wondering whether someone might have an idea/a hint/a direction.

1. Is there actually an implemented possibility to apply get_variance()
to the zi-component which I simply overlooked?

2. Is there a way to get the information which measurements were used
for the zero-inflation-component of the zero-inflation model so I could
then calculate a binomial model on exactly these measurements. My hope
would be to then apply get_variance() onto this model.

3. How would I go about to calculate the missing variances manually by
myself (var.fixed, var.residual, var.distribution, var.dispersion)?

I also made a stack-overflow post about this some time ago, I hope it is
worded correctly and clearly enough.
Link:
https://stackoverflow.com/questions/74689961/calculate-proportion-of-random-effect-variance-from-zero-inflation-component-of

I'm happy for any answers, hints or directions.

sincerely,
Dominik

_______________________________________________
R-sig-mixed-models using r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list