[R-sig-ME] glmer() cluster sample size

Hedyeh Ahmadi hedyeh@h @end|ng |rom u@c@edu
Fri Mar 31 01:11:18 CEST 2023


Hello all,
I'm running a glmer() model with 3 levels where individuals are nested within 21 sites and each individual has 1 to 2 repeated measures. My model has the random effect structure (1|site/subjet_id).

So I have sample sizes in glmer() output for 3 levels as follows:
Site=21
Subject_id:site=9334
Total number of observations=17592

I was wondering how are these sample sizes calculated in R?

I was under impression that they are just unique number of site, subject_id, and total number of rows, for complete cases across all my varibles, respectively. This is true for my site and total sample sizes but the subject_id:site sample size is confusing me. Shouldn't this just be the number of unique subject ids? When I look at number rof unique ids, I get 9301 but the glmer() output for subject_id:site is 9334.

Thank you in advance for your time.


 Best,


Biostatistician​
Keck School of Medicine
Department of Preventive Medicine
University of Southern California

LinkedIn
www.linkedin.com/in/hedyeh-ahmadi<http://www.linkedin.com/in/hedyeh-ahmadi>



	[[alternative HTML version deleted]]



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