Skip to contents

Pulls the per-arm summaries (study, change_e, sd_e, n_e, change_c, sd_c, n_c) out of a fitted continuous meta-analysis object that carries them, so the result can be passed to responder_analysis(). Currently supports meta objects of the metacont family (which store both arms). Studies excluded from the fitted meta-analysis (its exclude argument) are dropped. When several comparisons share a study label (a multi-arm trial), they get unique study labels and a trial column, so a shared control arm is split rather than double counted. Keep only the comparisons of each active arm against the control arm: meta::pairwise() also creates active-versus- active comparisons, which are not experimental-versus-control contrasts.

Usage

as_responder_data(object, ...)

# S3 method for class 'data.frame'
as_responder_data(object, ...)

# S3 method for class 'meta'
as_responder_data(object, ...)

Arguments

object

A fitted meta-analysis object, or a data frame already in the responder format.

...

Unused; an error if supplied.

Value

A data frame with columns study, change_e, sd_e, n_e, change_c, sd_c, n_c (and trial for multi-arm trials).

Examples

# A metacont-style object is just a list with these fields:
obj <- structure(
  list(
    studlab = c("A", "B"),
    n.e = c(40, 55), mean.e = c(1.1, 0.9), sd.e = c(1.2, 1.3),
    n.c = c(42, 53), mean.c = c(0.2, 0.1), sd.c = c(1.1, 1.2)
  ),
  class = c("metacont", "meta")
)
as_responder_data(obj)
#>   study change_e sd_e n_e change_c sd_c n_c
#> 1     A      1.1  1.2  40      0.2  1.1  42
#> 2     B      0.9  1.3  55      0.1  1.2  53