[R-meta] New version of the metafor package (4.4-0) released on CRAN

Viechtbauer, Wolfgang (NP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Thu Sep 28 10:36:07 CEST 2023


Hi all,

It might be of intererest to some of you that a new version of the metafor package has been released on CRAN. Some of the more important/interesting updates to the package include:

  * The older (convoluted) way of setting some package options has been replaced by two functions, getmfopt() and setmfopt(), for getting and setting package options. This new approach makes use of the standard way of setting options in R (see help(options)). Also, some of the options that can be set in this way are now more flexible.

  * The fsn() function can now carry out a fail-safe N calculation based on a random-effects model (when using 'type="General"'). This is a generalization of the Orwin and Rosenberg methods, which is an interesting methodological development in itself.

  * The theming of all plots (based on the foreground and background colors of the plotting device) has been further improved. Within RStudio, plot colors can now also be automatically set based on the theme (with setmfopt(theme="auto")).

  * The various forest() functions now have an additional argument called 'tabfig', which makes it easier to exactly align the numbers in the annotations on the right-hand side.

  * The addpoly.default() and addpoly.rma.predict() functions gain a 'constarea' argument, for the option to draw the polygons with a constant area. This idea arose from a discussion on Mastodon - https://scholar.social/@wviechtb/111131706271083360 - about drawing so-called 'diamond plots' (see https://psyarxiv.com/fzh6c for more details about such plots). The idea is that, by default, the eyes of the person looking at a plot are automatically drawn to the polygons that have a wider confidence interval (which occupy a larger area on the plot), which is actually the opposite of what you want to happen (since estimates with wider confidence intervals are less precise). By making the area of the polygons constant (which requires reducing their height according to the interval widths), this undesired effect can be compensated to some extent.

  * Two new measures have been added to escalc(), namely "R2" and "ZR2", for meta-analyzing coefficients of determination (but read the caveats mentioned under help(escalc) with respect to these measures).

  * 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). This is a non-backwards compatible change (which I really try to avoid), but in this case this was important for consistency with other measures/equations. The change is also very minor, since 'mi' always appears in equations as a value that is subtracted from 'ni' (the sample size) and since the latter is (hopefully) large relative to 'mi', the impact of this change should be very minor.

  * The suite of automated package tests now also includes automated visual comparison tests of plots. Therefore, any changes I make to the package that unintentionally break a particular plotting function are now automatically detected.

The full changelog of this (and all prior versions) can be found here:

https://wviechtb.github.io/metafor/news/index.html

Best,
Wolfgang

-- 
Wolfgang Viechtbauer, PhD, Statistician | Department of Psychiatry and    
Neuropsychology | Maastricht University | PO Box 616 (VIJV1) | 6200 MD    
Maastricht, The Netherlands | +31(43)3884170 | https://www.wvbauer.com    



More information about the R-sig-meta-analysis mailing list