I'm trying to figure out how to do a power analysis for a linear mixed effect model with multiple variables, an interaction, and multiple controls (see r code), to find out sample size.
library(lmerTest) FullModel <- lmer(Mean ~ Sex + Age.Years + Rf.G * BMRC + (1|D.G), data = LowModRf.G)
Sex and age in years are my control variables, D.G (Death group) is my random effect, and Rf.G (rainfall) and BMRC (maternal rank) are my fixed effect predictors.
For the life of me, I cannot figure out how to do a power analysis with my model in simr or pwr (I've tried both and I don't this the analysis are correct). Really, any help would be greatly appreciated!