`subgroup.analysis.mixed.effects.Rd`

This function performs a mixed-effects (random-effects model within subgroups,
fixed-effect model between subgroups) subgroup analysis using `meta`

objects.

subgroup.analysis.mixed.effects(x, subgroups, exclude = "none")

x | An object of class |
---|---|

subgroups | A character vector of the same length as the number of studies within the
meta-analysis, with a unique code for the subgroup each study belongs to. Must have the
same order as the studies in the |

exclude | Single string or concatenated array of strings. The name(s) of the subgroup
levels to be excluded from the subgroup analysis. If |

Returns a `list`

with five objects:

`within.subgroup.results`

: The pooled effect size for each subgroup and corresponding measures of heterogeneity (`Q`

and`I2`

). If the summary measure`sm`

is defined as one of`"RR"`

,`"RD"`

,`"OR"`

,`"ASD"`

,`"HR"`

or`"IRR"`

in the`meta`

object provided in`x`

, the backtransformed (exponentiated) pooled effect for each subgroup effect size along with the 95% confidence interval is also provided.`subgroup.analysis.results`

: The results for the`Q`

-test for subgroup differences, its degrees of freedom`df`

and*p*-value.`m.random`

: An object of class`meta`

containing the results of the random-effects model applied for pooling results in each subgroup in the first step.`method.tau`

: The \(\tau^2\) estimator used for within-subgroup pooling (inherited from the`meta`

object provided in`x`

).`k`

: The total number of included studies.

This function conducts a test for differences in effect sizes between subgroups of a meta-analysis. The function implements a mixed-effect model, in which the overall effect size for each subgroup is calculated using a random-effect model, and the test for subgroup differences is conducted using a fixed-effect model. The implementation follows the fixed-effects (plural) model described in Borenstein and Higgins (2013).

This model is appropriate for subgroup tests when the subgroup levels under study
are assumed to be exhaustive for the characteristic at hand, and are not randomly chosen instances
of a "population" of subgroup levels. For example, the fixed-effects (plural) model used in the function
is valid when differences between studies published before and after a certain year are considered as a
(binary) subgroup level. When subgroup levels can be assumed to be random samples from a distribution of
subgroup levels, a random-effects model is more appropriate, and may be calculated using
the `update.meta`

function.

The function uses the study effect sizes `TE`

and their standard error `seTE`

of the provided
`meta`

object to perform the subgroup analyses. Specifications of the summary measure `sm`

are
inherited and used to backtransform log-transformed effect sizes to their original metrics if necessary.

Results can be inspected by plugging the function output into the `summary`

function. Forest plots
can be generated using `forest`

. Additional arguments of the `forest.meta`

function
can be passed to the `forest`

function for additional styling.

Harrer, M., Cuijpers, P., Furukawa, T.A, & Ebert, D. D. (2019).
*Doing Meta-Analysis in R: A Hands-on Guide*. DOI: 10.5281/zenodo.2551803. Chapter 7.

Borenstein, M. & Higgins, J. P. T. (2013). Meta-Analysis and Subgroups. *Prevention Science, 14* (2): 134–43.

# Example 1: Hedges' g as effect size, precalculated effect sizes suppressPackageStartupMessages(library(dmetar)) suppressPackageStartupMessages(library(meta)) data("ThirdWave") ThirdWave = ThirdWave[c(1,2,3,5,9,18),] m1 <- metagen(TE = TE, seTE = seTE, studlab = paste(ThirdWave$Author), data=ThirdWave, comb.fixed = FALSE, method.tau = "PM", sm = "SMD") sgame1 = subgroup.analysis.mixed.effects(x = m1, subgroups = ThirdWave$TypeControlGroup) summary(sgame1)#> Subgroup Results: #> -------------- #> k SMD SE LLCI ULCI p Q I2 #> information only 3 0.4015895 0.1003796 0.205 0.598 0.00006315313 1.144426 0.00 #> WLC 3 0.9154106 0.4253639 0.082 1.749 0.03139224728 13.058904 0.85 #> I2.lower I2.upper #> information only 0.00 0.82 #> WLC 0.55 0.95 #> #> Test for subgroup differences (mixed/fixed-effects (plural) model): #> -------------- #> Q df p #> Between groups 1.382187 1 0.239729 #> #> - Total number of studies included in subgroup analysis: 6 #> - Tau estimator used for within-group pooling: PM# Example 2: Hedges' g as effect size, raw effect data suppressPackageStartupMessages(library(meta)) data(amlodipine) # Create an arbitrary subgroup for illustration purposes amlodipine$subgroup = rep(c("A","B"),4) m2 <- metacont(n.amlo, mean.amlo, sqrt(var.amlo), n.plac, mean.plac, sqrt(var.plac), data=amlodipine, studlab=amlodipine$study, sm = "SMD") sgame2 = subgroup.analysis.mixed.effects(x = m2, subgroups = amlodipine$subgroup) summary(sgame2)#> Subgroup Results: #> -------------- #> k SMD SE LLCI ULCI p Q I2 I2.lower #> A 4 0.4908376 0.1222146 0.251 0.730 0.00005914562 3.749428 0.20 0 #> B 4 0.3055890 0.1832390 -0.054 0.665 0.09537379290 5.329277 0.44 0 #> I2.upper #> A 0.88 #> B 0.81 #> #> Test for subgroup differences (mixed/fixed-effects (plural) model): #> -------------- #> Q df p #> Between groups 0.7073791 1 0.4003153 #> #> - Total number of studies included in subgroup analysis: 8 #> - Tau estimator used for within-group pooling: DL# Example 3: Risk ratio as effect size, binary outcome data, exlcude one level suppressPackageStartupMessages(library(meta)) data(Olkin95) # Create an arbitrary subgroup for illustration purposes Olkin95$subgroup = c(rep(c("A","B"), 30), rep("C",10)) m3 <- metabin(event.e, n.e, event.c, n.c, data = Olkin95, studlab = Olkin95$author, method = "Inverse") # Use shorthand sgame3 = sgame(x = m3, subgroups = Olkin95$subgroup, exclude = "B") summary(sgame3)#> Subgroup Results: #> -------------- #> k TE seTE RR LLCI ULCI p Q I2 #> A 30 -0.2231716 0.06762125 0.7999776 0.701 0.913 0.0009657571 37.15381 0.22 #> C 10 -0.3385648 0.11920955 0.7127926 0.564 0.900 0.0045102037 10.65963 0.16 #> I2.lower I2.upper #> A 0 0.50 #> C 0 0.57 #> #> Test for subgroup differences (mixed/fixed-effects (plural) model): #> -------------- #> Q df p #> Between groups 0.7088972 1 0.3998102 #> #> - Total number of studies included in subgroup analysis: 40 #> - Tau estimator used for within-group pooling: DL# Example 4: IRR as effect size, incidence data suppressPackageStartupMessages(library(meta)) data(smoking) # Create an arbitrary subgroup for illustration purposes smoking$subgroup = c(rep(c("A"), 4), rep(c("B"), 3)) m4 <- metainc(d.smokers, py.smokers, d.nonsmokers, py.nonsmokers, data=smoking, studlab=study, sm="IRR") sgame4 = subgroup.analysis.mixed.effects(x = m4, subgroups = smoking$subgroup) summary(sgame4)#> Subgroup Results: #> -------------- #> k TE seTE IRR LLCI ULCI #> A 4 0.5099406 0.04699329 1.665192 1.519 1.826 #> B 3 0.4921778 0.01363593 1.635875 1.593 1.680 #> p #> A 0.00000000000000000000000000196502800065307192830461824085133200244878212139380435788797322016358015174530837754218737245537340641021728515625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 #> B 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000279883 #> Q I2 I2.lower I2.upper #> A 42.3079158 0.93 0.85 0.97 #> B 0.6838664 0.00 0.00 0.70 #> #> Test for subgroup differences (mixed/fixed-effects (plural) model): #> -------------- #> Q df p #> Between groups 0.1317782 1 0.7165954 #> #> - Total number of studies included in subgroup analysis: 7 #> - Tau estimator used for within-group pooling: DL