robust | R Documentation |
Function to obtain cluster-robust tests and confidence intervals (also known as robust variance estimation) of the model coefficients for objects of class "rma"
. \loadmathjax
robust(x, cluster, ...)
## S3 method for class 'rma.uni'
robust(x, cluster, adjust=TRUE, clubSandwich=FALSE, digits, ...)
## S3 method for class 'rma.mv'
robust(x, cluster, adjust=TRUE, clubSandwich=FALSE, digits, ...)
x |
an object of class |
cluster |
vector to specify the clustering variable to use for constructing the sandwich estimator of the variance-covariance matrix. |
adjust |
logical to specify whether a small-sample correction should be applied to the variance-covariance matrix. |
clubSandwich |
logical to specify whether the clubSandwich package should be used to obtain the cluster-robust tests and confidence intervals. |
digits |
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. |
... |
other arguments. |
The function constructs a cluster-robust estimate of the variance-covariance matrix of the model coefficients based on a sandwich-type estimator and then computes tests and confidence intervals of the model coefficients. This function will often be part of a general workflow for meta-analyses involving complex dependency structures as described here.
By default, tests of individual coefficients and confidence intervals are based on a t-distribution with \mjseqnn-p degrees of freedom, while the omnibus test uses an F-distribution with \mjseqnm and \mjseqnn-p degrees of freedom, where \mjseqnn is the number of clusters, \mjseqnp denotes the total number of model coefficients (including the intercept if it is present), and \mjseqnm denotes the number of coefficients tested by the omnibus test. This is sometimes called the ‘residual’ method for approximating the (denominator) degrees of freedom.
When adjust=TRUE
(the default), the cluster-robust estimate of the variance-covariance matrix is multiplied by the factor \mjseqnn/(n-p), which serves as a small-sample adjustment that tends to improve the performance of the method when the number of clusters is small. This is sometimes called the ‘CR1’ adjustment/estimator (in contrast to ‘CR0’ when adjust=FALSE
).
For an even better small-sample adjustment, one can set clubSandwich=TRUE
in which case the clubSandwich package is used to obtain the cluster-robust tests and confidence intervals. The variance-covariance matrix of the model coefficients is then estimated using the ‘bias-reduced linearization’ adjustment proposed by Bell and McCaffrey (2002) and further developed in Tipton (2015) and Pustejovsky and Tipton (2018). This is sometimes called the ‘CR2’ adjustment/estimator. The degrees of freedom of the t-tests are then estimated using a Satterthwaite approximation. F-tests are then based on an approximate Hotelling's T-squared reference distribution, with denominator degrees of freedom estimated using a method by Zhang (2012, 2013), as further described in Tipton and Pustejovky (2015).
An object of class "robust.rma"
. The object is a list containing the following components:
beta |
estimated coefficients of the model. |
se |
robust standard errors of the coefficients. |
zval |
test statistics of the coefficients. |
pval |
corresponding p-values. |
ci.lb |
lower bound of the confidence intervals for the coefficients. |
ci.ub |
upper bound of the confidence intervals for the coefficients. |
vb |
robust variance-covariance matrix of the estimated coefficients. |
QM |
test statistic of the omnibus test of moderators. |
QMp |
corresponding p-value. |
... |
some additional elements/values. |
The results are formatted and printed with the print.rma.uni
and print.rma.mv
functions (depending on the type of model).
Predicted/fitted values based on "robust.rma"
objects can be obtained with the predict
function. Tests for sets of model coefficients or linear combinations thereof can be obtained with the anova
function.
The variable specified via cluster
is assumed to be of the same length as the data originally passed to the rma.uni
or rma.mv
functions (and if the data
argument was used in the original model fit, then the variable will be searched for within this data frame first). Any subsetting and removal of studies with missing values that was applied during the model fitting is also automatically applied to the variable specified via the cluster
argument.
The idea of the robust (sandwich-type) estimator for models with unspecified heteroscedasticity can be traced back to Eicker (1967), Huber (1967), and White (1980, 1984). Hence, the method in general is often referred to as the Eicker-Huber-White method. Some small-sample improvements to the method are described by MacKinnon and White (1985). The extension to the cluster-robust estimator can be found in Froot (1989) and Williams (2000), which is also related to the GEE approach by Liang and Zeger (1986). Cameron and Miller (2015) provide an extensive overview of cluster-robust methods. Sidik and Jonkman (2005, 2006) introduced robust methods in the meta-analytic context for standard random/mixed-effects models. The use of cluster-robust methods for multivariate/multilevel meta-analytic models was introduced by Hedges, Tipton, and Johnson (2010).
Wolfgang Viechtbauer (wvb@metafor-project.org, https://www.metafor-project.org).
Bell, R. M., & McCaffry, D. F. (2002). Bias reduction in standard errors for linear regression with multi-stage samples. Survey Methodology, 28(2), 169–181. https://www150.statcan.gc.ca/n1/en/catalogue/12-001-X20020029058
Cameron, A. C., & Miller, D. L. (2015). A practitioner's guide to cluster-robust inference. Journal of Human Resources, 50(2), 317–372. https://doi.org/10.3368/jhr.50.2.317
Eicker, F. (1967). Limit theorems for regressions with unequal and dependent errors. In L. M. LeCam & J. Neyman (Eds.), Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability (pp. 59–82). Berkeley: University of California Press.
Froot, K. A. (1989). Consistent covariance matrix estimation with cross-sectional dependence and heteroskedasticity in financial data. Journal of Financial and Quantitative Analysis, 24(3), 333–355. https://doi.org/10.2307/2330815
Hedges, L. V., Tipton, E., & Johnson, M. C. (2010). Robust variance estimation in meta-regression with dependent effect size estimates. Research Synthesis Methods, 1(1), 39–65. https://doi.org/10.1002/jrsm.5
Huber, P. (1967). The behavior of maximum-likelihood estimates under nonstandard conditions. In L. M. LeCam & J. Neyman (Eds.), Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability (pp. 221–233). University of California Press.
Liang, K. Y., & Zeger, S. L. (1986). Longitudinal data analysis using generalized linear models. Biometrika, 73(1), 13–22. https://doi.org/10.1093/biomet/73.1.13
MacKinnon, J. G., & White, H. (1985). Some heteroskedasticity-consistent covariance matrix estimators with improved finite sample properties. Journal of Econometrics, 29(3), 305–325. https://doi.org/10.1016/0304-4076(85)90158-7
Tipton, E. (2015). Small sample adjustments for robust variance estimation with meta-regression. Psychological Methods, 20(3), 375–393. https://doi.org/10.1037/met0000011
Tipton, E., & Pustejovsky, J. E. (2015). Small-sample adjustments for tests of moderators and model fit using robust variance estimation in meta-regression. Journal of Educational and Behavioral Statistics, 40(6), 604–634. https://doi.org/10.3102/1076998615606099
Sidik, K., & Jonkman, J. N. (2005). A note on variance estimation in random effects meta-regression. Journal of Biopharmaceutical Statistics, 15(5), 823–838. https://doi.org/10.1081/BIP-200067915
Sidik, K., & Jonkman, J. N. (2006). Robust variance estimation for random effects meta-analysis. Computational Statistics & Data Analysis, 50(12), 3681–3701. https://doi.org/10.1016/j.csda.2005.07.019
White, H. (1980). A heteroskedasticity-consistent covariance matrix estimator and a direct test for heteroskedasticity. Econometrica, 48(4), 817–838. https://doi.org/10.2307/1912934
White, H. (1984). Asymptotic theory for econometricians. Orlando, FL: Academic Press.
Williams, R. L. (2000). A note on robust variance estimation for cluster-correlated data. Biometrics, 56(2), 645–646. https://doi.org/10.1111/j.0006-341x.2000.00645.x
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
Zhang, J.-T. (2012). An approximate Hotelling T2-test for heteroscedastic one-way MANOVA. Open Journal of Statistics, 2(1), 1–11. https://doi.org/10.4236/ojs.2012.21001
Zhang, J.-T. (2013). Tests of linear hypotheses in the ANOVA under heteroscedasticity. International Journal of Advanced Statistics and Probability, 1, 9–24. https://doi.org/10.14419/ijasp.v1i2.908
rma.uni
and rma.mv
for functions to fit models for which cluster-robust tests and confidence intervals can be obtained.
############################################################################
### copy data from Bangert-Drowns et al. (2004) into 'dat'
dat <- dat.bangertdrowns2004
### fit random-effects model
res <- rma(yi, vi, data=dat)
res
### use cluster-robust inference methods
robust(res, cluster=id)
### use methods from the clubSandwich package
robust(res, cluster=id, clubSandwich=TRUE)
### fit meta-regression model
res <- rma(yi, vi, mods = ~ length, data=dat)
res
### use cluster-robust inference methods
robust(res, cluster=id)
### use methods from the clubSandwich package
robust(res, cluster=id, clubSandwich=TRUE)
############################################################################
### copy data from Konstantopoulos (2011) into 'dat'
dat <- dat.konstantopoulos2011
### fit multilevel random-effects model
res <- rma.mv(yi, vi, random = ~ 1 | district/school, data=dat)
res
### use cluster-robust inference methods
robust(res, cluster=district)
### use methods from the clubSandwich package
robust(res, cluster=district, clubSandwich=TRUE)
############################################################################
### copy data from Berkey et al. (1998) into 'dat'
dat <- dat.berkey1998
### variables v1i and v2i correspond to the 2x2 var-cov matrices of the studies;
### so use these variables to construct the V matrix (note: since v1i and v2i are
### var-cov matrices and not correlation matrices, set vi=1 for all rows)
V <- vcalc(vi=1, cluster=author, rvars=c(v1i, v2i), data=dat)
### fit multivariate model
res <- rma.mv(yi, V, mods = ~ 0 + outcome, random = ~ outcome | trial, struct="UN", data=dat)
res
### use cluster-robust inference methods
robust(res, cluster=trial)
### use methods from the clubSandwich package
robust(res, cluster=trial, clubSandwich=TRUE)
############################################################################
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.