[R-sig-ME] Questions about weights in lmer in lme4 package

Broekman, M.J.E. (Maarten) m@@rten@broekm@n @end|ng |rom ru@n|
Mon Oct 31 15:34:57 CET 2022


Hello,
I have a few questions about the weight argument in the lmer function of the lme4 package. It would be great if someone help me with these questions.
I am trying to fit a linear mixed effect model using the lme4 package in which I want to study the effect of several variables on home range size. When I fit models without using weights, there are no problems. However, in my dataset I have population averages of home range size with differences in population size (number of individuals included in the average home range size). To account for differences in population size, I want to use the number of individuals in each population as weights in the model. As a next step, I want to calculate confidence intervals of the marginal R2, using the bootMer function. However, the confidence intervals look odd when using the weighted model, i.e. the R2 squared from the model is not within the confidence interval. I do not have this problem when using the unweighted model.
After reading this post: https://stats.stackexchange.com/questions/491625/meaning-of-the-weight-argument-in-glmer-and-lmer, I also tried scaling the weights by the mean weight, i.e., weight = #individuals/mean(#individuals). Now, the confidence intervals of the marginal R2 do include the marginal R2 from the model. The residual variation of the model is also much lower for the model with the scaled weights.
I have the following questions:

  *   Why does parametric bootstrapping leads to reasonable confidence intervals (confidence interval does include marginal R2 reported for the model) when using scaled weights, and not when using unscaled weights?
  *   Why does scaling the weights affect the residual variation of the model?
  *   Should the method with the scaled weights be the preferred method? And if yes, why?

I spend a lot of time trying to find answers to these questions on the internet. I found a lot of information, but not the answers I needed, so it would be great if someone can help me with these questions.

Thank you in advance!

Best regards,
Maarten Broekman


	[[alternative HTML version deleted]]



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