Package 'metabias'

Title: Meta-Analysis for Within-Study and/or Across-Study Biases
Description: Provides common components (classes, methods, documentation) for packages that conduct meta-analytic corrections and sensitivity analyses for within-study and/or across-study biases in meta-analysis. See the packages 'PublicationBias', 'phacking', and 'multibiasmeta'. These package implement methods described in, respectively: Mathur & VanderWeele (2020) <doi:10.31219/osf.io/s9dp6>; Mathur (2022) <doi:10.31219/osf.io/ezjsx>; Mathur (2022) <doi:10.31219/osf.io/u7vcb>.
Authors: Mika Braginsky [aut], Maya Mathur [aut], Peter Solymos [cre, ctb]
Maintainer: Peter Solymos <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2024-09-11 03:52:14 UTC
Source: https://github.com/mathurlabstanford/metabias

Help Index


metabias S3 class

Description

A object of class metabias is the result of fitting one or more models to a dataset with one row per study being meta-analyzed. These models are either (1) a meta-analysis with a correction for one or more within-study or across-study biases, or (2) a sensitivity analysis for meta-analyses with respect to these biases. Examples of functions that return such objects include:

  • PublicationBias::pubbias_meta()

  • PublicationBias::pubbias_svalue()

  • phacking::phacking_meta()

  • multibiasmeta::multibias_meta()

  • multibiasmeta::multibias_evalue()

Usage

metabias(
  data = data.frame(),
  values = list(),
  stats = data.frame(),
  fits = list()
)

new_metabias(x = list())

## S3 method for class 'metabias'
summary(object, ...)

Arguments

data

Dataframe containing data used to fit the model(s), with added columns for any values computed during model fitting.

values

List of values of arguments passed to the function.

stats

Dataframe of summary statistics from the model fit(s).

fits

List of fitted objects (which have a class that depends on the underlying fitting methods, e.g. robumeta::robu or rstan::stanfit).

x

List with elements "data", "values", "stats", "fits".

object

Object of class metabias.

...

Not used.

Value

An object of class metabias, which consists of a list containing the elements data, values, stats, fits (corresponding to the arguments passed).

Examples

# example model from robumeta::robu()
hier_mod <- robumeta::robu(effectsize ~ binge + followup + sreport + age,
                           data = robumeta::hierdat, studynum = studyid,
                           var.eff.size = var, modelweights = "HIER",
                           small = TRUE)

ci <- 0.95  # example set value
hier_mb <- metabias(data = robumeta::hierdat,                 # data passed to model
                    values = list(ci_level = ci),             # value used
                    stats = robu_ci(hier_mod, ci_level = ci), # stats from model
                    fits = list("robu" = hier_mod))           # model object

hier_mb
summary(hier_mb)

Documentation for params common across metabias packages.

Description

Documentation for params common across metabias packages.

Arguments

yi

A vector of point estimates to be meta-analyzed.

vi

A vector of estimated variances (i.e., squared standard errors) for the point estimates.

sei

A vector of estimated standard errors for the point estimates. (Only one of vi or sei needs to be specified).

cluster

Vector of the same length as the number of rows in the data, indicating which cluster each study should be considered part of (defaults to treating studies as independent; i.e., each study is in its own cluster).

favor_positive

TRUE if publication bias are assumed to favor significant positive estimates; FALSE if assumed to favor significant negative estimates.

alpha_select

Alpha level at which an estimate's probability of being favored by publication bias is assumed to change (i.e., the threshold at which study investigators, journal editors, etc., consider an estimate to be significant).

ci_level

Confidence interval level (as proportion) for the corrected point estimate. (The alpha level for inference on the corrected point estimate will be calculated from ci_level.)

small

Should inference allow for a small meta-analysis? We recommend always using TRUE.

selection_ratio

Ratio by which publication bias favors affirmative studies (i.e., studies with p-values less than alpha_select and estimates in the direction indicated by favor_positive).

q

The attenuated value to which to shift the point estimate or CI. Should be specified on the same scale as yi (e.g., if yi is on the log-RR scale, then q should be as well).


robumeta::robu CI

Description

Add a confidence interval to the reg_table of a robumeta::robu object.

Usage

robu_ci(robu_fit, ci_level = 0.95)

Arguments

robu_fit

Object of class robumeta::robu.

ci_level

Confidence level to use for the confidence interval (defaults to 0.95).

Value

A dataframe with the columns estimate, se, ci_lower, ci_upper, p_value.

Examples

# example model from robumeta::robu()
hier_mod <- robumeta::robu(effectsize ~ binge + followup + sreport + age,
                           data = robumeta::hierdat, studynum = studyid,
                           var.eff.size = var, modelweights = "HIER",
                           small = TRUE)
robu_ci(hier_mod)