Skip to content
Prev 5075 / 5636 Next

[R-meta] robust error is smaller than model-based error

Hi James,

Thanks for your reply.

On point 1, what I mean is that if we use the model-based SE to test null-hypothesis of the average effect, we get a null-effect (p > 0.05). But, if we use robust error (which is returned by robust()?), we get a non-zero effect. The result itself is a bit weird.

Regarding your comment on `robust()`, let me use the reproducible example to explain what I mean (`metafor` is amazing - you can find all sorts of data structure you have interest).

# load package and data
library(metafor)
library(clubSandwich)
dat <- dat.lim2014$o_o_unadj

# calculate zr and sampling variances
dat <- escalc(measure="ZCOR", ri=ri, ni=ni, data=dat)

# create effect size id variable
dat$esid <- 1:nrow(dat)

# fit a multilevel model with a non-nested random-effects structure
res <- rma.mv(yi, vi,  random = list(~ 1 | article, ~ 1 | esid, ~ 1 | species), data=dat)

But, we still can use `robust()` to calculate the cluster-robust error with CR1 adjustment as:
# robust error with CR1 adjustment
robust(res, cluster = article, adjust = T)

As expected, the clubsandwich? cannot be used to calculate robust error for such a model
coef_test(res, vcov = "CR1", cluster = dat$article)

Also, if we use CR2 adjustment, `robust()` is also not working
# robust error with CR2 adjustment
robust(res, cluster = article, clubSandwich = T)

 I might misunderstand something or made mistakes. But I would be grateful if you would you like to explain a bit.

Best,
Yefeng
Message-ID: <MEAPR01MB5415ED386162624FBC46F4059D4C2@MEAPR01MB5415.ausprd01.prod.outlook.com>
In-Reply-To: <CAFUVuJxM1Ty3+HgkB+Ye0n5rodVYCbErstYx2Y3bCH3bSfUcpA@mail.gmail.com>