Skip to content
Prev 282 / 5632 Next

[R-meta] FW: Multiple comparisons / Tukey test multilevel meta analysis

The two extra zeros are there in the example because the model includes two more coefficients, one for 'year' and one for 'ablat'. But these are obviously not part of your model, so yes, you should delete them.

And yes, with 15 levels, there are 15*14/2 = 105 pairwise contrasts and that is indeed a lot. If sensible, you might consider collapsing some levels (*before looking at the results!*) to reduce the number of comparisons.

Best,
Wolfgang

-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On Behalf Of Kranzbuhler, Anne
Sent: Tuesday, 17 October, 2017 15:50
To: r-sig-meta-analysis at r-project.org
Subject: [R-meta] FW: Multiple comparisons / Tukey test multilevel meta analysis

Dear Wolfgang, dear Michael,

Thanks a lot for your replies!

I got it to work now with the glht() and contrMat() commands, however leaving out the two zeros that are included in the example code on the website. Actually, I don't know what those two zeros were for but leaving them out got rid of the error that the column length of the linfct was unequal to the number of coefficients in my model. 
Now I am only struggling with the adjustment of p-values. As I am testing so many contrasts (for all 15 levels), adjusting the p-values yields almost no significant results anymore. But I think this is a different problem....

The code that worked for me is:

summary(glht(mods_emos, linfct=cbind(contrMat(c("1"=1,"2"=1,"3"=1,"4"=1,"5"=1,"6"=1,"7"=1,"12"=1,"13"=1,"14"=1,"15"=1,"17"=1,"18"=1,"19"=1,"21"=1), type="Tukey"))), test=adjusted("BH"))

Thanks again and best regards,
Anne

-----Original Message-----
From: Michael Dewey [mailto:lists at dewey.myzen.co.uk]
Sent: Tuesday, October 17, 2017 2:42 PM
To: Kranzbuhler, Anne <a.kranzbuhler at uva.nl>; r-sig-meta-analysis at r-project.org
Subject: Re: [R-meta] Multiple comparisons / Tukey test multilevel meta analysis

Dear Anne

While we wait for Wolfgang to reply there are a couple of things you could try.

1 - do any of the slightly different approaches outlined in http://www.metafor-project.org/doku.php/tips:testing_factors_lincoms work?

2 - what happens if you do traceback() immediately after the error? At least then we would know where it is looking for the model.matrix (that should work on models from rma.mv as far as I can see).

Michael
On 17/10/2017 10:32, Kranzbuhler, Anne wrote: