subgroup.analysis.mixed.effects: Subgroup analysis using a mixed-effects model

subgroup.analysis.mixed.effectsR Documentation

Subgroup analysis using a mixed-effects model

Description

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

Usage

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

Arguments

x

An object of class meta, generated by the metabin, metagen, metacont, metacor, metainc, or metaprop function.

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 meta object.

exclude

Single string or concatenated array of strings. The name(s) of the subgroup levels to be excluded from the subgroup analysis. If "none" (default), all subgroup levels are used for the analysis.

Details

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.

Value

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.

Author(s)

Mathias Harrer & David Daniel Ebert

References

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.

See Also

multimodel.inference

Examples

# 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)

# 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)

# 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)


# 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)

## Not run: 
# Generate Forest Plot
# Additional arguments of the meta::forest.meta can be supplied
forest(sgame1, col.diamond = "darkgreen")
forest(sgame2)
forest(sgame3)
forest(sgame4)

## End(Not run)

MathiasHarrer/dmetar documentation built on April 4, 2024, 6:57 p.m.