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 [2021/06/09 14:32] – [Models and Analysis Approaches] Wolfgang Viechtbauerfeatures [2021/11/05 07:30] Wolfgang Viechtbauer
Line 5: Line 5:
 ==== Calculation of Effect Sizes 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 sizes and outcome measures frequently used in meta-analyses (''[[https://wviechtb.github.io/metafor/reference/escalc.html|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,
Line 20: Line 20:
 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), +  * equal/fixed/random-effects models using the inverse-variance method (''[[https://wviechtb.github.io/metafor/reference/rma.uni.html|rma()]]'' function), 
-  * 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), +  * the Mantel-Haenszel and Peto's (one-step) method for 2×2 table and two-group person-time data (''[[https://wviechtb.github.io/metafor/reference/rma.mh.html|rma.mh()]]'' and ''[[https://wviechtb.github.io/metafor/reference/rma.peto.html|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 (''[[https://wviechtb.github.io/metafor/reference/rma.glmm.html|rma.glmm()]]'' function), 
-  * models for multilevel and multivariate meta-analyses (''rma.mv()'' function), +  * models for multilevel and multivariate meta-analyses (''[[https://wviechtb.github.io/metafor/reference/rma.mv.html|rma.mv()]]'' function), 
-  * models for network meta-analyses and mixed treatment comparisons (''rma.mv()'' function), +  * models for network meta-analyses and mixed treatment comparisons (''[[https://wviechtb.github.io/metafor/reference/rma.mv.html|rma.mv()]]'' function), 
-  * models for phylogenetic meta-analyses (''rma.mv()'' function), +  * models for phylogenetic meta-analyses (''[[https://wviechtb.github.io/metafor/reference/rma.mv.html|rma.mv()]]'' function), 
-  * spatio-temporal meta-analytic models (''rma.mv()'' function),+  * spatio-temporal meta-analytic models (''[[https://wviechtb.github.io/metafor/reference/rma.mv.html|rma.mv()]]'' function),
   * subgrouping and (mixed-effects) meta-regression analyses,   * subgrouping and (mixed-effects) meta-regression analyses,
-  * location-scale models (''rma()'' function using the ''scale'' argument),+  * location-scale models (''[[https://wviechtb.github.io/metafor/reference/rma.uni.html|rma()]]'' function using the ''scale'' argument),
   * models with user-defined weights.   * models with user-defined weights.
  
Line 35: Line 35:
 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 (''[[https://wviechtb.github.io/metafor/reference/funnel.html|funnel()]]'' function), 
-  * forest plots (''forest()'' and ''addpoly()'' functions), +  * forest plots (''[[https://wviechtb.github.io/metafor/reference/forest.html|forest()]]'' and ''[[https://wviechtb.github.io/metafor/reference/addpoly.html|addpoly()]]'' functions), 
-  * scatter plots / bubble plots (''regplot()'' function), +  * scatter plots / bubble plots (''[[https://wviechtb.github.io/metafor/reference/regplot.html|regplot()]]'' function), 
-  * Baujat plots (''baujat()'' function), +  * Baujat plots (''[[https://wviechtb.github.io/metafor/reference/baujat.html|baujat()]]'' function), 
-  * L'Abbé plots (''labbe()'' function), +  * L'Abbé plots (''[[https://wviechtb.github.io/metafor/reference/labbe.html|labbe()]]'' function), 
-  * radial (Galbraith) plots (''radial()'' function), +  * radial (Galbraith) plots (''[[https://wviechtb.github.io/metafor/reference/radial.html|radial()]]'' function), 
-  * GOSH plots (''gosh()'' function), +  * GOSH plots (''[[https://wviechtb.github.io/metafor/reference/gosh.html|gosh()]]'' function), 
-  * profile likelihood plots (''profile()'' function), +  * profile likelihood plots (''[[https://wviechtb.github.io/metafor/reference/profile.rma.html|profile()]]'' function), 
-  * normal quantile-quantile (QQ) plots (''qqnorm()'' function).+  * normal quantile-quantile (QQ) plots (''[[https://wviechtb.github.io/metafor/reference/qqnorm.rma.html|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 51: Line 51:
 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 (''[[https://wviechtb.github.io/metafor/reference/ranktest.html|ranktest()]]'' function), 
-  * Egger's regression test (''regtest()'' function), +  * Egger's regression test (''[[https://wviechtb.github.io/metafor/reference/regtest.html|regtest()]]'' function), 
-  * the trim and fill method (''trimfill()'' function), +  * the trim and fill method (''[[https://wviechtb.github.io/metafor/reference/trimfill.html|trimfill()]]'' function), 
-  * the Henmi and Copas approach (''hc()'' function), +  * the Henmi and Copas approach (''[[https://wviechtb.github.io/metafor/reference/hc.html|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 (''[[https://wviechtb.github.io/metafor/reference/fsn.html|fsn()]]'' function), 
-  * the test of excess significance (''tes()'' function), +  * the test of excess significance (''[[https://wviechtb.github.io/metafor/reference/tes.html|tes()]]'' function), 
-  * selection models (''selmodel()'' function).+  * selection models (''[[https://wviechtb.github.io/metafor/reference/selmodel.html|selmodel()]]'' function).
  
 ==== Inference Methods ==== ==== Inference Methods ====
Line 63: Line 63:
 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 (''[[https://wviechtb.github.io/metafor/reference/anova.rma.html|anova()]]'' function),
-  * confidence intervals for heterogeneity statistics (''confint()'' function), +
-  * permutation tests (''permutest()'' function), +
-  * (cluster) robust tests and confidence intervals (''robust()'' function), +
-  * cumulative meta-analysis (''cumul()'' function), +
-  * fitted and predicted outcomes (''fitted()'' and ''predict()'' functions), +
-  * best linear unbiased predictions (''ranef()'' and ''blup()'' functions),+
   * improved tests/confidence intervals using the Knapp and Hartung method,   * improved tests/confidence intervals using the Knapp and Hartung method,
-  * model fit criteria (''logLik()'' and ''deviance()'' functions), +  * confidence intervals for heterogeneity statistics (''[[https://wviechtb.github.io/metafor/reference/confint.rma.html|confint()]]'' function), 
-  * information criteria (''AIC()'', ''BIC()'', and ''fitstats()'' functions), +  * cluster robust inference methods / robust variance estimation (''[[https://wviechtb.github.io/metafor/reference/robust.html|robust()]]'' function), 
-  * simulation of data from a fitted model (''simulate()'' function).+  * permutation tests (''[[https://wviechtb.github.io/metafor/reference/permutest.html|permutest()]]'' function), 
 +  * cumulative meta-analysis (''[[https://wviechtb.github.io/metafor/reference/cumul.html|cumul()]]'' function), 
 +  * fitted and predicted outcomes (''[[https://wviechtb.github.io/metafor/reference/fitted.rma.html|fitted()]]'' and ''[[https://wviechtb.github.io/metafor/reference/predict.rma.html|predict()]]'' functions), 
 +  * best linear unbiased predictions (''[[https://wviechtb.github.io/metafor/reference/ranef.html|ranef()]]'' and ''[[https://wviechtb.github.io/metafor/reference/blup.html|blup()]]'' functions), 
 +  * model fit criteria (''[[https://wviechtb.github.io/metafor/reference/fitstats.html|logLik()]]'' and ''[[https://wviechtb.github.io/metafor/reference/fitstats.html|deviance()]]'' functions), 
 +  * information criteria (''[[https://wviechtb.github.io/metafor/reference/fitstats.html|AIC()]]'', ''[[https://wviechtb.github.io/metafor/reference/fitstats.html|BIC()]]'', and ''[[https://wviechtb.github.io/metafor/reference/fitstats.html|fitstats()]]'' functions), 
 +  * simulation of data from a fitted model (''[[https://wviechtb.github.io/metafor/reference/simulate.rma.html|simulate()]]'' function).
  
-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).+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 multimodel inference (see [[tips:model_selection_with_glmulti_and_mumin|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 ==== ==== Outlier/Influence Diagnostics ====
Line 81: Line 81:
 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 (''[[https://wviechtb.github.io/metafor/reference/residuals.rma.html|residuals()]]'', ''[[https://wviechtb.github.io/metafor/reference/residuals.rma.html|rstandard()]]'', and ''[[https://wviechtb.github.io/metafor/reference/residuals.rma.html|rstudent()]]'' functions), 
-  * DFFITS values, Cook's distances, covariance ratios, and DFBETAS values (''influence()'' function), +  * DFFITS values, Cook's distances, covariance ratios, and DFBETAS values (''[[https://wviechtb.github.io/metafor/reference/influence.rma.uni.html|influence()]]'' function), 
-  * model weights and hat values (''weights()'' and ''hatvalues()'' functions), +  * model weights and hat values (''[[https://wviechtb.github.io/metafor/reference/weights.rma.html|weights()]]'' and ''[[https://wviechtb.github.io/metafor/reference/influence.rma.uni.html|hatvalues()]]'' functions), 
-  * leave-one-out analyses (''leave1out()'' and ''influence()'' functions).+  * leave-one-out analyses (''[[https://wviechtb.github.io/metafor/reference/leave1out.html|leave1out()]]'' and ''[[https://wviechtb.github.io/metafor/reference/influence.rma.uni.html|influence()]]'' functions).
  
 ==== Datasets ==== ==== Datasets ====
  
-The package also includes over 50 datasets from published meta-analyses that can be used for teaching and illustration purposes.+The package also includes over 60 datasets from published meta-analyses that can be used for teaching and illustration purposes (now part of the [[https://wviechtb.github.io/metadat/|metadat]] package).
  
 ==== Notes ==== ==== Notes ====
features.txt · Last modified: 2023/09/05 16:43 by Wolfgang Viechtbauer