Skip to content
Prev 3281 / 5632 Next

[R-meta] Clarification on ranef.rma.mv()

Hi Wolfgang,

A quick follow-up on estimating the proportion of between variance in
metafor as in lme4:::rePCA.merMod(). We discussed using it in
correlated random-effects, but can we use that for non-correlated
(varying intercept) models as well?

Assuming yes, it may be that I've a bug in the code below, but even
though the "sigma2" for "paper/study" is 0.000 and sigma2 for
"paper/study/obs" is 0.0037, at the end the POV_S for "paper/study" is
larger than that for "paper/study/obs", not sure why?

dat <- dat.bornmann2007
dat <- escalc(measure="OR", ai=waward, n1i=wtotal, ci=maward,
n2i=mtotal, data=dat)
dat$paper <- as.numeric(factor(dat$study))
dat$paper[dat$paper <= 2] <- 1
fit <- rma.mv(yi, vi, random = ~ 1 | paper/study/obs, data=dat)

# Apply the pca approach:

    round(S <- fit$sigma2, 4)
   #[1]  0.0157  0.0000  0.0037
    S <- diag(S)
    colnames(S) <- rownames(S) <- fit$s.names
    sds <- setNames(svd(chol(S))$d, colnames(S))
    (pov_S <- round(sds^2 / sum(sds^2), digits = 4))

paper     paper/study    paper/study/obs  ## Does these results make sense?
0.8077          0.1923          0.0000
On Wed, Sep 15, 2021 at 5:04 PM Luke Martinez <martinezlukerm at gmail.com> wrote: