[R-meta] multilevel glmm meta-analysis question

Kayleigh Chalkowski kzc0061 @end|ng |rom @uburn@edu
Wed Mar 3 21:26:15 CET 2021

Dear Dr. Viechtbauer,

Thank you very much for your insights, I appreciate your time.

So, just to make sure I understand correctly, I should set my weights to “N” (which is a column in my dataset with the total sampled individual cats in each study)?

Also, does it make sense to report measures of heterogeneity like tau^2, Cochran’s Q, etc., here? If so, how would I go about getting these values?

Best regards,
Kayleigh Chalkowski
From: Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer using maastrichtuniversity.nl>
Sent: Wednesday, March 3, 2021 2:59 AM
To: Kayleigh Chalkowski <kzc0061 using auburn.edu>; r-sig-meta-analysis using r-project.org <r-sig-meta-analysis using r-project.org>
Subject: RE: multilevel glmm meta-analysis question

Dear Kayleigh,

Do not use 'weights' in this manner in glmer(). In generalized linear mixed-effects models, we do not specify sampling variances / weights; the model takes care of the appropriate weighting for you. The weights argument also serves a very different function in glmer(). For family=binomial, if 'prevalence' is the proportion of infected cats, then weights should be the actual number of cats studied (so, if 20 out of 100 cats are infected and prevalence = 0.2, then weights = 100 for this study).

The way you are adding random effects to the model leads to crossed random effects. Whether this is appropriate or not (as opposed to using nested random effects) is debatable.

Strictly speaking, this model cannot properly account for the dependence in multiple prevalences (for different parasites) for the same group of cats. If you have prevalence = 0.2 for parasite A and prevalence = 0.2 for parasite B for those 100 cats above, then you do not know if there are 20 cats infected with both parasites, 40 cats are infected (20 with A and 20 with B), or anything in between. Without the raw data, you do not know this. I think one could still go ahead with such an analysis, using a random effect at the study level (as you use) to account for the some of the dependence, but this doesn't fully capture it. The results should therefore be treated with caution.


>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
>Behalf Of Kayleigh Chalkowski
>Sent: Tuesday, 02 March, 2021 20:30
>To: r-sig-meta-analysis using r-project.org
>Subject: [R-meta] multilevel glmm meta-analysis question
>Dear all,
>I am undertaking a multilevel generalized linear mixed model meta-analysis and,
>following the advice here<http://www.metafor-project.org/doku.php/todo> regarding
>multilevel glmms in metafor, I am using the glmer function of the lme4 package. I
>am wondering 1) if that I am specifying my weights correctly and 2) how to get
>values that are important to report for this meta-analysis, like heterogeneity.
>In this meta-analysis, I hypothesize that both socioeconomic and ecological
>variables are important in predicting parasite prevalence in free-roaming cats and
>dogs-- so I'm mainly interested in the effects of moderators (an average
>prevalence isn't very informative). Since each study gives a proportion of
>dogs/cats infected out of a total, I have chosen a binomial model.
>Here is my code for one of my univariable models:
>res_san_3<-glmer(prevalence ~ san_10 + (1 | Species) + (1 | country) + (1 | study)
>+ (1 | uniq), weights = 1/vi, data=feral, family=binomial, na.action=na.fail)
>prevalence is the total infected out of the total sampled dogs/cats of each study,
>and each listed random effect there are the different nested levels. Nested levels
>include species of parasite, followed by country, then study, then each sample
>within each study (because many studies sampled multiple parasites). I used
>inverse variance for the weights here.
>I would greatly appreciate any thoughts, or any helpful information that could be
>referred to me. I've searched the web extensively for help understanding
>multilevel glmms and was unable to find answers to my questions.
>Thank you so much,
>Below here is the output from that model in case it is helpful:
>Generalized linear mixed model fit by maximum likelihood (Laplace Approximation)
> Family: binomial  ( logit )
>Formula: prevalence ~ san_10 + (1 | Species) + (1 | country) + (1 | study) +
>(1 | uniq)
>   Data: feral
>Weights: 1/vi
>     AIC      BIC   logLik deviance df.resid
>  5131.5   5162.8  -2559.7   5119.5     1374
>Scaled residuals:
>    Min      1Q  Median      3Q     Max
>-1.3271 -0.4905 -0.2745  0.1395  1.8286
>Random effects:
> Groups  Name        Variance Std.Dev.
> uniq    (Intercept) 0.650879 0.80677
> study   (Intercept) 0.386573 0.62175
> Species (Intercept) 0.245294 0.49527
> country (Intercept) 0.007934 0.08907
>Number of obs: 1380, groups:  uniq, 1380; study, 449; Species, 204; country, 70
>Fixed effects:
>            Estimate Std. Error z value Pr(>|z|)
>(Intercept) -0.49574    0.29256  -1.694 0.090176 .
>san_10      -0.11641    0.03191  -3.648 0.000264 ***
>Signif. codes:  0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
>Kayleigh Chalkowski, M.Sc.
>PhD Student
>Fulbright Madagascar 2020-2021
>School of Forestry and Wildlife Sciences
>Auburn University
>(607) 319-6342

	[[alternative HTML version deleted]]

More information about the R-sig-meta-analysis mailing list