[R-meta] multilevel glmm meta-analysis question
Viechtbauer, Wolfgang (SP)
wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Fri Mar 5 09:04:12 CET 2021
>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)?
Correct. And just to be precise: N should be the number of sampled cats on which a particular prevalence is based. A study might have sampled 200 cats, 100 of which were examined for having parasite A, the other for parasite B. Then N would be 100 for the two prevalences. On the other hand, if all 200 cats were examined for having parasite A and also for having parasite B, then the two prevalences are both based on N=200. Maybe the former scenario is unrealistic, but it's not the total number of sampled cats in each study that matters, but the number of cats based on which a particular prevalence was computed.
>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?
tau^2 is just a name for a particular variance component in certain types of models. Your model will have multiple variance components. Would be nice to report them.
Similarly, the Q-test is a particular type of test for heterogeneity. You can do something analogous by leaving out the variance components and running a likelihood ratio test comparing the model with versus without the variance components.
Best,
Wolfgang
>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.
>
>Best,
>Wolfgang
>
>>-----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,
>>Kayleigh
>>
>>Below here is the output from that model in case it is helpful:
>>
>>Generalized linear mixed model fit by maximum likelihood (Laplace Approximation)
>>['glmerMod']
>> 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
More information about the R-sig-meta-analysis
mailing list