[R-meta] Calculating marginal/least squares means with two factors - rma.mv | metafor

Liam Kendall ||@m@k@kend@|| @end|ng |rom gm@||@com
Mon Jan 21 23:43:26 CET 2019

Dear all,

I am conducting a meta analysis with two factorial moderator/predictor
variables. I would like some help calculating marginal/least squares means
for the group combinations to see if they are significantly more or less
than zero (e.g. Factor A1 + Factor B1 > 0) as well as if they are
significantly different from one another(i.e. pairwise comparisons). I
realise I can re-level the factors to achieve my first aim but this will
not be enable me to look at pairwise comparisons.

I tried and failed to adapt the emmeans code for an rma.mv object following
this guide (
https://cran.r-project.org/web/packages/emmeans/vignettes/xtending.html) so
I was wondering if anyone has had success adapting lsmeans/emmeans for a
rma.mv / metafor model object?

Any help would be much appreciated. I have provided an example data frame
and model below as a start.

Many thanks,


#Data frame

example=structure(list(yi = c(-0.548565951748838, -0.164303051291276,
-0.0254520632036632, -0.0233556263771351, -0.0285885006937935,
0.0117786991926127, -0.000590493078864322, 0.0222231367847103,
-0.0641931576424949, -0.0164387263440607, -0.151696143283091,
-0.0826917158451134, -0.111225635110224, 0.0741079721537218,
-0.167054084663166, -0.220542769614152, -0.0689928714869514,
-0.154150679827258, -0.0100503358535015, -0.0304592074847086,
-0.139939388897495, -0.167587694187896, -0.0525401403821952,
-0.061295387688433, 0.0878002427858518, 0.0790449954796141,
-0.0271157097728215, -0.0336594753512927, 0.0215062052209637),
    vi = c(3.65256775588963e-05, 2.06660766466872e-05,
    1.56417471740522e-06, 1.56206449445605e-06, 1.10168792085364e-06,
    6.23432607076493e-06, 3.96607651507311e-05, 0.00302789999884411,
    0.00206654950572419, 8.2358635771675e-07, 1.60767239099821e-07,
    0.00396607651507311, 0.00396607651507311, 7.34458613902428e-06,
    7.34458613902428e-06, 7.34458613902428e-06, 7.34458613902428e-06,
    2.20337584170728e-05, 2.20337584170728e-05, 2.62914175316163e-07,
    2.31792109687421e-07, 2.38346536711187e-06, 2.26344954289566e-06,
    1.85676190504622e-06, 1.73674608083001e-06, 1.23468002879564e-06,
    1.18221030259889e-06, 5.29878610033144e-07, 2.21377164546603e-07
    ), A = structure(c(1L, 3L, 2L, 2L, 2L, 2L, 1L, 3L, 2L, 2L,
    2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L,
    1L, 2L, 2L, 3L, 3L), .Label = c("B", "C", "D"), class = "factor"),
    B = structure(c(3L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 3L, 1L, 1L,
    1L, 4L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L,
    3L, 3L, 1L, 1L), .Label = c("one", "two", "three", "four"
    ), class = "factor")), row.names = c(1L, 2L, 4L, 5L, 6L,
7L, 9L, 10L, 12L, 13L, 16L, 17L, 22L, 23L, 32L, 33L, 34L, 35L,
36L, 37L, 38L, 39L, 42L, 43L, 44L, 45L, 48L, 49L, 56L, 58L), class =



	[[alternative HTML version deleted]]

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