Skip to content
Prev 4494 / 5636 Next

[R-meta] Meta - Bug with REML or small N?

So the REML estimate is correct:

dat <- structure(list(study = c("AA", "BB", "CC",
"EE", "DDD"), en = c(9, 41, 29, 8, 13
), em = c(32, 27.5, 28.7, 22.8, 30.5), esd = c(1.9, 3.8, 5.2,
3.8, 4.9), cn = c(8, 26, 28, 10, 14), cm = c(30.1, 24.9, 26.9,
24.7, 30.2), csd = c(2.4, 3.6, 3, 4.3, 5.1)), row.names = c(NA,
-5L), class = c("tbl_df", "tbl", "data.frame"))

dat <- escalc(measure="MD", m1i=em, sd1i=esd, n1i=en, m2i=cm, sd2i=csd, n2i=cn, data=dat)

res <- rma(dat)
res
profile(res, steps=100)

Rather different tau^2 estimates depending on the estimator:

methods <- c("ML","REML","EB","PM","HS","HSk","HE","DL","SJ")
data.frame(tau2=sapply(methods, \(x) round(rma(dat, method=x)$tau2, 4)))

Sometimes life is difficult.

Best,
Wolfgang