Skip to content
Prev 2392 / 5636 Next

[R-meta] query re: multi-level analysis in metafor with missing standard errors - p.s.

Dear Jenny,

To clarify one potential misconception: The type of meta-analytic model has no bearing on the way the standard error for an effect size measure should be computed. So it is not relevant whether you will conduct a multilevel meta-analysis or not.

Proper methods for computing the standard error of a standardized regression coefficient are discussed in these articles:

Yuan, K.-H., & Chan, W. (2011). Biases and standard errors of standardized regression coefficients. Psychometrika, 76(4), 670-690.

Jones, J. A., & Waller, N. G. (2013). Computing confidence intervals for standardized regression coefficients. Psychological Methods, 18(4), 435-453.

Jones, J. A., & Waller, N. G. (2015). The normal-theory and asymptotic distribution-free (adf) covariance matrix of standardized regression coefficients: Theoretical extensions and finite sample behavior. Psychometrika, 80(2), 365-378.

The results from Yuan and Chan (2011) are interesting, but not really usable in practice because you would essentially need access to the raw data to use their equations. Jones and Waller (2015) show how to do the same thing, but using only correlations. You can do the same thing with some functions that were recently added to metafor.

For the following to work, you need to install the 'devel' version of metafor as described here: https://github.com/wviechtb/metafor#installation

###################

library(metafor)

# unstandardized regression coefficients
res <- lm(mpg ~ cyl + disp + hp, data=mtcars)
summary(res)

# standardized regression coefficients
res <- lm(scale(mpg) ~ 0 + scale(cyl) + scale(disp) + scale(hp), data=mtcars)
summary(res)

# NOTE: The SEs given above are only appropriate if we assume that the null hypothesis is true and therefore cannot be used for a meta-analysis (even if they were reported)

# correlation matrix
R <- with(mtcars, cor(cbind(mpg, cyl, disp, hp)))
R

# show that we can get the same results as above just based on R (and n)
matreg(1, 2:4, R=R, n=nrow(mtcars))

# the SEs are still the same as before and again should not be used for a meta-analysis

# to compute SEs of the standardized regression coefficients that are appropriate to use for a meta-analysis, we first need to compute the (asymptotic) var-cov matrix of the correlation coefficients
sav <- rcalc(R, ni=nrow(mtcars))

# then we can use this to get SEs of the standardized regression coefficients
matreg(1, 2:4, R=R, V=sav$V)

###################

I think the 'fungible' package also has a function for this and may also provide the asymptotically distribution free method as described by Jones and Waller (2015). In any case, even with this approach, you need the full correlation matrix (of all predictors and the outcome). Maybe this is available from the articles (or the authors).

Best,
Wolfgang