The metafor Package

A Meta-Analysis Package for R

User Tools

Site Tools


updates

Package Updates

On this page, you can find a description of the (recent) updates to the metafor package. Older updates are archived here.

Version 5.0-1 (2026-04-26)

  • argument legend can now be a list for funnel(), labbe(), regplot(), and plot.permutest.rma.uni() for more control over the look of the legend
  • added hetvar argument to predict.rma() to manually specify the amount of heterogeneity for computing prediction intervals
  • fixed how intercept (when unspecified) is set in predict.rma.ls() when using newscale
  • renamed pi.type argument to predtype (which is more consistent with the predstyle argument), but pi.type will continue to work for backwards compatibility
  • added predstyle="polygon" as another option for drawing the prediction interval (as a polygon like for the pooled estimate)
  • can now use the preddist argument in forest.rma() and addpoly.default() to provide the predictive distribution directly
  • fixed permutest.rma.ls() not running when btt and/or att is specified
  • ranktest() now also provides a p-value when the number of estimates is large
  • added various methods and a predict.matreg() function for matreg objects; can now also specify a formula for the y argument of matreg()
  • deltamethod() can now also do the second-order delta method
  • for measures "ROM", "ROMC", "CVR", and "CVRC", the bias corrections based on the second-order Taylor expansions are now applied by default in escalc() (use correct=FALSE to switch this off)
  • all addpoly() functions now respect alim and olim as set by forest()
  • some functions (e.g., vcalc() and rcalc()) can now return variance-covariance matrices as objects of class "vcovmat"; these are printed nicely with print.vcovmat()
  • rma() now calculates R^2 as long as a standard random-effects model is nested within the fitted mixed-effects model
  • conv.2x2() can now reconstruct tables for diagnostic studies based on diagnostic statistics (sensitivity, specificity, positive predictive value, negative predictive value)
  • added some more transformation functions

Version 4.8-0 (2025-01-28)

  • some general changes to the various forest() functions: argument header is now TRUE by default, the y-axis is now created with yaxs="i", and the y-axis limits have been tweaked slightly in accordance
  • forest.rma() and the various addpoly() functions now provides multiple styles for drawing the prediction interval via the predstyle argument
  • forest.rma() and addpoly.rma() now write out the default label (instead of an abbreviation) for the model results; as before, the label can be changed via the mlab argument
  • added an ilab.lab argument to the various forest() functions for adding header labels to the plot for the additional study information columns
  • all plot functions that create multi-panel plots now behave in a consistent manner, setting par(mfrow) automatically when no plotting device is open or when the number of panels in an open plotting device is too small for the number of panels to be plotted; all multi-panel plots also set par(mfrow)=c(1L,1L) upon exit; argument layout has been deprecated from plot.permutest.rma.uni(), plot.vif.rma(), and plot.infl.rma.uni()
  • the predict.rma() and predict.rma.ls() functions now also accept a matrix as input that includes a column for the intercept term (in which case the intercept argument is ignored and the first column of the matrix controls whether the intercept term is included in calculating the predicted value(s))
  • added extractor function se() for extracting standard errors from model objects
  • added function pairmat() to construct a matrix of pairwise contrasts
  • added function deltamethod() to apply the (multivariate) delta method to a set of estimates
  • anova() and predict() gain an adjust argument for adjusting p-values / interval bounds for multiple testing
  • fixed predict() ignoring the level argument for robust.rma objects obtained with clubSandwich=TRUE
  • print.anova.rma() and print.list.anova.rma() now also print significance stars for some tests (unless getOption("show.signif.stars") is FALSE)
  • added a collapse argument to the various cumul() functions (to specify whether studies with the same value of the order variable should be added simultaneously)
  • the various leave1out() functions gain a cluster argument
  • rma.mv() now counts the number of levels of a random effect more appropriately; this may trigger more often the check that the number of levels is equal to 1, in which case the corresponding variance component is automatically fixed to 0; this check can be omitted with control=list(check.k.gtr.1=FALSE)
  • made optimizers Rcgmin and Rvmmin available again via the optimx package
  • when unspecified, argument shade in funnel() now automatically uses a color gradient for the regions when multiple level values are specified
  • added lim, ci, pi, legend, and flip arguments to labbe()
  • fsn(..., type="General") now computes the final estimates after rounding the fail-safe N value (not before)
  • permutest.rma.uni() gains a btt argument and permutest.rma.ls() gains btt and att arguments
  • selmodel() gains a subset argument (to specify a subset of studies to which the selection function should apply); for the beta selection model, one can now also specify two steps values to fit a truncated beta selection model
  • nobs() now just returns the number of estimates, not the effective number of observations
  • some tweaks were made to vcalc() to speed up the calculations (by James Pustejovsky)
  • added measures "PRZ", "CLES", "AUC", "CLESN", "AUCN", "CLESCN", "AUCCN", "R2F", and "ZR2F" to escalc()
  • escalc() gains a flip argument
  • escalc() gains a correct argument (to specify whether a bias correction should be applied)
  • added transformation function transf.dtoovl() (for transforming standardized mean differences to overlapping coefficient values) and transf.dtocliffd() (for transforming standardized mean differences to Cliff's delta values)
  • qqnorm.rma.uni() now shades the pseudo confidence region; all qqnorm() functions gain a grid argument
  • better handling of outlist="minimal"
  • added more tests

Version 4.6-0 (2024-03-28)

  • the steps argument in the various profile() functions can now also be a numeric vector to specify for which parameter values the likelihood should be evaluated
  • a few minor fixes to the dynamic theming of plots based on the foreground and background colors of the plotting device
  • slightly improved flexibility for setting package options
  • new measures added to escalc(): "SMN" for the single-group standardized mean / single-group standardized mean difference, "SMCRP" for the standardized mean change using raw score standardization with pooled standard deviations, and "SMCRPH" for the standardized mean change using raw score standardization with pooled standard deviations and heteroscedastic population variances at the two measurement occasions
  • calculation of the sampling variances for measures "SMDH", "SMD1H", and "SMCRH" was slightly adjusted for consistency
  • in plot.gosh.rma(), can also set het="tau" (to plot the square root of tau^2 as the measure of heterogeneity)
  • in the various forest() functions, argument ylim can now only be a single value to specify the lower bound (while the upper bound is still set automatically)
  • in forest() and regplot(), observation limits set via olim are now properly applied to all elements
  • various internal improvements to selmodel()
  • selmodel() no longer stops with an error when one or more intervals defined by the steps argument do not contain any observed p-values (instead a warning is issued and model fitting proceeds, but may fail)
  • added decreasing argument to selmodel() for enforcing that the delta estimates must be a monotonically decreasing function of the p-values in the step function model
  • added the undocumented argument pval to selmodel() for passing p-values directly to the function (doing this is highly experimental)
  • some internal refactoring of the code
  • improved the documentation a bit

Version 4.4-0 (2023-09-27)

  • added getmfopt() and setmfopt() functions for getting and setting package options and made some of the options more flexible
  • removed argument weighted from fsn() (whether weighted or unweighted averages are used in Orwin's method is now simply determined by whether sampling variances are specified or not); added type="General" to fsn() as a generalization of the Orwin and Rosenberg methods (that allows for a fail-safe N calculation based on a random-effects model); can now pass an rma object to the fsn() function
  • further improved the theming of all plots based on the foreground and background colors; within RStudio, plot colors can also be automatically chosen based on the theme (with setmfopt(theme="auto"))
  • added additional/optional argument tabfig to the various forest() functions, for easily setting the annosym argument to an appropriate vector for exactly aligning numbers (when using a matching font)
  • added (for now undocumented) vccon argument to rma.mv() for setting equality constraints on variance/correlation components
  • replace argument in conv.2x2(), conv.delta(), conv.fivenum(), and conv.wald() can now also be a logical
  • added summary.matreg() and print.summary.matreg() methods for including additional statistics in the output ($R^2$ and the omnibus test) and added coef.matreg() and vcov.matreg() extractor functions
  • formatting functions fmtp(), fmtx(), and fmtt() gain a quote argument, which is set to FALSE by default
  • for measures "PCOR", "ZPCOR", "SPCOR", and "ZSPCOR", argument mi in escalc() now refers to the total number of predictors in the regression models (i.e., also counting the focal predictor of interest)
  • added measures "R2" and "ZR2" to escalc()
  • addpoly.default() and addpoly.rma.predict() gain a constarea argument (for the option to draw the polygons with a constant area)
  • plot.rma.uni.selmodel() gains a shade argument (for shading the confidence interval region)
  • plot.permutest.rma.uni() gains a legend argument
  • vcalc() gains a sparse argument
  • aggregate.escalc gains var.names argument
  • made the legend argument more flexible in funnel()
  • made the append argument more flexible in to.long()
  • added a few more transformation functions
  • small bug fixes
  • added automated visual comparison tests of plots
  • improved the documentation a bit

Version 4.2-0 (2023-05-08)

  • improved the various plotting functions so they respect par("fg"); as a result, one can now create plots with a dark background and light plotting colors
  • also allow two or three values for xlab in the various forest() functions (for adding labels at the ends of the x-axis limits)
  • better default choices for xlim in the various forest() functions; also, argument ilab.xpos is now optional when using the ilab argument
  • added shade and colshade arguments to the various forest() functions
  • the various forest() functions no longer enforce that xlim must be at least as wide as alim
  • added link argument to rma.glmm()
  • rma.glmm() with measure="OR", model="CM.EL", method="ML" now treats tau^2 values below 1e-04 effectively as zero before computing the standard errors of the fixed effects; this helps to avoid numerical problems in approximating the Hessian; similarly, selmodel() now treats tau^2 values below 1e-04 or min(vi/10) effectively as zero before computing the standard errors
  • for measure SMCC, can now specify d-values, t-test statistics, and p-values via arguments di, ti, and pi
  • functions that issue a warning when omitting studies due to NAs now indicate how many were omitted
  • properly documented the level argument
  • added a few more transformation functions
  • small bug fixes
  • improved the documentation a bit

Version 4.0-0 (2023-03-19)

  • added conv.2x2() function for reconstructing the cell frequencies in 2x2 tables based on other summary statistics
  • added conv.wald() function for converting Wald-type confidence intervals and test statistics to sampling variances
  • added conv.fivenum() function for estimating means and standard deviations from five-number summary values
  • added conv.delta() function for transforming observed effect sizes or outcomes and their sampling variances using the delta method
  • added emmprep() function to create a reference grid for use with the emmeans() function from the package of the same name
  • exposed formatter functions fmtp(), fmtx(), and fmtt()
  • package numDeriv moved from Suggests to Depends
  • model.matrix.rma() gains asdf argument
  • corrected bug in vcalc() (values for obs and type were taken directly as indices instead of using them as identifiers)
  • improved efficiency of vif() when sim=TRUE by reshuffling only the data needed in the model matrix; due to some edge cases, the simulation approach cannot be used when some redundant predictors were dropped from the original model; and when redundancies occur after reshuffling the data, the simulated (G)VIF value(s) are now set to Inf instead of NA
  • selmodel() gains type='trunc' and type='truncest' models (the latter should be considered experimental)
  • added exact="i" option in permutest() (to just return the number of iterations required for an exact permutation test)
  • escalc() now provides more informative error messages when not specifying all required arguments to compute a particular measure
  • added measures "ZPHI", "ZTET", "ZPB", "ZBIS", and "ZSPCOR" to escalc() (but note that Fisher's r-to-z transformation is not a variance-stabilizing transformation for these measures)
  • the variance of measure ZPCOR is now calculated with 1/(ni-mi-3) (instead of 1/(ni-mi-1)), which provides a better approximation in small samples (and analogous to how the variance of ZCOR is calculated with 1/(ni-3))
  • as with measure="SMD", one can now also use arguments di and ti to specify d-values and t-test statistics for measures RPB, RBIS, D2ORN, and D2ORL in escalc()
  • for measures COR, UCOR, and ZCOR, can now use argument ti to specify t-test statistics in escalc()
  • can also specify (two-sided) p-values (of the respective t-tests) for these measures (and for measures PCOR, ZPCOR, SPCOR, and ZSPCOR) via argument pi (the sign of the p-value is taken to be the sign of the measure)
  • can also specify (semi-)partial correlations directly via argument ri for measures PCOR, ZPCOR, SPCOR, and ZSPCOR
  • when passing a correlation marix to rcalc(), it now orders the elements (columnwise) based on the lower triangular part of the matrix, not the upper one (which is more consistent with what matreg() expects as input when using the V argument)
  • optimizers Rcgmin and Rvmmin are now available in rma.uni(), rma.mv(), rma.glmm(), and selmodel()
  • improved the documentation a bit

Version 3.8-1 (2022-08-26)

  • funnel.default(), funnel.rma(), and regplot.rma() gain slab argument
  • vif() was completely refactored and gains reestimate, sim, and parallel arguments; added as.data.frame.vif.rma() and plot.vif.rma() methods
  • plot.permutest.rma.uni() function sets the y-axis limits automatically and in a smarter way when also drawing the reference/null distribution and the density estimate
  • added possibility to specify a list for btt in anova.rma(); added print.list.anova.rma() to print the resulting object
  • added as.data.frame.anova.rma() and as.data.frame.list.anova.rma() methods
  • documented the possibility to use an identity link (with link="identity") in rma.uni() when fitting location-scale models (although this will often lead to estimation problems); added solnp() as an additional optimizer for this case
  • optimizers nloptr and constrOptim.nl (the latter from the alabama package) are now available in rma.uni() for location-scale models when using an identity link
  • added measure SMD1H to escalc()
  • for measure="SMD", escalc() now also allows the user to specify d-values and t-test statistics via arguments di and ti, respectively
  • aggregate.escalc() gains addk argument
  • added (experimental!) support for measures "RR", "RD", "PLN", and "PR" to rma.glmm() (but using these measures will often lead to estimation problems)
  • replmiss() gains data argument
  • cumul() functions also store data, so that arguments ilab, col, pch, and psize in the forest.cumul.rma() function can look for variables therein
  • fixed issue with rendering Rmarkdown documents with metafor output due to the use of a zero-width space

Older Versions

Older updates are archived here.

updates.txt ยท Last modified: by Wolfgang Viechtbauer