0

Any suggestions on how to best implement a power analysis in R when having a binomial generalized linear mixed model (glmm) with 2 categorical predictors as fixed effects (2 levels and 8 factor levels) and testing hypotheses through model comparison with Likelihood-Ratio-Tests (LRT) are welcome. My hypothesis is e.g.: Does the null model explain the data better than the model with fixed effect "X"? Which I'll test by comparing two models using a LRT with the command anova(m0, m1). The package mixedpower gives the option to simulate estimates of parameters of lme4::glmers which is rather useful. Though I'm wondering (given our hypohesis and how we want to test it), if a simulation-based power analysis of the LRT between models would be a better choice than doing a simulation-based power analysis on one full model, what this package seems to offer only. I am looking for any suggestions on how to implement that (preferably easy to use packages) and I'm glad about any comments regarding my line of thought (e.g. if this is even possible, if a power analysis using mixedpower() on one full model and looking at the estimates is a better/equally good option and/or if what I'm asking for is overcomplicating things?).

Best, Sahila

Sahila
  • 35
  • 5
  • Could you please give a link to the 'mixedpower' package? It's not listed in the "Power analysis" section of the [Mixed models task view](https://cran.r-project.org/web/views/MixedModels.html) (looks like it's [on github only](https://github.com/DejanDraschkow/mixedpower) ...) Also: are you testing a null hypothesis that can be summarized by a single parameter (e.g. effect of a single numeric predictor, or a two-level categorical predictor)? – Ben Bolker Jun 20 '23 at 15:22
  • Thanks for your reply! I edited my post accordingly. Yes, this package is on github only so far, but easy to download and use. Further, I have a mixed model with two categorical predictors as fixed effects, whereas one of them has 8 levels. – Sahila Jun 20 '23 at 15:32
  • Regarding your question on the hypothesis: I have multiple hypothesis, but tried to keep the post simple. I'm interested in the main effect of the one two-level categorical predictor (main effect) and in the interaction effect of this predictor and the categorical 8-level predictor. – Sahila Jun 20 '23 at 16:06

0 Answers0