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

Hedyeh Ahmadi hedyeh@h @end|ng |rom u@c@edu
Fri Mar 31 16:59:17 CEST 2023


Thank you Thierry! That was it...

Best,

Hedyeh Ahmadi, Ph.D.
Statistician
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>
<http://www.linkedin.com/in/hedyeh-ahmadi><http://www.linkedin.com/in/hedyeh-ahmadi>




________________________________
From: Thierry Onkelinx <thierry.onkelinx using inbo.be>
Sent: Friday, March 31, 2023 12:42 AM
To: Hedyeh Ahmadi <hedyehah using usc.edu>
Cc: R-mixed models mailing list <r-sig-mixed-models using r-project.org>
Subject: Re: [R-sig-ME] glmer() cluster sample size

It looks like some subjects were present at multiple locations. The number of levels is the number of unique combinations of site and subject.

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be<mailto:thierry.onkelinx using inbo.be>
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be<https://urldefense.com/v3/__http://www.inbo.be__;!!LIr3w8kk_Xxm!s82DeZaDffD94Y8Lfu4B6gDYTMqFzNSom9FgEg-ZssQkXtGjbNKvwO63igeiw4Cy1X0ZfzEgwlXuEN8EkBBFomJLhiI$>

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

[https://inbo-website-prd-532750756126.s3-eu-west-1.amazonaws.com/inbologoleeuw_nl.png]<https://urldefense.com/v3/__https://www.inbo.be__;!!LIr3w8kk_Xxm!s82DeZaDffD94Y8Lfu4B6gDYTMqFzNSom9FgEg-ZssQkXtGjbNKvwO63igeiw4Cy1X0ZfzEgwlXuEN8EkBBFcESLUDE$>


Op vr 31 mrt 2023 om 01:11 schreef Hedyeh Ahmadi <hedyehah using usc.edu<mailto:hedyehah using usc.edu>>:
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<https://urldefense.com/v3/__http://www.linkedin.com/in/hedyeh-ahmadi__;!!LIr3w8kk_Xxm!s82DeZaDffD94Y8Lfu4B6gDYTMqFzNSom9FgEg-ZssQkXtGjbNKvwO63igeiw4Cy1X0ZfzEgwlXuEN8EkBBFTiPxn6s$><http://www.linkedin.com/in/hedyeh-ahmadi<https://urldefense.com/v3/__http://www.linkedin.com/in/hedyeh-ahmadi__;!!LIr3w8kk_Xxm!s82DeZaDffD94Y8Lfu4B6gDYTMqFzNSom9FgEg-ZssQkXtGjbNKvwO63igeiw4Cy1X0ZfzEgwlXuEN8EkBBFTiPxn6s$>>



        [[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-models using r-project.org<mailto:R-sig-mixed-models using r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models<https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models__;!!LIr3w8kk_Xxm!s82DeZaDffD94Y8Lfu4B6gDYTMqFzNSom9FgEg-ZssQkXtGjbNKvwO63igeiw4Cy1X0ZfzEgwlXuEN8EkBBFyZ4Ap_w$>

	[[alternative HTML version deleted]]



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