Skip to contents

One measurement per study and treatment is supported. For repeated continuous outcomes or times use network_meta_repeated() or network_smd_data(). MD uses independent arm mean variances; binary effects use normal/delta approximations. SMD delegates to the joint delta-method constructor.

Usage

network_arm_data(
  data,
  study_id,
  treatment,
  measure = c("MD", "SMD", "logOR", "logRR", "RD"),
  mean = NULL,
  sd = NULL,
  n = "n",
  events = NULL,
  correction = 0.5
)

Arguments

data

Arm-level data.

study_id, treatment

Column names identifying studies and treatments.

measure

MD, SMD, logOR, logRR, or RD.

mean, sd, n

Column names for continuous summaries and sample sizes.

events

Event-count column for binary measures.

correction

Nonnegative continuity correction for logOR/logRR. Applied to events and nonevents in every arm of a study with a zero cell. Zero correction rejects such studies rather than producing infinite effects.

Value

A list containing contrast data, named study sampling_covariance blocks, and metadata. Effects are treatment_2 minus treatment_1 on the chosen scale. The first sorted arm within each study is the contrast baseline; the analysis reference is independently selected when fitting.

Examples

arms <- data.frame(study = 1, treatment = c("A", "B", "C"),
                   m = c(10, 12, 13), s = c(3, 4, 3), n = c(25, 30, 28))
network_arm_data(arms, "study", "treatment", "MD", mean = "m", sd = "s")
#> $data
#>        study_id treatment_1 treatment_2 effect  variance observation_id
#> 1.obs1        1           A           B      2 0.8933333           obs1
#> 1.obs2        1           A           C      3 0.6814286           obs2
#> 
#> $sampling_covariance
#> $sampling_covariance$`1`
#>           obs1      obs2
#> obs1 0.8933333 0.3600000
#> obs2 0.3600000 0.6814286
#> 
#> 
#> $metadata
#> $metadata$measure
#> [1] "MD"
#> 
#> $metadata$assumption
#> [1] "Independent randomized arms; one measurement per arm"
#> 
#> $metadata$correction
#> [1] 0.5
#> 
#> $metadata$corrected_studies
#> character(0)
#> 
#> $metadata$approximation
#> [1] "Normal arm means"
#> 
#>