Package 'multibiasmeta'

Title: Sensitivity Analysis for Multiple Biases in Meta-Analyses
Description: Meta-analyses can be compromised by studies' internal biases (e.g., confounding in nonrandomized studies) as well as by publication bias. This package conducts sensitivity analyses for the joint effects of these biases (per Mathur (2022) <doi:10.31219/osf.io/u7vcb>). These sensitivity analyses address two questions: (1) For a given severity of internal bias across studies and of publication bias, how much could the results change?; and (2) For a given severity of publication bias, how severe would internal bias have to be, hypothetically, to attenuate the results to the null or by a given amount?
Authors: Maya Mathur [aut], Mika Braginsky [aut], Peter Solymos [cre, ctb]
Maintainer: Peter Solymos <[email protected]>
License: MIT + file LICENSE
Version: 0.2.2
Built: 2024-09-14 04:08:38 UTC
Source: https://github.com/mathurlabstanford/multibiasmeta

Help Index


Meta-analysis about meat consumption

Description

Meta-analysis of the effectiveness of educational behavior interventions that attempt to reduce meat consumption by appealing to animal welfare.

Usage

meta_meat

Format

A data frame with 100 rows and 4 columns:

yi

Point estimate on log-risk ratio scale

vi

Variance of point estimate

cluster

Paper that contributed the point estimate

randomized

Logical indicating whether study was randomized

References

Mathur MB, Peacock J, Reichling DB, Nadler J, Bain PA, Gardner CD, Robinson TN (2021). “Interventions to reduce meat consumption by appealing to animal welfare: Meta-analysis and evidence-based recommendations.” Appetite, 164, 105277.


E-value for meta-analysis with multiple biases

Description

E-value for meta-analysis with multiple biases

Usage

multibias_evalue(
  yi,
  vi,
  sei,
  cluster = 1:length(yi),
  biased = TRUE,
  selection_ratio,
  q = 0,
  favor_positive = TRUE,
  alpha_select = 0.05,
  ci_level = 0.95,
  small = TRUE,
  bias_max = 20,
  assumed_bias_type = NULL
)

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).

biased

Boolean indicating whether each study is considered internally biased; either single value used for all studies or a vector the same length as the number of rows in the data (defaults to all studies).

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).

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.

bias_max

The largest value of bias, on the additive scale, that should be included in the grid search. The bias has the same units as yi.

assumed_bias_type

List of biases to consider for computing evalues (objects of bias as returned by EValue::confounding(), EValue::selection(), EValue::misclassification()) (defaults to NULL, i.e. agnostic as to the nature of the internal bias). If not NULL, the yi argument must be on the log-RR scale (if yi is not already on that scale, use EValue::convert_measures() to make it so).

Details

For more on the functions passed as assumed_bias_type, see the EValue package multiple-bias vignette: vignette("multiple-bias", package = "EValue")

Value

An object of class metabias::metabias(), a list containing:

data

A tibble with one row per study and the columns yi, vi, sei, cluster, biased.

values

A list with the elements selection_ratio, q, favor_positive, alpha_select, ci_level, small, bias_max.

stats

A tibble with the columns bias_est, bias_ci, evalue_est, evalue_ci.

References

Mathur MB (2022). “Sensitivity analysis for the interactive effects of internal bias and publication bias in meta-analyses.” doi:10.31219/osf.io/u7vcb.

Ding P, VanderWeele TJ (2016). “Sensitivity analysis without assumptions.” Epidemiology (Cambridge, Mass.), 27(3), 368.

Smith LH, VanderWeele TJ (2019). “Bounding bias due to selection.” Epidemiology (Cambridge, Mass.), 30(4), 509.

VanderWeele TJ, Li Y (2019). “Simple sensitivity analysis for differential measurement error.” American journal of epidemiology, 188(10), 1823–1829.

Examples

# specify confounding as internal bias
  evalues <- multibias_evalue(yi = meta_meat$yi,
                              vi = meta_meat$vi,
                              biased = !meta_meat$randomized,
                              selection_ratio = 4)
  evalues$stats

  # specify confounding as internal bias
  evalues_confounding <- multibias_evalue(yi = meta_meat$yi,
                                          vi = meta_meat$vi,
                                          biased = !meta_meat$randomized,
                                          selection_ratio = 4,
                                          assumed_bias_type = list(EValue::confounding()))
  evalues_confounding$stats

Correction for meta-analysis with multiple biases

Description

Correction for meta-analysis with multiple biases

Usage

multibias_meta(
  yi,
  vi,
  sei,
  cluster = 1:length(yi),
  biased = TRUE,
  selection_ratio,
  bias_affirmative,
  bias_nonaffirmative,
  favor_positive = TRUE,
  alpha_select = 0.05,
  ci_level = 0.95,
  small = TRUE,
  return_worst_meta = FALSE,
  return_pubbias_meta = FALSE
)

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).

biased

Boolean indicating whether each study is considered internally biased; either single value used for all studies or a vector the same length as the number of rows in the data (defaults to all studies).

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).

bias_affirmative

Mean internal bias, on the additive scale, among published affirmative studies. The bias has the same units as yi.

bias_nonaffirmative

Mean internal bias, on the additive scale, among published nonaffirmative studies. The bias has the same units as yi.

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.

return_worst_meta

Boolean indicating whether the worst-case meta-analysis of only the nonaffirmative studies be returned.

return_pubbias_meta

Boolean indicating whether a meta-analysis correcting for publication but not for confounding be returned.

Value

An object of class metabias::metabias(), a list containing:

data

A tibble with one row per study and the columns yi, vi, sei, biased, cluster, affirmative, yi_adj, weight, userweight.

values

A list with the elements selection_ratio, bias_affirmative, bias_nonaffirmative, favor_positive, alpha_select, ci_level, small.

stats

A tibble with the columns model, estimate, se, ci_lower, ci_upper, p_value.

fit

A list of fitted models.

References

Mathur MB (2022). “Sensitivity analysis for the interactive effects of internal bias and publication bias in meta-analyses.” doi:10.31219/osf.io/u7vcb.

Examples

# publication bias without internal bias
meta_0 <- multibias_meta(yi = meta_meat$yi,
                         vi = meta_meat$vi,
                         selection_ratio = 4,
                         bias_affirmative = 0,
                         bias_nonaffirmative = 0)
meta_0$stats

# publication bias and internal bias in the non-randomized studies
meta_4 <- multibias_meta(yi = meta_meat$yi,
                         vi = meta_meat$vi,
                         biased = !meta_meat$randomized,
                         selection_ratio = 4,
                         bias_affirmative = log(1.5),
                         bias_nonaffirmative = log(1.1))
meta_4$stats

# treat all studies as biased, not just non-randomized ones
meta_all <- multibias_meta(yi = meta_meat$yi,
                           vi = meta_meat$vi,
                           biased = TRUE,
                           selection_ratio = 4,
                           bias_affirmative = log(1.5),
                           bias_nonaffirmative = log(1.1))
meta_all$stats