The functions can be used to compute various outlier and influential case diagnostics (some of which indicate the influence of deleting one case at a time on the model fit or the fitted/residual values) for objects of class "rma.uni"
. For the corresponding documentation for "rma.mv"
objects, see influence.rma.mv
.
# S3 method for rma.uni
influence(model, digits, progbar=FALSE, ...)# S3 method for infl.rma.uni
print(x, digits=x$digits, infonly=FALSE, ...)
# S3 method for rma.uni
cooks.distance(model, progbar=FALSE, ...)
# S3 method for rma.uni
dfbetas(model, progbar=FALSE, ...)
# S3 method for rma.uni
hatvalues(model, type="diagonal", ...)
An object of class "infl.rma.uni"
, which is a list containing the following components:
an element of class "list.rma"
with the externally standardized residuals, DFFITS values, Cook's distances, covariance ratios, leave-one-out ^2 estimates, leave-one-out (residual) heterogeneity test statistics, hat values, weights, and an indicator whether a case is influential.
an element of class "list.rma"
with the DFBETAS values.
some additional elements/values.
The results are printed with print.infl.rma.uni
and plotted with plot.infl.rma.uni
. To format the results as a data frame, one can use the as.data.frame
function.
an object of class "rma.uni"
.
an object of class "infl.rma.uni"
(for print
).
optional integer to specify the number of decimal places to which the printed results should be rounded. If unspecified, the default is to take the value from the object.
logical to specify whether a progress bar should be shown (the default is FALSE
).
logical to specify whether only the influential cases should be printed (the default is FALSE
).
character string to specify whether only the diagonal of the hat matrix ("diagonal"
) or the entire hat matrix ("matrix"
) should be returned.
other arguments.
Wolfgang Viechtbauer wvb@metafor-project.org https://www.metafor-project.org
The term ‘case’ below refers to a particular row from the dataset used in the model fitting (which is typically synonymous with study).
The influence
function calculates the following leave-one-out diagnostics for each case:
externally standardized residual,
DFFITS value,
Cook's distance,
covariance ratio,
the leave-one-out amount of (residual) heterogeneity,
the leave-one-out test statistic of the test for (residual) heterogeneity,
DFBETAS value(s).
The diagonal elements of the hat matrix and the weights (in %) given to the observed effect sizes or outcomes during the model fitting are also provided (except for their scaling, the hat values and weights are the same for models without moderators, but will differ when moderators are included).
For details on externally standardized residuals, see rstudent.rma.uni
.
The DFFITS value essentially indicates how many standard deviations the predicted (average) effect or outcome for the ithith case changes after excluding the ithith case from the model fitting.
Cook's distance can be interpreted as the Mahalanobis distance between the entire set of predicted values once with the ithith case included and once with the ithith case excluded from the model fitting.
The covariance ratio is defined as the determinant of the variance-covariance matrix of the parameter estimates based on the dataset with the ithith case removed divided by the determinant of the variance-covariance matrix of the parameter estimates based on the complete dataset. A value below 1 therefore indicates that removal of the ithith case yields more precise estimates of the model coefficients.
The leave-one-out amount of (residual) heterogeneity is the estimated value of ^2 based on the dataset with the ithith case removed. This is always equal to 0 for equal-effects models.
Similarly, the leave-one-out test statistic of the test for (residual) heterogeneity is the value of the test statistic of the test for (residual) heterogeneity calculated based on the dataset with the ithith case removed.
Finally, the DFBETAS value(s) essentially indicate(s) how many standard deviations the estimated coefficient(s) change(s) after excluding the ithith case from the model fitting.
A case may be considered to be ‘influential’ if at least one of the following is true:
The absolute DFFITS value is larger than 3 p/(k-p)3*(p/(k-p)), where p is the number of model coefficients and k the number of cases.
The lower tail area of a chi-square distribution with p degrees of freedom cut off by the Cook's distance is larger than 50%.
The hat value is larger than 3 (p/k)3*(p/k).
Any DFBETAS value is larger than 1.
Cases which are considered influential with respect to any of these measures are marked with an asterisk. Note that the chosen cut-offs are (somewhat) arbitrary. Substantively informed judgment should always be used when examining the influence of each case on the results.
Belsley, D. A., Kuh, E., & Welsch, R. E. (1980). Regression diagnostics. New York: Wiley.
Cook, R. D., & Weisberg, S. (1982). Residuals and influence in regression. London: Chapman and Hall.
Hedges, L. V., & Olkin, I. (1985). Statistical methods for meta-analysis. San Diego, CA: Academic Press.
Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. https://doi.org/10.18637/jss.v036.i03
Viechtbauer, W. (2021). Model checking in meta-analysis. In C. H. Schmid, T. Stijnen, & I. R. White (Eds.), Handbook of meta-analysis (pp. 219--254). Boca Raton, FL: CRC Press. https://doi.org/10.1201/9781315119403
Viechtbauer, W., & Cheung, M. W.-L. (2010). Outlier and influence diagnostics for meta-analysis. Research Synthesis Methods, 1(2), 112--125. https://doi.org/10.1002/jrsm.11
plot.infl.rma.uni
for a method to plot the outlier and influential case diagnostics.
rstudent.rma.uni
for externally standardized residuals and weights.rma.uni
for model fitting weights.
### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
### fit mixed-effects model with absolute latitude and publication year as moderators
res <- rma(yi, vi, mods = ~ ablat + year, data=dat)
### compute the diagnostics
inf <- influence(res)
inf
### plot the values
plot(inf)
### compute Cook's distances, DFBETAS values, and hat values
cooks.distance(res)
dfbetas(res)
hatvalues(res)
Run the code above in your browser using DataLab