Skip to content

[R-meta] Testing interaction term of categorical moderators in rma.mv

4 messages · Wolfgang Viechtbauer, Ju Lee

#
Please always cc the mailing list when replying.

1) There are 6 combinations, but the interaction is given by those 2 model coefficients. Please reread http://www.metafor-project.org/doku.php/tips:multiple_factors_interactions which covers exactly this case (two factors with 2 and 3 levels, respectively). So, yes, btt=5:6 tests whether there is an interaction.

2) One can mix, but it can also lead to inconsistencies. For testing fixed effects, the Wald-type test is often preferred anyway.

Best,
Wolfgang

-----Original Message-----
From: Ju Lee [mailto:juhyung2 at stanford.edu] 
Sent: Tuesday, 17 September, 2019 17:33
To: Viechtbauer, Wolfgang (SP)
Subject: Re: Testing interaction term of categorical moderators in rma.mv

Dear Wolfgang,

Thank you very much for your response.

I wanted to follow up from my previous question to clarify:

1) So my model should produce total of 6 categorical groups of interaction term (low:primary, low:secondary, low:tertiary, high:primary, high:secondary, high:tertiary). And what is shown in my mixed model below 5th and 6th coefficient is just subset of these. If I use "btt=5:6" argument, will the model still be testing the main interaction effect of "latitude x trophic level" which produces 6 interaction categories as stated above?

2) It's great to know that it is more advisable not to mix REML and ML estimation in the same study.

I deeply appreciate your time and effort, and everything you've don and are doing for this community.
I sincerely hope to hear from you!
Best wishes,
JU
#
Dear Wolfgang,

Thank you very much for clarifying this. This is extremely helpful!
I will make sure to cc the mailing list for future correspondence.

Sincerely,
JU
#
Dear Wolfgang,

I have to throw in another quick question related to your response. I apologize for this inconvenience.
Now I understood that "btt" argument should basically cover whatever number of coefficients shown in the output. So in case there is only one coefficient for interaction term ( in case of 2 moderators with 2 levels each, so 2x2), I will just need to specify "btt=4:4" as I have done below?
Multivariate Meta-Analysis Model (k = 716; method: ML)

Variance Components:

outer factor: Study      (nlvls = 160)
inner factor: region.chs (nlvls = 4)

            estim    sqrt  k.lvl  fixed                     level
tau^2.1    0.7810  0.8837    470     no  High latitude:Generalist
tau^2.2    1.0199  1.0099    133     no  High latitude:Specialist
tau^2.3    0.9985  0.9992     90     no   Low latitude:Generalist
tau^2.4    0.3626  0.6022     23     no   Low latitude:Specialist

Test for Residual Heterogeneity:
QE(df = 712) = 3194.7722, p-val < .0001

Test of Moderators (coefficient(s) 2:4):
QM(df = 3) = 19.9822, p-val = 0.0002

Model Results:

                                                                              estimate      se     zval    pval    ci.lb
intrcpt                                                                         0.7745  0.0905   8.5554  <.0001   0.5971
factor(Region)Low latitude                                                     -0.5404  0.2551  -2.1179  0.0342  -1.0405
factor(Consumer.habitat.specialization)Specialist                              -0.6569  0.2044  -3.2135  0.0013  -1.0575
factor(Region)Low latitude:factor(Consumer.habitat.specialization)Specialist    0.3572  0.3959   0.9022  0.3670  -0.4188
                                                                                ci.ub
intrcpt                                                                        0.9519  ***
factor(Region)Low latitude                                                    -0.0403    *
factor(Consumer.habitat.specialization)Specialist                             -0.2562   **
factor(Region)Low latitude:factor(Consumer.habitat.specialization)Specialist   1.1332

---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1
Test of Moderators (coefficient(s) 4):
QM(df = 1) = 0.8139, p-val = 0.3670



Thank you very much for your help!
Best regards,
JU
#
Correct. But in this case, you will see that the p-value for the coefficient you are testing is identical to what you get from anova(r1, btt=4). So there is no need to do this, since you already have the test for the interaction.

Best,
Wolfgang

-----Original Message-----
From: Ju Lee [mailto:juhyung2 at stanford.edu] 
Sent: Tuesday, 17 September, 2019 18:05
To: Viechtbauer, Wolfgang (SP); r-sig-meta-analysis at r-project.org
Subject: Re: Testing interaction term of categorical moderators in rma.mv

Dear Wolfgang,

I have to throw in another quick question related to your response. I apologize for this inconvenience.
Now I understood that "btt" argument should basically cover whatever number of coefficients shown in the output.?So in case there is only one coefficient for interaction term ( in case of 2 moderators with 2 levels each, so 2x2), I will just need to specify "btt=4:4" as I have done below?
Multivariate Meta-Analysis Model (k = 716; method: ML)

Variance Components: 

outer factor: Study      (nlvls = 160)
inner factor: region.chs (nlvls = 4)

            estim    sqrt  k.lvl  fixed                     level
tau^2.1    0.7810  0.8837    470     no  High latitude:Generalist
tau^2.2    1.0199  1.0099    133     no  High latitude:Specialist
tau^2.3    0.9985  0.9992     90     no   Low latitude:Generalist
tau^2.4    0.3626  0.6022     23     no   Low latitude:Specialist

Test for Residual Heterogeneity: 
QE(df = 712) = 3194.7722, p-val < .0001

Test of Moderators (coefficient(s) 2:4): 
QM(df = 3) = 19.9822, p-val = 0.0002

Model Results:
                                                                              estimate      se     zval    pval    ci.lb
intrcpt                                                                         0.7745  0.0905   8.5554  <.0001   0.5971
factor(Region)Low latitude                                                     -0.5404  0.2551  -2.1179  0.0342  -1.0405
factor(Consumer.habitat.specialization)Specialist                              -0.6569  0.2044  -3.2135  0.0013  -1.0575
factor(Region)Low latitude:factor(Consumer.habitat.specialization)Specialist    0.3572  0.3959   0.9022  0.3670  -0.4188
                                                                                ci.ub     
intrcpt                                                                        0.9519  ***
factor(Region)Low latitude                                                    -0.0403    *
factor(Consumer.habitat.specialization)Specialist                             -0.2562   **
factor(Region)Low latitude:factor(Consumer.habitat.specialization)Specialist   1.1332     

---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Test of Moderators (coefficient(s) 4): 
QM(df = 1) = 0.8139, p-val = 0.3670

Thank you very much for your help!
Best regards,
JU