[R-meta] New Version of metafor (2.4-0)

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Sat Mar 21 12:17:40 CET 2020

Hi All,

Just a little note that a new version of metafor (2.4-0) has been pushed to CRAN. This update was prompted by the upcoming change in R where the new default will be 'stringsAsFactors=FALSE' (at long last!). As a result, some tests were failing on R-devel, so these needed fixing. Along the way, I made various minor internal updates and added some convenience functionality to several functions. The full changelog can be found here:


I also added two functions that are especially useful for those conducting network meta-analyses with the metafor package. With the to.wide() function, one can rearrange a dataset that is in an arm-based 'long' format to a contrast-based 'wide' format. Two examples illustrating the use of this function can be found here:


Once the dataset is in such a wide format, an important next step is the construction of variables that reflect which two groups are being compared with each other in each row (through +1, 0, -1 coding). Such a contrast matrix can be easily created with the contrmat() function. See:


for the help file and two examples illustrating its use. The analysis of these two datasets (using arm- and contrast-based models) are illustrated here:


and here:


Hope you are all staying safe and healthy in these trying times!


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