Skip to content
Prev 1502 / 5636 Next

[R-meta] variance explained by fixed & random effects

In principle, yes.

But, I highly question the sensibility of any model that does not include estimate-level random effects. In the model you posted, random effects are added for each level of ablat, but this assumes that true effects are homogeneous for the same level of ablat. That is a big assumption and one that I don't think is (a priori) justified. 

I frequently see the same issue when people are fitting multilevel models. Instead of *adding* random effects for some higher level clustering variable to a model that already includes estimate level random effects, only cluster level random effects are included in the model. For a discussion of this, see:

http://www.metafor-project.org/doku.php/analyses:konstantopoulos2011#a_common_mistake_in_the_three-level_model

In your example, I therefore would say that one should fit:

res2 <- rma.mv(yi, vi, mods = ~ alloc, random = ~1|ablat/trial, data=dat)

In this case, the random effects for ablat (which has 9 levels) are difficult to distinguish from the trial (i.e., estimate) level random effects (13 different levels). In fact, it turns out in this case that the trial level variance component is estimated to be 0, so in the end, the fit of the model is the same. But in general, I think one should at least start with a model that includes estimate level random effects.

Best,
Wolfgang

-----Original Message-----
From: Theresa Stratmann [mailto:theresa.stratmann at senckenberg.de] 
Sent: Tuesday, 02 April, 2019 9:38
To: Viechtbauer, Wolfgang (SP); r-sig-meta-analysis at r-project.org
Subject: RE: [R-meta] variance explained by fixed & random effects

Actually, sorry, one more question ... 

Let's say we were to use: 

library(metafor)

dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

res2 <- rma.mv(yi, vi, mods = ~ alloc, random = ~1|ablat, data=dat)

Do we then use sigma2 instead of tau2? 

Theresa