Older updates of the metafor package are archived on this page. More recent updates can be found here.
forest()
functions gain header
argumentescalc()
gains include
argumentverbose=3
in model fitting functions sets options(warn=1)
forest.rma()
and forest.default()
now throw informative errors when misusing order
and subset
argumentsstringsAsFactors=FALSE
change in the upcoming version of Rprint.infl.rma.uni()
gains infonly
argument, to only show the influential studiesMASS
from Suggests
(no longer needed)btt
can now also take a string to grep foroptimParallel
as possible optimizer in rma.mv()
rma.glmm()
via the GLMMadaptive
package (instead of lme4
); to try this, use: control=list(package="GLMMadaptive")
contrmat()
function (for creating a matrix that indicates which groups have been compared against each other in each row of a dataset)to.wide()
function (for restructuring long format datasets into the wide format needed for contrast-based analyses)I^2
and H^2
are also shown in output for fixed-effects modelsgrid
in baujat()
can now also be a color nametime
argument to more functions that are computationally expensivetextpos
argument to the various forest functionsdat.graves2010
)formula()
method for objects of class rma
llplot()
now also allows for measure="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 class list.confint.rma
when obtaining CIs for all variance and correlation components of the model; added corresponding print.list.confint.rma()
functiontol
argument in permutest()
to control
and renamed the argument to comptol
PMM
and GENQM
estimators in rma.uni()vif()
function to get variance inflation factors.glmulti
object for making the interaction with glmulti easierreporter()
and reporter.rma.uni()
for dynamically generating analysis reports for objects of class rma.uni
crayon
package is loaded (this only works on a 'proper' terminal with color support; also works in RStudio)plot.gosh.rma()
; when out
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 the hcol
argument and added border
argumentinfluence.rma.uni()
to be more consistent internally with other functions; print.infl.rma.uni()
and plot.infl.rma.uni()
adjusted accordingly; functions cooks.distance.rma.uni()
, dfbetas.rma.uni()
, and rstudent.rma.uni()
now call influence.rma.uni()
for the computationsrstudent.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 with test="knha"
rstandard.rma.uni()
gains type
argument, and can now also compute conditional residuals (it still computes marginal residuals by default)cooks.distance.rma.mv()
gains cluster
argument, so that the Cook's distances can be computed for groups of estimatescooks.distance.rma.mv()
gains parallel
, ncpus
, and cl
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()
gains reestimate
argument; when set to FALSE
, variance/correlation components are not reestimatedrstandard.rma.mv()
gains cluster
argument for computing cluster-level multivariate standardized residualsrstudent.rma.mv()
and dfbetas.rma.mv()
newmods
(when using a named vector) in predict()
that also works for models with interactions (thanks to Nicole Erler for pointing out the problem)rma.uni()
and rma.mv()
no longer issue (obvious) warnings when user constrains vi
or V
to 0 (i.e., vi=0
or V=0
, respectively)rma.mv()
does more intelligent filtering based on NAs
in V
matrixrma.mv()
now ensures strict symmetry of any (var-cov or correlation) matrices specified via the R
argumentrma.mv()
so checks on R
argument run as intended; also fixed an issue when multiple formulas with slashes are specified via random
(thanks to Andrew Loignon for pointing out the problem)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 for struct="GEN"
which models correlated random effects for any number of predictors, including continuous ones (i.e., this allows for 'random slopes')forest()
functions, when options(na.action="na.pass")
or options(na.action="na.exclude")
and an annotation contains NA
, this is now shown as a blank (instead of NA [NA, NA]
)forest()
and addpoly()
functions gain a fonts
argumentforest()
functions gain a top
argumentforest()
functions now show correct point sizes when the weights of the studies are exactly the sameforest.cumul.rma()
gains a col
argumentfunnel.default()
and funnel.rma()
can now take vectors as input for the col
and bg
arguments (and also for pch
); both functions also gain a legend
argumentaddpoly()
functions can now also show prediction interval boundsescalc()
; until this actually adds some kind of extra functionality, this just makes escalc()
more confusing to useescalc()
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 housekeepingonlyo1
, addyi
, and addvi
to escalc()
that allow for more flexibility when computing certain bias corrections and when computing sampling variances for measures that make use of the add
and to
argumentsescalc()
now sets add=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 the add
argument to some non-zero valueclim
argument to summary.escalc()
ilim
argument to trimfill()
labbe()
gains lty
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)profile.rma
objectsprofile.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 by lltol
) and issues a warning if soprofile.rma.uni()
, profile.rma.mv()
, and plot.profile.rma()
gain cline
argument; plot.profile.rma()
gains xlim
, ylab
, and main
argumentsrobust.rma.mv()
when the model was fitted with sparse=TRUE
(thanks to Roger Martineau for noting the problem)fitted()
, resid()
, predict()
, etc.) behave in a more consistent manner when model omitted studies with missingspredict.rma()
gains vcov
argument; when set to TRUE
, 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"
)`$<-`
and as.matrix()
methods for list.rma
objectssimulate.rma()
that would generate too many samples for rma.mv
modelstime
to all model fitting functions; if set to TRUE
, the model fitting time is printedsimulate()
method for rma
objects; added MASS
to Suggests
(since simulating for rma.mv
objects requires mvrnorm()
from MASS
)cooks.distance.rma.mv()
now works properly even when there are missing values in the dataresiduals()
gains type
argument and can compute Pearson residualsnewmods
argument in predict()
can now be a named vector or a matrix/data frame with column names that get properly matched up with the variables in the modelranef.rma.mv()
for extracting the BLUPs of the random effects for rma.mv
modelsranktest.default()
, so user can now pass the outcomes and corresponding sampling variances directly to the functionregtest.default()
, so user can now pass the outcomes and corresponding sampling variances directly to the functionfunnel.default()
gains subset
argumentfunnel.default()
and funnel.rma()
gain col
and bg
argumentsplot.profile.rma()
gains ylab
argumentrobust.rma
objectsrma.gosh
objectsescalc()
can now compute outcome measures based on paired binary data ("MPRR"
, "MPOR"
, "MPRD"
, "MPORC"
, and "MPPETO"
)escalc()
can now compute (semi-)partial correlation coefficients ("PCOR"
, "ZPCOR"
, "SPCOR"
)escalc()
can now compute measures of variability for single groups ("CVLN"
, "SDLN"
) and for the difference in variability between two groups ("CVR"
, "VR"
); also the log transformed mean ("MNLN"
) has been added for consistencyescalc()
can now compute the sampling variance for measure="PHI"
for studies using stratified sampling (vtpye="ST"
)`[`
method for escalc
objects now properly handles the ni
and slab
attributes and does a better job of cleaning out superfluous variable name informationrbind()
method for escalc
objectsas.data.frame()
method for list.rma
objectsdat.pagliaro1992
) for another illustration of a network meta-analysisdat.laopaiboon2015
) on the effectiveness of azithromycin for treating lower respiratory tract infectionsrma.uni()
and rma.mv()
now check if the ratio of the largest to smallest sampling variance is very large; results may not be stable then (and very large ratios typically indicate wrongly coded data)...
and issues are warning if soranef()
, import ranef()
from nlme
--disable-long-double
)diagram_metafor.pdf
vignette to just diagram.pdf
knha
in rma.uni()
and argument tdist
in rma.glmm()
and rma.mv()
are now superseded by argument test
in all three functions; for backwards compatibility, the knha
and tdist
arguments still work, but are no longer documentedrma(yi, vi, weights=1, test="knha")
now yields the same results as rma(yi, vi, weighted=FALSE, test="knha")
(but use of the Knapp and Hartung method in the context of an unweighted analysis remains an experimental feature)escalc
object directly to rma.uni()
, which then tries to automatically determine the yi
and vi
variables in the data frame (thanks to Christian Röver for the suggestion)escalc()
can now also be used to convert a regular data frame to an escalc
objectmeasure="UCOR"
, the exact bias-correction is now used (instead of the approximation); when vtype="UB"
, the exact equation is now used to compute the unbiased estimate of the variance of the bias-corrected correlation coefficient; hence gsl
is now a suggested package (needed to compute the hypergeometric function) and is loaded when requiredcooks.distance()
now also works with rma.mv
objects; and since model fitting can take some time, an option to show a progress bar has been addedrobust.rma.mv()
throwing errors when the model was fitted with sparse=TRUE
robust.rma.mv()
when the model was fitted with user-defined weights (or a user-defined weight matrix)ranef()
for extracting the BLUPs of the random effects (only for rma.uni
objects at the moment)permutest.rma.uni()
, that is, the p-value is computed with mean(abs(z_perm) >= abs(z_obs) - tol)
(where tol
is a numerical tolerance)permutest.rma.uni()
gains permci
argument, which can be used to obtain permutation-based CIs of the model coefficients (note that this is computationally very demanding and may take a long time to complete)rma.glmm()
continues to work even when the saturated model cannot be fitted (although the tests for heterogeneity are not available then)rma.glmm()
now allows control over the arguments used for method.args
(via control=list(hessianCtrl=list(...))
) passed to hessian()
(from the numDeriv
package) when using model="CM.EL"
and measure="OR"
rma.glmm()
, default method.args
value for r
passed to hessian()
has been increased to 16 (while this slows things down a bit, this appears to improve the accuracy of the numerical approximation to the Hessian, especially when tau^2 is close to 0)forest()
and addpoly()
functions now have a new argument called width
, which provides manual control over the width of the annotation columns; this is useful when creating complex forest plots with a monospaced font and we want to ensure that all annotations are properly lined up at the decimal pointforest()
and addpoly()
functions are now a bit more compact by defaultefac
argument in the various forest()
functionsdigits
argumentfunnel.default()
, which directly takes as input a vector with the observed effect sizes or outcomes and the corresponding sampling variances, standard errors, and/or sample sizesplot.profile.rma()
, a plot method for objects returned by the profile.rma.uni()
and profile.rma.mv()
functionsbaujat.rma.uni()
, baujat.rma.mh()
, and baujat.rma.peto()
to baujat.rma()
, which now handles objects of class rma.uni
, rma.mh
, and rma.peto
baujat.rma()
gains argument symbol
for more control over the plotting symbollabbe()
gains a grid
argumentqqnorm.rma.uni()
, qqnorm.rma.mh()
, and qqnorm.rma.peto()
functions (and more control thereof)qqnorm.rma.uni()
gains lty
argumentgosh.rma()
and plot.gosh.rma()
for creating GOSH (i.e., graphical display of study heterogeneity) plots based on Olkin et al. (2012)test="knha"
(i.e., knha=TRUE
) in rma()
now leads to more appropriate resultsescalc
objectsdat.egger2001
and dat.li2007
) on the effectiveness of intravenous magnesium in acute myocardial infarctionmethods
package is now under Depends
(in addition to Matrix
), so that rma.mv(..., sparse=TRUE)
always works, even under Rscriptgraphics
, grDevices
, and methods
to Imports (due to recent change in how CRAN checks packages)struct
argument for rma.mv()
now also allows for "ID"
and "DIAG"
, which are identical to the "CS"
and "HCS"
structures, but with the correlation parameter fixed to 0robust()
for (cluster) robust tests and confidence intervals for rma.uni
and rma.mv
models (this uses a robust sandwich-type estimator of the variance-covariance matrix of the fixed effects along the lines of the Eicker-Huber-White method)confint()
now works for models fitted with the rma.mv()
function; for variance and correlation parameters, the function provides profile likelihood confidence intervals; the output generated by the confint()
function has been adjusted in general to make the formatting more consistent across the different model typesrma.mv
, profile()
now provides profile plots for all (non-fixed) variance and correlation components of the model when no component is specified by the user (via the sigma2
, tau2
, rho
, gamma2
, or phi
arguments)measure="MD"
and measure="ROM"
, one can now choose between vtype="LS"
(the default) and vtype="HO"
; the former computes the sampling variances without assuming homoscedasticity, while the latter assumes homoscedasticityfitstats()
, AIC()
, and BIC()
functionsslab
argument is now done *after* any subsetting is done (as suggested by Michael Dewey)rma.glmm()
now again works when using add=0
, in which case some of the observed outcomes (e.g., log odds or log odds ratios) may be NA
rma.glmm()
with model="CM.EL"
, the saturated model (used to compute the Wald-type and likelihood ratio tests for the presence of (residual) heterogeneity) often fails to converge; the function now continues to run (instead of stopping with an error) and simply omits the test results from the outputrma.glmm()
with model="CM.EL"
and inversion of the Hessian fails via the Choleski factorization, the function now makes another attempt via the QR decomposition (even when this works, a warning is issued)rma.glmm()
, BIC and AICc values were switched around; correctedsuppressWarnings()
is made when functions repeatedly need to fit the same model, such as cumul()
, influence()
, and profile()
; that way, one does not get inundated with the same warning(s)rma.mv()
changed to nlminb()
(instead of optim()
with "Nelder-Mead"
); extensive testing indicated that nlminb()
(and also optim()
with "BFGS"
) is typically quicker and more robust; note that this is in principle a non-backwards compatible change, but really a necessary one; and you can always revert to the old behavior with control=list(optimizer="optim", optmethod="Nelder-Mead")
testthat
package; for example, expect_equivalent(x,y)
is used instead of test_that(x, is_equivalent_to(y))
is_identical_to()
comparisons to expect_equivalent()
ones (that failed on Sparc Solaris)funnel()
now works again for rma.glmm
objects (note to self: quit breaking things that work!)rma.glmm()
will now only issue a warning (and not an error) when the Hessian for the saturated model cannot be inverted (which is needed to compute the Wald-type test for heterogeneity, so the test statistic is then simply set to NA
)rma.mv()
now allows for two terms of the form ~ inner | outer
; the variance components corresponding to such a structure are called gamma2
and correlations are called phi
; other functions that work with objects of class rma.mv
have been updated accordinglyrma.mv()
now provides (even) more optimizer choices: nlm()
from the stats
package, hjk()
and nmk()
from the dfoptim
package, and ucminf()
from the ucminf
package; choose the desired optimizer via the control
argument (e.g., control=list(optimizer="nlm")
)profile.rma.uni()
and profile.rma.mv()
now can do parallel processing (which is especially relevant for rma.mv
objects, where profiling is crucial and model fitting can be slow)confint()
functions now have a transf
argument (to apply some kind of transformation to the model coefficients and confidence interval bounds); coefficients and bounds for objects of class rma.mh
and rma.peto
are no longer automatically transformedforest()
functions no longer enforce that the actual x-axis limits (alim
) encompass the observed outcomes to be plotted; also, outcomes below or above the actual x-axis limits are no longer shownforest()
functions now provide control over the horizontal lines (at the top/bottom) that are automatically added to the plot via the lty
argument (this also allows for removing them); also, the vertical reference line is now placed *behind* the points/CIsforest.default()
now has argument col
which can be used to specify the color(s) to be used for drawing the study labels, points, CIs, and annotationsefac
argument for forest.rma()
now also allows two values, the first for the arrows and CI limits, the second for summary estimatesmeasure="PLO"
labbe()
plots now have "(Group 1)"
and "(Group 2)"
added by defaultanova.rma()
gains argument L
for specifying linear combinations of the coefficients in the model that should be tested to be zerobaujat()
, cooks.distance()
, dfbetas()
, influence()
, and rstudent()
could fail for rma.uni
objects; such cases are now handled properlypredict()
function now shows the study labels when they have been specified by the user (and newmods
is not used)print.infl.rma.uni()
function now shows the DFBETAS values with the other case diagnostics in a single table (for easier inspection); if there is more than one fixed effect, a separate table is still used for the DFBETAS values (with one column for each coefficient)measure="SMCRH"
to the escalc()
function for the standardized mean change using raw score standardization with heteroscedastic population variances at the two measurement occasionsmeasure="ROMC"
to the escalc()
function for the (log transformed) ratio of means (response ratio) when the means reflect two measurement occasions (e.g., for a single group of people) and hence are correlatedmeasure="RTET"
); package therefore no longer suggests polycor
but now suggest mvtnorm
(which is loaded as needed)fill
returned by trimfill.rma.uni()
is now a logical vector (instead of a 0/1 dummy variable)print.list.rma()
now also returns the printed results invisibly as a data framedat.senn2013
) as another illustration of a network meta-analysismetafor
now depends on at least version 3.1.0 of Rstats
and Matrix
packages from Depends
to Imports
; as a result, had to add utils
to Imports
; moved the Formula
package from Depends
to Suggests
update.rma()
function (for updating/refitting a model); model objects also now store and keep the callvcov()
function now also extracts the marginal variance-covariance matrix of the observed effect sizes or outcomes from a fitted model (of class rma.uni
or rma.mv
)rma.mv()
now makes use of the Cholesky decomposition when there is a random = ~ inner | outer
formula and struct="UN"
; this is numerically more stable than the old approach that avoided non-positive definite solutions by forcing the log-likelihood to be -Inf
in those cases; the old behavior can be restored with control = list(cholesky=FALSE)
rma.mv()
now requires the inner
variable in an ~ inner | outer
formula to be a factor or character variable (except when struct
is "AR"
or "HAR"
); use ~ factor(inner) | outer
in case it isn'tanova.rma.uni()
function changed to anova.rma()
that works now for both rma.uni
and rma.mv
objectsprofile.rma.mv()
function now omits the number of the variance or correlation component from the plot title and x-axis label when the model only includes one of the respective parametersprofile()
functions now pass on the ...
argument also to the title()
function used to create the figure titles (esp. relevant when using the cex.main
argument)drop00
argument of the rma.mh()
and rma.peto()
functions now also accepts a vector with two logicals, the first applies when calculating the observed outcomes, the second when applying the Mantel-Haenszel or Peto's methodweights.rma.uni()
now shows the correct weights when weighted=FALSE
showweight
renamed to showweights
in the forest.default()
and forest.rma()
functions (more consistent with the naming of the various weights()
functions)model.matrix.rma()
function (to extract the model matrix from objects of class rma
)funnel()
and radial()
now (invisibly) return data frames with the coordinates of the points that were drawn (may be useful for manual labeling of points in the plots)permutest.rma.uni()
function now uses a numerical tolerance when making comparisons (>= or ⇐) between an observed test statistic and the test statistic under the permuted data; when using random permutations, the function now ensures that the very first permutation correspond to the original datarequire()
calls replaced with requireNamespace()
to avoid altering the search path (hopefully this won't break stuff ...)dat.collins91985a
updated (including all reported outcomes and some more information about the various trials)method="GENQ"
to rma.uni()
for the generalized Q-statistic estimator of tau^2, which allows for used-defined weights (note: the DL and HE estimators are just special cases of this method)method="GENQ"
, then confint()
will now use the generalized Q-statistic method to construct the corresponding confidence interval for tau^2 (thanks to Dan Jackson for the code); the iterative method used to obtain the CI makes use of Farebrother's algorithm as implemented in the CompQuadForm
packagerma.uni()
function handles non-positive sampling variancesrma.uni()
, rma.mv()
, and rma.glmm()
now try to detect and remove any redundant predictors before the model fitting; therefore, if there are exact linear relationships among the predictor variables (i.e., perfect multicollinearity), terms are removed to obtain a set of predictors that is no longer perfectly multicollinear (a warning is issued when this happens); note that the order of how the variables are specified in the model formula can influence which terms are removedrma()
function using the Knapp & Hartung method (i.e., when knha=TRUE
); this has been fixedregtest()
no longer works (for now) with rma.mv
objects (it wasn't meant to in the first place); if you want to run something along the same lines, just consider adding some measure of the precision of the observed outcomes (e.g., their standard errors) as a predictor to the modelrma.mv()
function via the nloptr
package by setting control = list(optimizer="nloptr")
; when using this optimizer, the default is to use the BOBYQA implementation from that package with a relative convergence criterion of 1e-8 on the function value (see documentation on how to change these defaults)predict.rma()
function now works for rma.mv
objects with multiple tau^2 values even if the user specifies the newmods
argument but not the tau2.levels
argument (but a warning is issued and the prediction intervals are not computed)var.names
now works properly in escalc()
when the user has not made use of the data
argument (thanks to Jarrett Byrnes for bringing this to my attention)plot()
function for cumulative random-effects models results as obtained with the cumul.rma.uni()
function; the plot shows the model estimate on the x-axis and the corresponding tau^2 estimate on the y-axis in the cumulative order of the resultsrma.glmm()
function when method="ML"
, measure="IRR"
, and model="UM.FS"
, that is, when fitting a mixed-effects Poisson regression model with fixed study effects to two-group event count data (thanks to Peter Konings for pointing out this error)dat.bourassa1996
, dat.riley2003
)replmiss()
(just a useful helper function)LazyData: TRUE
rma.uni()
that should be user transparentrma.uni()
now has a weights
argument, allowing the user to specify arbitrary user-defined weights; all functions affected by this have been updated accordinglyyi
and ni
vectors in rma.uni()
and rma.mv()
functionsrma.mv()
that should make it a bit fasterV
of rma.mv()
now also accepts a list of var-cov matrices for the observed effects or outcomes; from the list elements, the full (block diagonal) var-cov matrix V
is then automatically constructedrma.mv()
now has a new argument W
allowing the user to specify arbitrary user-defined weights or an arbitrary weight matrixrma.mv()
now has a new argument sparse
; by setting this to TRUE
, the function uses sparse matrix objects to the extent possible; this can speed up model fitting substantially for certain models (hence, the metafor
package now depends on the Matrix
package)rma.mv()
now allows for struct="AR"
and struct="HAR"
, to fit models with (heteroscedastic) autoregressive (AR1) structures among the true effects (useful for meta-analyses of studies reporting outcomes at multiple time points)rma.mv()
now has a new argument Rscale
which can be used to control how matrices specified via the R
argument are scaled (see docs for more details)rma.mv()
now only checks for missing values in the rows of the lower triangular part of the V
matrix (including the diagonal); this way, if Vi = matrix(c(.5,NA,NA,NA), nrow=2, ncol=2)
is the var-cov matrix of the sampling errors for a particular study with two outcomes, then only the second row/column needs to be removed before the model fitting (and not the entire study)dat.begg1989
, dat.ishak2007
, dat.fine1993
, dat.konstantopoulos2011
, and dat.hasselblad1998
) to provide further illustrations of the use of the rma.mv()
function (for meta-analyses combining controlled and uncontrolled studies, for meta-analyses of longitudinal studies, for multilevel meta-analyses, and for network meta-analyses / mixed treatment comparison meta-analyses)rstandard.rma.mv()
function to compute standardized residuals for models fitted with the rma.mv()
function (rstudent.rma.mv()
to be added at a later point); also added hatvalues.rma.mv()
for computing the hat values and weights.rma.uni()
for computing the weights (i.e., the diagonal elements of the weight matrix)weights()
functions now have a new argument type
to indicate whether only the diagonal elements of the weight matrix (default) or the entire weight matrix should be returnedhatvalues()
functions now have a new argument type
to indicate whether only the diagonal elements of the hat matrix (default) or the entire hat matrix should be returnedpredict.rma()
function now works properly for rma.mv
objects (also has a new argument tau2.levels
to specify, where applicable, the levels of the inner factor when computing prediction intervals)forest.rma()
function now provides a bit more control over the color of the summary polygon and is now compatible with rma.mv
objects; also, has a new argument lty
, which provides more control over the line type for the individual CIs and the prediction intervaladdpoly.default()
and addpoly.rma()
now have a border
argument (for consistency with the forest.rma()
function); addpoly.rma()
now yields the correct CI bounds when the model was fitted with knha=TRUE
forest.cumul.rma()
now provides the correct CI bounds when the models were fitted with the Knapp & Hartung method (i.e., when knha=TRUE
in the original rma()
function call)forest()
functions now return information about the chosen values for arguments xlim
, alim
, at
, ylim
, rows
, cex
, cex.lab
, and cex.axis
invisibly (useful for tweaking the default values); thanks to Michael Dewey for the suggestionforest()
functions now have a new argument, clim
, to set limits for the confidence/prediction interval boundscumul.mh()
and cumul.peto()
now get the order of the studies right when there are missing values in the datatransf
argument of leave1out.rma.mh()
, leave1out.rma.peto()
, cumul.rma.mh()
, and cumul.rma.peto()
should now be used to specify the actual function for the transformation (the former behavior of setting this argument to TRUE
to exponentiate log RRs, log ORs, or log IRRs still works for back-compatibility); this is more consistent with how the cumul.rma.uni()
and leave1out.rma.uni()
functions work and is also more flexiblebldiag()
function to construct a block diagonal matrix from (a list of) matrices (may be needed to construct the V
matrix when using the rma.mv()
function); bdiag()
function from the Matrix
package does the same thing, but creates sparse matrix objectsprofile.rma.mv()
now has a startmethod
argument; by setting this to "prev"
, successive model fits are started at the parameter estimates from the previous model fit; this may speed things up a bit; also, the method for automatically choosing the xlim
values has been changedprofile.rma.mv()
function, which would throw an error if the last model fit did not convergedat.linde2005
) for replication of the analyses in Viechtbauer (2007)dat.molloy2014
) for illustrating the meta-analysis of (r-to-z transformed) correlation coefficientsdat.gibson2002
) to illustrate the combined analysis of standardized mean differences and probit transformed risk differencesweights.mh()
slightly changed to prevent integer overflows for large countstransf.ipft.hm()
are now suppressed (cases that raised those warnings were already handled correctly)predict()
, blup()
, cumul()
, and leave1out()
, when using the transf
argument, the standard errors (which are NA
) are no longer shown in the outputslab
in various functions will now also accept non-unique study labels; make.unique()
is used as needed to make them uniquevignettes("metafor")
and vignettes("metafor_diagram")
work again (yes, I know they are not true vignettes in the strict sense, but I think they should show up on the CRAN website for the package and using a minimal valid Sweave document that is recognized by the R build system makes that happen)escalc()
and its summary()
method now keep better track when the data frame contains multiple columns with outcome or effect size values (and corresponding sampling variances) for print formatting; also simplified the class structure a bit (and hence, print.summary.escalc()
removed)summary.escalc()
has a new argument H0
to specify the value of the outcome under the null hypothesis for computing the test statistics"OR2DN"
and "D2ORN"
to escalc()
for transforming log odds ratios to standardized mean differences and vice-versa, based on the method of Cox & Snell (1989), which assumes normally distributed response variables within the two groups before the dichotomizationpermutest.rma.uni()
function now catches an error when the number of permutations requested is too large (for R to even create the objects to store the results in) and produces a proper error messagefunnel.rma()
function now allows the yaxis
argument to be set to "wi"
so that the actual weights (in %) are placed on the y-axis (useful when arbitrary user-defined have been specified)rma.glmm()
, the control argument optCtrl
is now used for passing control arguments to all of the optimizers (hence, control arguments nlminbCtrl
and minqaCtrl
are now defunct)rma.glmm()
should not throw an error anymore when including only a single moderator/predictor in the modelpredict.rma()
now returns an object of class list.rma
(therefore, function print.predict.rma()
has been removed)rma.list
objects, added `[`
, head()
, and tail()
methodstestthat
package (still many more tests to add, but finally made a start on this)rma.mv()
to fit multivariate/multilevel meta-analytic models via appropriate linear (mixed-effects) models; this function allows for modeling of non-independent sampling errors and/or true effects and can be used for network meta-analyses, meta-analyses accounting for phylogenetic relatedness, and other complicated meta-analytic data structuresrma.uni()
, then tau^2 is no longer counted as an additional parameter for the computation of the information criteria (i.e., AIC, BIC, and AICc)rma.uni()
, rma.glmm()
, and rma.mv()
now use a more stringent check whether the model matrix is of full rankprofile()
method functions for objects of class rma.uni
and rma.mv
(can be used to obtain a plot of the profiled log-likelihood as a function of a specific variance component or correlation parameter of the model)predict.rma()
function now has an intercept
argument that allows the user to decide whether the intercept term should be included when calculating the predicted values (rare that this should be changed from the default)rma.uni()
, rma.glmm()
, and rma.mv()
, the control
argument can now also accept an integer value; values > 1 generate more verbose output about the progress inside of the functionrma.glmm()
has been updated to work with lme4
1.0.x for fitting various models; as a result, model="UM.RS"
can only use nAGQ=1
at the moment (hopefully this will change in the future)control
argument of rma.glmm()
can now be used to pass all desired control arguments to the various functions and optimizers used for the model fitting (admittedly the use of lists within this argument is a bit unwieldy, but much more flexible)rma.mh()
and rma.peto()
also now have a 'verbose' argument (not really needed, but added for sake of consistency across functions)metafor
and metafor_diagram
) are now just 'other files' in the doc directory (as these were not true vignettes to begin with)rma.mh()
now also implements the Mantel-Haenszel method for incidence rate differences (measure="IRD"
)measure="IRR"
) with the rma.mh()
function, the Mantel-Haenszel test for person-time data is now also providedrma.mh()
has a new argument correct
(default is TRUE
) to indicate whether the continuity correction should be applied when computing the (Cochran-)Mantel-Haenszel test statisticCMH
and CMHp
(for the Cochran-Mantel-Haenszel test statistic and corresponding p-value) to MH
and MHp
baujat()
to create Baujat plotsdat.pignon2000
) to illustrate the use of the baujat()
functionto.table()
to convert data from vector format into the corresponding table formatto.long()
to convert data from vector format into the corresponding long formatrma.glmm()
now even runs when k=1 (yielding trivial results)rma.glmm()
now internally rescales (non-dummy) variables to z-scores during the model fitting (this improves the stability of the model fitting, especially when model="CM.EL"
); results are given after back-scaling, so this should be transparent to the userrma.glmm()
, default number of quadrature points (nAGQ
) is now 7 (setting this to 100 was a bit overkill)vignette("metafor")
works nowmetafor
package (and how they relate to each other); can be loaded with vignette("metafor_diagram")
anova.rma.uni()
function can now also be used to test (sub)sets of model coefficients with a Wald-type test when a single model is passed to the functionrma.uni()
function and supplied in the output (only for mixed-effects models and when the model includes an intercept, so that the random-effects model is clearly nested within the mixed-effects model)VAF
is now called R2
in anova.rma.uni()
functionhc()
that carries out a random-effects model analysis using the method by Henmi and Copas (2010); thanks to Michael Dewey for the suggestion and providing the codedat.lee2004
), which was used in the article by Henmi and Copas (2010) to illustrate their methodforest()
functionsrma.glmm()
now computes Hessian matrices via the numDeriv
package when model="CM.EL"
and measure="OR"
(i.e., for the conditional logistic model with exact likelihood); so numDeriv
is now a suggested package and is loaded within rma.glmm()
when requiredtrimfill.rma.uni()
now also implements the "Q0" estimator (although the "L0" and "R0" estimators are generally to be preferred)trimfill.rma.uni()
now also calculates the SE of the estimated number of missing studies and, for estimator "R0", provides a formal test of the null hypothesis that the number of missing studies on a given side is zerodat.bangertdrowns2004
)level
argument in various functions now either accepts a value representing a percentage or a proportion (values greater than 1 are assumed to be a percentage)summary.escalc()
now computes confidence intervals correctly when using the transf
argumentrma.mh()
changed slightly to avoid integer overflow with very big counts"MC"
, "SMCC"
, and "SMCR"
) to the help file for the escalc()
function and changed the code so that "SMCR"
no longer expects argument sd2i
to be specified (which is not needed anyways) (thanks to Markus Kösters for bringing this to my attention)"RBIS"
) is now calculated in a slightly more accurate wayllplot()
now properly scales the log-likelihoodswhich
in the plot.infl.rma.uni()
function has been replaced with argument plotinf
which can now also be set to FALSE
to suppress plotting of the various case diagnostics altogetherlabbe()
plots is now correct for odds ratios (and transformations thereof)dat.nielweise2007
and dat.nielweise2008
) to illustrate some methods/models from the rma.glmm()
functiondat.yusuf1985
) to illustrate the use of rma.peto()
rma.peto()
function exactly as described by Yusuf et al. (1985)rma.glmm()
, default number of quadrature points (nAGQ
) is now 100 (which is quite a bit slower, but should provide more than sufficient accuracy in most cases)rma()
function; in addition, the standard error of the SJ estimator is also now provided when tau^2 is prespecifiedrma.uni()
and rma.glmm()
now use a better method to check whether the model matrix is of full rankrma.uni()
and rma.glmm()
function; confint.rma.uni()
provides the corresponding confidence intervals for rma.uni
modelsprint()
methods now have a new argument called signif.stars
, which defaults to getOption("show.signif.stars")
(which by default is TRUE
) to determine whether the infamous 'significance stars' should be printedprint.rma.uni()
and print.rma.glmm()
functionsrma.glmm()
function for fitting of appropriate generalized linear (mixed-effects) models when analyzing odds ratios, incidence rate ratios, proportions, or rates; the function makes use of the lme4
and BiasedUrn
packages; these are now suggested packages and loaded within rma.glmm()
only when required (this makes for faster loading of the metafor
package)rma.glmm
(not all methods yet implemented; to be completed in the future)rma.uni()
now allows the user to specify a formula for the yi
argument, so instead of rma(yi, vi, mods=~mod1+mod2)
, one can specify the same model with rma(yi~mod1+mod2, vi)
rma.uni()
now has a weights
argument to specify the inverse of the sampling variances (instead of using the vi
or sei
arguments); for now, this is all this argument should be used for (in the future, this argument may potentially be used to allow the user to define alternative weights)rma.uni()
now checks whether the model matrix is not of full rank and issues an error accordingly (instead of the rather cryptic error that was issued before)rma.uni()
now has a verbose
argumentcoef.rma()
now returns only the model coefficients (this change was necessary to make the package compatible with the multcomp
package; see help(rma)
for an example); use coef(summary())
to obtain the full table of resultsescalc()
function now does some more extensive error checking for misspecified data and some unusual casesappend
argument is now TRUE
by default in the escalc()
functionescalc()
function now have their own classprint()
and summary()
methods for objects of class escalc
`[`
and cbind()
methods for objects of class escalc
escalc()
function (i.e., slab
, subset
, var.names
, replace
, digits
)drop00
argument to the escalc()
, rma.uni()
, rma.mh()
, and rma.peto()
functions"MN"
, "MC"
, "SMCC"
, and "SMCR"
measures to the escalc()
and rma.uni()
functions for the raw mean, the raw mean change, and the standardized mean change (with change score or raw score standardization) as possible outcome measures"IRFT"
measure in the escalc()
and rma.uni()
functions is now computed with 1/2*(sqrt(xi/ti) + sqrt(xi/ti+1/ti))
which is more consistent with the definition of the Freeman-Tukey transformation for proportions"RTET"
measure to the escalc()
and rma.uni()
functions to compute the tetrachoric correlation coefficient based on 2x2 table data (the polycor
package is therefore now a suggested package, which is loaded within escalc()
only when required)"RPB"
and "RBIS"
measures to the escalc()
and rma.uni()
functions to compute the point-biserial and biserial correlation coefficient based on means and standard deviations"PBIT"
and "OR2D"
measures to the escalc()
and rma.uni()
functions to compute the standardized mean difference based on 2x2 table data"D2OR"
measure to the escalc()
and rma.uni()
functions to compute the log odds ratio based on the standardized mean difference"SMDH"
measure to the escalc()
and rma.uni()
functions to compute the standardized mean difference without assuming equal population variances"ARAW"
, "AHW"
, and "ABT"
measures to the escalc()
and rma.uni()
functions for the raw value of Cronbach's alpha, the transformation suggested by Hakstian & Whalen (1976), and the transformation suggested by Bonett (2002) for the meta-analysis of reliability coefficients (see help(escalc)
for details)measure="PHI"
) in the escalc()
functionpermutest.rma.uni()
function now uses an algorithm to find only the unique permutations of the model matrix (which may be much smaller than the total number of permutations), making the exact permutation test feasible in a larger set of circumstances (thanks to John Hodgson for making me aware of this issue and to Hans-Jörg Viechtbauer for coming up with a recursive algorithm for finding the unique permutations)forest.rma()
is now indicated with a dotted (instead of a dashed) line; ends of the interval are now marked with vertical barsfunnel.rma()
function which now supports many more options for the values to put on the y-axis; trimfill.rma.uni()
function was adapted accordinglyni
argument from the regtest.rma()
function; instead, sample sizes can now be explicitly specified via the ni
argument when using the rma.uni()
function (i.e., when measure="GEN"
); the escalc()
function also now adds information on the ni
values to the resulting data frame (as an attribute of the yi
variable), so, if possible, this information is passed on to regtest.rma()
regtest()
can also provide the full results from the fitted model (thanks to Michael Dewey for the suggestion)weights.rma.mh()
now shows the weights in % as intended (thanks to Gavin Stewart for pointing out this error)digits
argument in the various forest functionspretty()
by default to set the x-axis tick locations (alim
and at
arguments can still be used for complete control)influence.rma.uni()
function (see the documentation of this function for details on how such studies are identified)cooks.distance()
, dfbetas()
); unfortunately, the covratio()
and dffits()
functions in the stats
package are not generic; so, to avoid masking, there are currently no extractor functions for these measuresfsn()
that would not allow the user to specify the standard errors instead of the sampling variances (thanks to Bernd Weiss for pointing this out)plot.infl.rma.uni()
function now allows the user to specify which plots to draw (and the layout) and adds the option to show study labels on the x-axisprint()
method for objects generated by the confint.rma.uni()
, confint.rma.mh()
, and confint.rma.peto()
functionstransf
or atransf
argument was a monotonically *decreasing* function, then confidence and prediction interval bounds were in reversed order; various functions now check for this and order the bounds correctlytrimfill.rma.uni()
now only prints information about the number of imputed studies when actually printing the model objectqqnorm.rma.uni()
, qqnorm.rma.mh()
, and qqnorm.rma.peto()
functions now have a new argument called label
, which allows for labeling of points; the functions also now return (invisibly) the x and y coordinates of the points drawnrma.mh()
with measure="RD"
now computes the standard error of the estimated risk difference based on Sato, Greenland, & Robins (1989), which provides a consistent estimate under both large-stratum and sparse-data limiting models<dat.authoryear>
; therefore, the datasets are now called (old name -> new name):dat.bcg -> dat.colditz1994
dat.warfarin -> dat.hart1999
dat.los -> dat.normand1999
dat.co2 -> dat.curtis1998
dat.empint -> dat.mcdaniel1994
dat.bcg
has been kept as an alias for dat.colditz1994
, as it has been referenced under that name in some publicationsdat.pritz1997
) to illustrate the meta-analysis of proportions (raw values and transformations thereof)dat.bonett2010
) to illustrate the meta-analysis of Cronbach's alpha values (raw values and transformations thereof)dat.hackshaw1998
, dat.raudenbush1985
)nobs()
and df.residual()
methods for objects of class rma
metafor.news()
is now simply a wrapper for news(package="metafor")
metafor
package no longer depends on the nlme
packagetrimfill.rma()
now returns a proper object even when the number of missing studies is estimated to be zeroescalc()
and rma.uni()
functionsdat.co2
) to illustrate the use of the ratio of means outcome measureilab
>labbe.rma()
, the solid and dashed lines are now drawn behind (and not on top of) the pointstransf.ipft.hm()
so that missing values in targs$ni
are ignoredmetafor
package now has its own project website at: https://www.metafor-project.orglabbe()
function to create L’Abbe plotsforest.default()
and addpoly.default()
functions now allow the user to directly specify the lower and upper confidence interval bounds (this can be useful when the CI bounds have been calculated with other methods/functions)escalc()
and rma.uni()
functionsrma.mh()
functionpermutest.rma.uni()
functionconfint()
methods for rma.mh
and rma.peto
objects (only for completeness sake; print
already provides CIs)dat.warfarin
, dat.los
, dat.empint
)citation("metafor")
metafor
package now depends on nlme
packagemetafor
package now depends on Formula
packageescalc()
generic and implemented a default and a formula interfacepermutest.rma.uni()
function now provides more sensible results when k is very small; the documentation for the function has also been updated with some notes about the use of permutations tests under those circumstancesrows
argument and removed the addrows
argumentforest
and addpoly
functions to demonstrate how to create more complex displays with these functionsshowweight
argument to the forest.default()
and forest.rma()
functionscumul()
functions not showing all of the output columns when using fixed-effects models has been correctedweights.rma.uni()
function now handles NA
s appropriatelyweights.rma.mh()
and weights.rma.peto()
functions addedlogLik.rma()
function now behaves more like other logLik()
functions (such as logLik.lm()
and logLik.lme()
)cint()
generic removed and replaced with confint()
method for rma.uni
objectsforest()
and funnel()
functionscoef()
method for objects of class permutest.rma.uni
append
argument to escalc()
functionpermutest.rma.uni()
function will now switch to an exact test if the number of iterations required for an exact test is actually smaller than the requested number of iterations for an approximate test)permutest.rma.uni()
to 'two times the one-tailed area under the permutation distribution' (more consistent with the way we typically define two-tailed p-values)retpermdist
argument to permutest.rma.uni()
to return the permutation distributions of the test statisticsmods
argument in the rma()
function (e.g., like in the lm()
function)permutest()
function now allows exact permutation tests (but this is only feasible when k is not too large)forest()
function now uses the level argument properly to adjust the CI level of the summary estimate for models without moderators (i.e., fixed- and random-effets models)forest()
function can now also show the prediction interval as a dashed line for a random-effects modelforest()
and funnel()
functions, which try to set an appropriate x-axis title accordinglyfunnel()
function now has more arguments (e.g., atransf
, at
) providing more control over the display of the x-axispredict()
function now has its own print method and has a new argument (addx
), which adds the values of the moderator variables to the returned object (when addx=TRUE
)"na.pass"
(treated essentially like "na.exclude"
)weights()
function to extract the weights used when fitting models with rma.uni()
permutest()
function for permutation testsmetafor.news()
function to display the NEWS
file of the metafor
package within R (based on the same idea in the animate
package by Yihui Xie)influence()
function, so that these statistics are more in line with their definitions in regular linear regression modelsinfluence()
to allow plotting the covariance ratios on a log scale (now the default)print()
functions (to catch some errors when certain values were NA
)rma()
to adjust the step length of the Fisher scoring algorithm by a constant factor (this may be useful when the algorithm does not converge)measure="PHI"
), Yule's Q ("YUQ"
), and Yule's Y ("YUY"
) as additional measures to the escalc()
function for 2x2 table dataorder
or subset
argument)cumul()
function for cumulative meta-analyses (with a corresponding forest()
method to plot the cumulative results)leave1out()
function for leave-one-out diagnosticsqqnorm.rma.uni()
so that the user can choose whether to apply the Bonferroni correction to the bounds of the pseudo confidence envelopetrimfill()
functionregtest()
function for various regression tests of funnel plot asymmetry (e.g., Egger's regression test)ranktest()
generic and added a method for objects of class rma
so that the test can be carried out after fittinganova()
function for full vs reduced model comparisons via fit statistics and likelihood ratio testsfsn()
escalc()
, measure="COR"
is now used for the (usual) raw correlation coefficient and measure="UCOR"
for the bias corrected correlation coefficientsmeasure="PLN"
) as another measure to the escalc()
function; changed "PL"
to "PLO"
for the logit (i.e., log odds) transformation for proportionsplot.infl.rma.uni()
to open a new device for plotting the DFBETAS valuesforest()
function when the number of studies is large