The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


features

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
features [2020/08/09 16:39] – [Datasets] Wolfgang Viechtbauerfeatures [2021/04/25 13:16] – [Plots and Figures] Wolfgang Viechtbauer
Line 3: Line 3:
 Below is an overview of the various features provided by the metafor package. Where applicable, function names are also indicated. Below is an overview of the various features provided by the metafor package. Where applicable, function names are also indicated.
  
-==== Effect Size and Outcome Measures ====+==== Calculation of Effect Sizes and Outcome Measures ==== 
 + 
 +The package allows the user to calculate various effect sizes and outcome measures frequently used in meta-analyses (''escalc()'' function), including:
  
-The package allows the user to calculate various effect size and outcome measures frequently used in meta-analyses (''escalc()'' function), including: 
   * risk differences, risk ratios, and odds ratios for 2×2 table data,   * risk differences, risk ratios, and odds ratios for 2×2 table data,
   * incidence rate ratios and differences for two-group person-time data,   * incidence rate ratios and differences for two-group person-time data,
Line 18: Line 19:
  
 The package provides a variety of models and analysis approaches, including: The package provides a variety of models and analysis approaches, including:
 +
   * fixed-, random-, and mixed-effects models using the inverse-variance method (''rma()'' function),   * fixed-, random-, and mixed-effects models using the inverse-variance method (''rma()'' function),
-  * Mantel-Haenszel and Peto's (one-step) method for 2×2 table and two-group person-time data (''rma.mh()'' and ''rma.peto()'' functions),+  * the Mantel-Haenszel and Peto's (one-step) method for 2×2 table and two-group person-time data (''rma.mh()'' and ''rma.peto()'' functions),
   * generalized linear (mixed-effects) models (i.e., mixed-effects (conditional) logistic and Poisson regression models) for the analysis of 2×2 table data, two-group person-time data, proportions, and incidence rates (''rma.glmm()'' function),   * generalized linear (mixed-effects) models (i.e., mixed-effects (conditional) logistic and Poisson regression models) for the analysis of 2×2 table data, two-group person-time data, proportions, and incidence rates (''rma.glmm()'' function),
   * models for multilevel and multivariate meta-analyses (''rma.mv()'' function),   * models for multilevel and multivariate meta-analyses (''rma.mv()'' function),
   * models for network meta-analyses and mixed treatment comparisons (''rma.mv()'' function),   * models for network meta-analyses and mixed treatment comparisons (''rma.mv()'' function),
-  * phylogenetic meta-analysis (''rma.mv()'' function),+  * models for phylogenetic meta-analyses (''rma.mv()'' function),
   * spatio-temporal meta-analytic models (''rma.mv()'' function),   * spatio-temporal meta-analytic models (''rma.mv()'' function),
   * subgrouping and (mixed-effects) meta-regression analyses,   * subgrouping and (mixed-effects) meta-regression analyses,
Line 31: Line 33:
  
 The package provides functions for creating a variety of meta-analytic plots and figures, including: The package provides functions for creating a variety of meta-analytic plots and figures, including:
 +
   * funnel plots (''funnel()'' function),   * funnel plots (''funnel()'' function),
   * forest plots (''forest()'' and ''addpoly()'' functions),   * forest plots (''forest()'' and ''addpoly()'' functions),
 +  * scatter plots / bubble plots (''regplot()'' function),
   * Baujat plots (''baujat()'' function),   * Baujat plots (''baujat()'' function),
   * L'Abbé plots (''labbe()'' function),   * L'Abbé plots (''labbe()'' function),
Line 39: Line 43:
   * profile likelihood plots (''profile()'' function),   * profile likelihood plots (''profile()'' function),
   * normal quantile-quantile (QQ) plots (''qqnorm()'' function).   * normal quantile-quantile (QQ) plots (''qqnorm()'' function).
 +
 R itself also provides extensive and very flexible graphing and plotting capabilities that can be easily adapted to create further plots and figures. R itself also provides extensive and very flexible graphing and plotting capabilities that can be easily adapted to create further plots and figures.
  
Line 44: Line 49:
  
 The presence of publication bias (or more accurately, funnel plot asymmetry or "small-study effects") and its potential impact on the results can be examined via a variety of methods, including: The presence of publication bias (or more accurately, funnel plot asymmetry or "small-study effects") and its potential impact on the results can be examined via a variety of methods, including:
 +
   * the rank correlation test (''ranktest()'' function),   * the rank correlation test (''ranktest()'' function),
   * Egger's regression test (''regtest()'' function),   * Egger's regression test (''regtest()'' function),
Line 49: Line 55:
   * the Henmi and Copas approach (''hc()'' function),   * the Henmi and Copas approach (''hc()'' function),
   * a file drawer analysis (fail-safe N computation) using the Rosenthal, Orwin, and Rosenberg methods (''fsn()'' function),   * a file drawer analysis (fail-safe N computation) using the Rosenthal, Orwin, and Rosenberg methods (''fsn()'' function),
-  * the test of excess significance (''tes()'' function).+  * the test of excess significance (''tes()'' function), 
 +  * selection models (''selmodel()'' function).
  
 ==== Inference Methods ==== ==== Inference Methods ====
  
 The package provides standard and advanced methods for drawing inferences based on meta-analytic data and for assessing the model fit, including: The package provides standard and advanced methods for drawing inferences based on meta-analytic data and for assessing the model fit, including:
 +
   * likelihood ratio and Wald-type tests (''anova()'' function),   * likelihood ratio and Wald-type tests (''anova()'' function),
   * confidence intervals for heterogeneity statistics (''confint()'' function),   * confidence intervals for heterogeneity statistics (''confint()'' function),
Line 66: Line 74:
   * simulation of data from a fitted model (''simulate()'' function).   * simulation of data from a fitted model (''simulate()'' function).
  
-==== Outlier and Influence Diagnostics ====+The package is also compatible with the [[https://cran.r-project.org/package=glmulti|glmulti]] and [[https://cran.r-project.org/package=MuMIn|MuMIn]] packages for model selection and (multi)model inference (see [[tips:model_selection_with_glmulti|here]] for an illustration), the [[https://cran.r-project.org/package=boot|boot]] package for bootstrapping (see [[tips:bootstrapping_with_ma|here]] for an illustration), and the [[https://cran.r-project.org/package=mice|mice]] and [[https://cran.r-project.org/package=Amelia|Amelia]] packages for multiple imputation (see [[tips:multiple_imputation_with_mice_and_metafor|here]] for an illustration). 
 + 
 +==== Outlier/Influence Diagnostics ====
  
 Various methods are available to identify outliers and/or influential studies, and for conducting sensitivity analyses, including: Various methods are available to identify outliers and/or influential studies, and for conducting sensitivity analyses, including:
 +
   * raw/standardized/studentized residuals (''residuals()'', ''rstandard()'', and ''rstudent()'' functions),   * raw/standardized/studentized residuals (''residuals()'', ''rstandard()'', and ''rstudent()'' functions),
   * DFFITS values, Cook's distances, covariance ratios, and DFBETAS values (''influence()'' function),   * DFFITS values, Cook's distances, covariance ratios, and DFBETAS values (''influence()'' function),
Line 80: Line 91:
 ==== Notes ==== ==== Notes ====
  
-A diagram showing the various functions in the metafor package (and how they related to each other) can be found {{docs:diagram.pdf|here}}. If the package is installed, you should also be able to open this diagram directly from R with the command ''vignette("diagram")''.+A diagram showing the various functions in the metafor package (and how they related to each other) can be found [[diagram|here]]. If the package is installed, you should also be able to open this diagram directly from R with the command ''vignette("diagram")''.
  
 The metafor package is a work in progress and is updated on a regular basis with new functions and options. Under the [[updates|log of package updates]], you can see what changes/updates have been made to the package over the years. The metafor package is a work in progress and is updated on a regular basis with new functions and options. Under the [[updates|log of package updates]], you can see what changes/updates have been made to the package over the years.
  
features.txt · Last modified: 2024/06/12 18:27 by Wolfgang Viechtbauer