Closed zacrobinson5 closed 1 year ago
Dear Zac,
The GitHub issues page is for discussing the development of the package (including potential bug reports), not for getting help with using the package. General questions about the use of the metafor package should not be asked here. For this, we have the r-sig-meta-analysis
mailing list (https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis) or places like Stack Overflow. I will respond there.
Best, Wolfgang
I am attempting to calculate pseudo R squared's for a multilevel mixed-effect meta-regression that includes random slopes (i.e.,
rma.mv()
object) using a similar approach to the following citation:https://besjournals.onlinelibrary.wiley.com/doi/10.1111/2041-210X.12225
Digging into the code of this citation that uses the
lme4
/nlme
packages to demonstrate how to perform the calculations, it seems like ametafor
equivalent of aVarCorr()
output of alme4
/nlme
fit model is needed.I am struggling to figure out how to obtain this summary of the variances (or SD) at each level of the random effects for a
rma.mv()
object. Any insight here is appreciated!This is the code from the citation used to calculate the pseudo R squared's:
All of these steps can be easily reproduced for the
rma.mv()
object besides the step withVarCorr()
as this function doesn't acceptrma.mv()
objects:Here is a simple model that illustrates the point and highlights two of the components of the
rma.mv()
model that I think might have the necessary information but I'm not exactly sure how to get it into the finalVarCorr()
format.I also posted about this issue on SO here.