This function is a wrapper that calls metafor to fit models.

fit_model(
  data,
  effect_size,
  var_cor,
  weights = NULL,
  moderators = NULL,
  random_params = NULL,
  structure = "UN",
  test = "z",
  intercept = FALSE,
  estimation_method = "REML",
  ...
)

Arguments

data

Raw data input

effect_size

A vector of observed effect sizes to be modeled with metafor. See rma.mv for more details.

var_cor

Variance covariance matrix of sampling errors or sampling weights passed on to metafor. See rma.mv for more details.

weights

Optional weights matrix passed to metafor. Default is NULL. See rma.mv for more details.

moderators

Moderators (covariates, predictors) to be included in the analysis with metafor. Default is NULL meaning no predictors. See rma.mv for more details.

random_params

Specification of the random effect structure. This argument takes the form a single sided formula. Default is NULL which means a fixed effects model will be fitted with metafor. See rma.mv for more details.

structure

The variance structure passed to metafor. Default is "CS" which represents compound symmetry. See rma.mv for more details.

test

What type of test statistic should be used. Default is a z-statistic. See rma.mv for more details.

intercept

Should an intercept be included in the metafor model. See rma.mv for more details.

estimation_method

Estimation method to pass on to metafor. Default is "REML". See rma.mv for more details.

...

Additional parameters passed to metafor. See rma.mv for more details.