updates
Table of Contents
Package Updates
On this page, you can find a description of the (recent) updates to the metafor package. Older updates are archived here.
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 variousforest()
functions (for adding labels at the ends of the x-axis limits) - better default choices for
xlim
in the variousforest()
functions; also, argumentilab.xpos
is now optional when using theilab
argument - added
shade
andcolshade
arguments to the variousforest()
functions - the various
forest()
functions no longer enforce thatxlim
must be at least as wide asalim
- added
link
argument torma.glmm()
rma.glmm()
withmeasure="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 argumentsdi
,ti
, andpi
- 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 theemmeans()
function from the package of the same name - exposed formatter functions
fmtp()
,fmtx()
, andfmtt()
- package
numDeriv
moved fromSuggests
toDepends
model.matrix.rma()
gainsasdf
argument- corrected bug in
vcalc()
(values forobs
andtype
were taken directly as indices instead of using them as identifiers) - improved efficiency of
vif()
whensim=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 toInf
instead ofNA
selmodel()
gainstype='trunc
' andtype='truncest
' models (the latter should be considered experimental)- added
exact="i"
option inpermutest()
(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"
toescalc()
(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 with1/(ni-mi-3)
(instead of1/(ni-mi-1)
), which provides a better approximation in small samples (and analogous to how the variance ofZCOR
is calculated with1/(ni-3)
) - as with
measure="SMD"
, one can now also use argumentsdi
andti
to specify d-values and t-test statistics for measuresRPB
,RBIS
,D2ORN
, andD2ORL
inescalc()
- for measures
COR
,UCOR
, andZCOR
, can now use argumentti
to specify t-test statistics inescalc()
- can also specify (two-sided) p-values (of the respective t-tests) for these measures (and for measures
PCOR
,ZPCOR
,SPCOR
, andZSPCOR
) via argumentpi
(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 measuresPCOR
,ZPCOR
,SPCOR
, andZSPCOR
- 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 whatmatreg()
expects as input when using theV
argument) - optimizers
Rcgmin
andRvmmin
are now available inrma.uni()
,rma.mv()
,rma.glmm()
, andselmodel()
- improved the documentation a bit
Version 3.8-1 (2022-08-26)
funnel.default()
,funnel.rma()
, andregplot.rma()
gainslab
argumentvif()
was completely refactored and gainsreestimate
,sim
, andparallel
arguments; addedas.data.frame.vif.rma()
andplot.vif.rma()
methodsplot.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
inanova.rma()
; addedprint.list.anova.rma()
to print the resulting object - added
as.data.frame.anova.rma()
andas.data.frame.list.anova.rma()
methods - documented the possibility to use an identity link (with
link="identity"
) inrma.uni()
when fitting location-scale models (although this will often lead to estimation problems); addedsolnp()
as an additional optimizer for this case - optimizers
nloptr
andconstrOptim.nl
(the latter from thealabama
package) are now available inrma.uni()
for location-scale models when using an identity link - added measure
SMD1H
toescalc()
- for
measure="SMD"
,escalc()
now also allows the user to specify d-values and t-test statistics via argumentsdi
andti
, respectively aggregate.escalc()
gainsaddk
argument- added (experimental!) support for measures
"RR"
,"RD"
,"PLN"
, and"PR"
torma.glmm()
(but using these measures will often lead to estimation problems) replmiss()
gainsdata
argumentcumul()
functions also store data, so that argumentsilab
,col
,pch
, andpsize
in theforest.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
Version 3.4-0 (2022-04-21)
- added
misc-models
,misc-recs
, andmisc-options
help pages - added
as.data.frame.confint.rma()
andas.data.frame.list.confint.rma
methods permutest()
can now also do permutation tests for location-scale models; it also always returns the permutation distributions; hence, argumentretpermdist
was removed- added
plot.permutest.rma.uni()
function to plot the permutation distributions - simplified
regtest()
,ranktest()
, andtes()
to single functions instead of using generics and methods; this way, adata
argument could be added - added
vcalc()
andblsplit()
functions robust()
gainsclubSandwich
argument; if set toTRUE
, the methods from theclubSandwich
package (https://cran.r-project.org/package=clubSandwich) are used to obtain the cluster-robust results;anova.rma()
andpredict.rma()
updated to work appropriately in this case- results from
robust()
are no longer printed withprint.robust.rma()
but with the print methodsprint.rma.uni()
andprint.rma.mv()
anova.rma()
now gives a warning when running LRTs not based on ML/REML estimation and gainsrhs
argument; it also now has arefit
argument (to refit REML fits with ML in case the fixed effects of the models differ)- setting
dfs="contain"
inrma.mv()
automatically setstest="t"
for convenience - elements of
rho
andphi
inrma.mv()
are now based on the lower triangular part of the respective correlation matrix (instead of the upper triangular part) for consistency with other functions; note that this is in principle a backwards incompatible change, although this should only be a concern in very special circumstances rma.mv()
gainscvvc
argument (for calculating the var-cov matrix of the variance/correlation/covariance components)- added measure
"MPORM"
toescalc()
for computing marginal log odds ratios based on marginal 2x2 tables directly (which requires specification of the correlation coefficients in the paired tables for the calculation of the sampling variances via theri
argument) - added measure
"REH"
toescalc()
for computing the (log transformed) relative excess heterozygosity (to assess deviations from the Hardy-Weinberg equilibrium) aggregate.escalc()
gainscheckpd
argument andstruct="CS+CAR"
rma.glmm()
now has entire array of optimizers available formodel="CM.EL"
andmeasure="OR"
; switched the default fromoptim()
with methodBFGS
tonlminb()
for consistency withrma.mv()
,rma.uni()
, andselmodel.rma.uni()
rma.glmm()
gainscoding
andcor
arguments and hence more flexibility how the group variable should be coded in the random effects structure and whether the random study effects should be allowed to be correlated with the random group effectsrma.uni()
now also provides R^2 for fixed-effects modelsmatreg()
can now also analyze a covariance matrix with a correspondingV
matrix; can also specify variable names (instead of indices) for argumentsx
andy
- renamed argument
nearPD
tonearpd
inmatreg()
(butnearPD
continues to work) plot.profile.rma()
gainsrefline
argument- added
addpoly.rma.predict()
method addpoly.default()
andaddpoly.rma()
gainlty
andannosym
arguments; if unspecified, argumentsannotate
,digits
,width
,transf
,atransf
,targs
,efac
,fonts
,cex
, andannosym
are now automatically set equal to the same values that were used when creating the forest plot- documented
textpos
androwadj
arguments for the variousforest
functions and moved thetop
andannosym
arguments to 'additional arguments' - fixed that
level
argument inaddpoly.rma()
did not affect the CI width points.regplot()
function now also redraws the labels (if there were any to begin with)- added
lbfgsb3c
,subplex
, andBBoptim
as possible optimizer inrma.mv()
,rma.glmm()
,rma.uni()
, andselmodel.rma.uni()
- the object returned by model fitting functions now includes the data frame specified via the
data
argument; various method functions now automatically look for specified variables within this data frame first - datasets moved to the `metadat` package (https://cran.r-project.org/package=metadat)
- improved the documentation a bit
Version 3.0-2 (2021-06-02)
- the
metafor
package now makes use of themathjaxr
package to nicely render equations shown in the HTML help pages rma()
can now also fit location-scale models- added
selmodel()
for fitting a wide variety of selection models (and added the correspondingplot.rma.uni.selmodel()
function for drawing the estimated selection function) rma.mv()
gainsdfs
argument and now provides an often better way for calculating the (denominator) degrees of freedom for approximate t- and F-tests whendfs="contain"
- added
tes()
function for the test of excess significance - added
regplot()
function for drawing scatter plots / bubble plots based on meta-regression models - added
rcalc()
for calculating the variance-covariance matrix of correlation coefficients andmatreg()
for fitting regression models based on correlation/covariance matrices - added convenience functions
dfround()
andvec2mat()
- added
aggregate.escalc()
function to aggregate multiple effect sizes or outcomes within studies/clusters regtest()
now shows the 'limit estimate' of the (average) true effect when usingsei
,vi
,ninv
, orsqrtninv
as predictors (and the model does not contain any other moderators)vif()
gainsbtt
argument and can now also compute generalized variance inflation factors; a properprint.vif.rma()
function was also addedanova.rma()
argumentL
renamed toX
(the former still works, but is no longer documented)- argument
order
incumul()
should now just be a variable, not the order of the variable, to be used for ordering the studies and must be of the same length as the original dataset that was used in the model fitting - similarly, vector arguments in various plotting functions such as
forest.rma()
must now be of the same length as the original dataset that was used in the model fitting (any subsetting and removal ofNAs
is automatically applied) - the various
leave1out()
andcumul()
functions now provide I^2 and H^2 also for fixed-effects models; accordingly,plot.cumul.rma()
now also works with such models - fixed
level
not getting passed down to the variouscumul()
functions plot.cumul.rma()
argumentaddgrid
renamed togrid
(the former still works, but is no longer documented)forest.default()
,forest.rma()
, andlabbe()
gainplim
argument and now provide more flexibility in terms of the scaling of the pointsforest.rma()
gainscolout
argument (to adjust the color of the observed effect sizes or outcomes)- in the various
forest()
functions, the right header is now suppressed whenannotate=FALSE
andheader=TRUE
funnel.default()
andfunnel.rma()
gainlabel
andoffset
argumentsfunnel.default()
andfunnel.rma()
gainlty
argument; the reference line is now drawn by default as a dotted line (like the line for the pseudo confidence region)- the
forest
andfunnel
arguments ofreporter.rma.uni()
can now also be logicals to suppress the drawing of these plots - added
weighted
argument tofsn()
(for Orwin's method) - added some more transformation functions
bldiag()
now properly handles ?x0 or 0x? matrices- p-values are still given to 2 digits even when
digits=1
summary.escalc()
also provides the p-values (of the Wald-type tests); but when using thetransf
argument, the sampling variances, standard errors, test statistics, and p-values are no longer shownrma.uni()
no longer constrains a fixed tau^2 value to 0 when k=1- slight speedup in functions that repeatedly fit
rma.uni()
models by skipping the computation of the pseudo R^2 statistic - started using the
pbapply
package for showing progress bars, also when using parallel processing - to avoid potential confusion, all references to 'credibility intervals' have been removed from the documentation; these intervals are now exclusively referred to as 'prediction intervals'; in the output, the bounds are therefore indicated now as
pi.lb
andpi.ub
(instead ofcr.lb
andcr.ub
); the corresponding argument names were changed inaddpoly.default()
; argumentaddcred
was changed toaddpred
inaddpoly.rma()
andforest.rma()
; however, code using the old arguments names should continue to work - one can now use
weights(..., type="rowsum")
for intercept-onlyrma.mv
models (to obtain 'row-sum weights') simulate.rma()
gainsolim
argument; renamed theclim
argument insummary.escalc()
and the variousforest()
functions toolim
for consistency (the oldclim
argument should continue to work)- show nicer network graphs for
dat.hasselblad1998
anddat.senn2013
in the help files - added 23 datasets (
dat.anand1999
,dat.assink2016
,dat.baskerville2012
,dat.bornmann2007
,dat.cannon2006
,dat.cohen1981
,dat.craft2003
,dat.crede2010
,dat.dagostino1998
,dat.damico2009
,dat.dorn2007
,dat.hahn2001
,dat.kalaian1996
,dat.kearon1998
,dat.knapp2017
,dat.landenberger2005
,dat.lau1992
,dat.lim2014
,dat.lopez2019
,dat.maire2019
,dat.moura2021
,dat.obrien2003
,dat.vanhowe1999
,dat.viechtbauer2021
) - the package now runs a version check on startup in interactive sessions; setting the environment variable
METAFOR_VERSION_CHECK
toFALSE
disables this - refactored various functions (for cleaner/simpler code)
- improved the documentation a bit
Version 2.4-0 (2020-03-19)
- version jump to 2.4-0 for CRAN release (from now on, even minor numbers for CRAN releases, odd numbers for development versions)
- the various
forest()
functions gainheader
argument escalc()
gainsinclude
argument- setting
verbose=3
in model fitting functions setsoptions(warn=1)
forest.rma()
andforest.default()
now throw informative errors when misusingorder
andsubset
arguments- fixed failing tests due to the
stringsAsFactors=FALSE
change in the upcoming version of R print.infl.rma.uni()
gainsinfonly
argument, to only show the influential studies- removed
MASS
fromSuggests
(no longer needed) - argument
btt
can now also take a string to grep for - added
optimParallel
as possible optimizer inrma.mv()
- added (for now undocumented) option to fit models in
rma.glmm()
via theGLMMadaptive
package (instead oflme4
); to try this, use:control=list(package="GLMMadaptive")
- started to use numbering scheme for 'devel' version (the number after the dash indicates the devel version)
- added
contrmat()
function (for creating a matrix that indicates which groups have been compared against each other in each row of a dataset) - added
to.wide()
function (for restructuring long format datasets into the wide format needed for contrast-based analyses) I^2
andH^2
are also shown in output for fixed-effects models- argument
grid
inbaujat()
can now also be a color name - added (for now undocumented)
time
argument to more functions that are computationally expensive - added (for now undocumented)
textpos
argument to the various forest functions - added a new dataset (
dat.graves2010
) - added more tests
Version 2.1-0 (2019-05-13)
- added
formula()
method for objects of classrma
llplot()
now also allows formeasure="GEN"
; also, the documentation and y-axis label have been corrected to indicate that the function plots likelihoods (not log likelihoods)confint.rma.mv()
now returns an object of classlist.confint.rma
when obtaining CIs for all variance and correlation components of the model; added correspondingprint.list.confint.rma()
function- moved
tol
argument inpermutest()
tocontrol
and renamed the argument tocomptol
- added
PMM
andGENQM
estimators in rma.uni() - added
vif()
function to get variance inflation factors - added
.glmulti
object for making the interaction with glmulti easier - added
reporter()
andreporter.rma.uni()
for dynamically generating analysis reports for objects of classrma.uni
- output is now styled/colored when
crayon
package is loaded (this only works on a 'proper' terminal with color support; also works in RStudio) - overhauled
plot.gosh.rma()
; whenout
is specified, it now shows two distributions, one for the values when the outlier is included and one for the values when for outlier is excluded; dropped thehcol
argument and addedborder
argument - refactored
influence.rma.uni()
to be more consistent internally with other functions;print.infl.rma.uni()
andplot.infl.rma.uni()
adjusted accordingly; functionscooks.distance.rma.uni()
,dfbetas.rma.uni()
, andrstudent.rma.uni()
now callinfluence.rma.uni()
for the computations rstudent.rma.uni()
now computes the SE of the deleted residuals in such a way that it will yield identical results to a mean shift outlier model even when that model is fitted withtest="knha"
rstandard.rma.uni()
gainstype
argument, and can now also compute conditional residuals (it still computes marginal residuals by default)cooks.distance.rma.mv()
gainscluster
argument, so that the Cook's distances can be computed for groups of estimatescooks.distance.rma.mv()
gainsparallel
,ncpus
, andcl
arguments and can now make use of parallel processingcooks.distance.rma.mv()
should be faster by using the estimates from the full model as starting values when fitting the models with the ith study/cluster deleted from the datasetcooks.distance.rma.mv()
gainsreestimate
argument; when set toFALSE
, variance/correlation components are not reestimatedrstandard.rma.mv()
gainscluster
argument for computing cluster-level multivariate standardized residuals- added
rstudent.rma.mv()
anddfbetas.rma.mv()
- smarter matching of elements in
newmods
(when using a named vector) inpredict()
that also works for models with interactions (thanks to Nicole Erler for pointing out the problem) rma.uni()
andrma.mv()
no longer issue (obvious) warnings when user constrainsvi
orV
to 0 (i.e.,vi=0
orV=0
, respectively)rma.mv()
does more intelligent filtering based onNAs
inV
matrixrma.mv()
now ensures strict symmetry of any (var-cov or correlation) matrices specified via theR
argument- fixed
rma.mv()
so checks onR
argument run as intended; also fixed an issue when multiple formulas with slashes are specified viarandom
(thanks to Andrew Loignon for pointing out the problem) - suppressed showing calls on some warnings/errors in
rma.mv()
rma.mv()
now allows for a continuous-time autoregressive random effects structure (struct="CAR"
) and various spatial correlation structures (struct="SPEXP"
,"SPGAU"
,"SPLIN"
,"SPRAT"
, and"SPSPH"
)rma.mv()
now allows forstruct="GEN"
which models correlated random effects for any number of predictors, including continuous ones (i.e., this allows for 'random slopes')- in the various
forest()
functions, whenoptions(na.action="na.pass")
oroptions(na.action="na.exclude")
and an annotation containsNA
, this is now shown as a blank (instead ofNA [NA, NA]
) - the various
forest()
andaddpoly()
functions gain afonts
argument - the various
forest()
functions gain atop
argument - the various
forest()
functions now show correct point sizes when the weights of the studies are exactly the same forest.cumul.rma()
gains acol
argumentfunnel.default()
andfunnel.rma()
can now take vectors as input for thecol
andbg
arguments (and also forpch
); both functions also gain alegend
argumentaddpoly()
functions can now also show prediction interval bounds- removed 'formula interface' from
escalc()
; until this actually adds some kind of extra functionality, this just makesescalc()
more confusing to use escalc()
can now compute the coefficient of variation ratio and the variability ratio for pre-post or matched designs ("CVRC"
,"VRC"
)escalc()
does a bit more housekeeping- added (currently undocumented) arguments
onlyo1
,addyi
, andaddvi
toescalc()
that allow for more flexibility when computing certain bias corrections and when computing sampling variances for measures that make use of theadd
andto
arguments escalc()
now setsadd=0
for measures where the use of such a bias correction makes little sense; this applies to the following measures:"AS"
,"PHI"
,"RTET"
,"IRSD"
,"PAS"
,"PFT"
,"IRS"
, and"IRFT"
; one can still force the use of the bias correction by explicitly setting theadd
argument to some non-zero value- added
clim
argument tosummary.escalc()
- added
ilim
argument totrimfill()
labbe()
gainslty
argumentlabbe()
now (invisibly) returns a data frame with the coordinates of the points that were drawn (which may be useful for manual labeling of points in the plot)- added a print method for
profile.rma
objects profile.rma.mv()
now check whether any of the profiled log-likelihood values is larger than the log-likelihood of the fitted model (using numerical tolerance given bylltol
) and issues a warning if soprofile.rma.uni()
,profile.rma.mv()
, andplot.profile.rma()
gaincline
argument;plot.profile.rma()
gainsxlim
,ylab
, andmain
arguments- fixed an issue with
robust.rma.mv()
when the model was fitted withsparse=TRUE
(thanks to Roger Martineau for noting the problem) - various method functions (
fitted()
,resid()
,predict()
, etc.) behave in a more consistent manner when model omitted studies with missings predict.rma()
gainsvcov
argument; when set toTRUE
, the variance-covariance matrix of the predicted values is also returnedvcov.rma()
can now also return the variance-covariance matrix of the fitted values (type="fitted"
) and the residuals (type="resid"
)- added
`$<-`
andas.matrix()
methods forlist.rma
objects - fixed error in
simulate.rma()
that would generate too many samples forrma.mv
models - added undocumented argument
time
to all model fitting functions; if set toTRUE
, the model fitting time is printed - added more tests (also for parallel operations); also, all tests updated to use proper tolerances instead of rounding
- reorganized the documentation a bit
Older Versions
Older updates are archived here.
updates.txt ยท Last modified: 2023/05/09 06:25 by Wolfgang Viechtbauer