Skip to contents

Synthesizes dependent effect sizes from studies reporting multiple outcomes, treatment groups, or follow-up times. It constructs study covariance blocks internally from explicit, user-chosen correlation assumptions and leaves mars() unchanged.

Usage

mars_repeated(
  data,
  study_id,
  effect,
  variance,
  outcome_id = NULL,
  group_id = NULL,
  control_id = NULL,
  time_id = NULL,
  mean_structure = c("common", "by_outcome", "by_time", "by_group", "by_outcome_time",
    "by_outcome_group_time"),
  outcome_correlation = c("independence", "exchangeable"),
  time_correlation = c("independence", "exchangeable", "ar1"),
  rho_outcome = 0,
  rho_time = 0,
  rho_shared_control = 0,
  heterogeneity = c("none", "common"),
  estimation_method = c("REML", "ML"),
  ci_level = 0.95
)

Arguments

data

Data frame with one row per effect size.

study_id, effect, variance

Character strings naming the study, effect, and marginal sampling-variance columns.

outcome_id, group_id, control_id, time_id

Optional character strings identifying outcome, treatment group/contrast, shared control, and time.

mean_structure

Mean model: a common effect, or effects stratified by outcome, time, group, outcome-by-time, or outcome-by-group-by-time.

outcome_correlation

Correlation for different outcomes from the same group. Choose "independence" or "exchangeable".

time_correlation

Correlation for different times from the same group. Choose "independence", "exchangeable", or "ar1".

rho_outcome, rho_time

Assumed correlations for the selected outcome and time structures. Values must be between minus one and one.

rho_shared_control

Assumed correlation for effects from different groups with the same control identifier.

heterogeneity

Either "none" or "common". The latter estimates a common extra contrast-level variance by ML or REML.

estimation_method

Either "REML" or "ML" for common heterogeneity.

ci_level

Confidence level for mean-effect intervals.

Value

An object of class mars_repeated with coefficient summaries, internally constructed sampling covariance blocks, and recorded covariance assumptions.

Details

The covariance is a separable working model. For two effects in the same study, dependence is nonzero only when they share a group or a supplied control identifier. Within-group dependence is the product of outcome and time correlations. Different groups sharing a control receive the additional rho_shared_control factor. The function uses a near-positive-semidefinite adjustment when needed and records whether it was applied. This is a useful, transparent working covariance model when full study covariance matrices are unavailable; it is not a substitute for reported correlations or raw data.

Examples

dat <- data.frame(
  study = rep(c("S1", "S2", "S3"), each = 2),
  yi = c(.2, .3, .1, .25, .4, .5), vi = .04,
  outcome = rep(c("pain", "function"), 3)
)
mars_repeated(dat, "study", "yi", "vi", outcome_id = "outcome",
              outcome_correlation = "exchangeable", rho_outcome = .5)
#> Repeated-effects multivariate meta-analysis
#> Studies: 3   Heterogeneity: none 
#>       term  estimate std_error   ci_lower  ci_upper
#>  mu_common 0.2916667       0.1 0.09567027 0.4876631