I've come across a strange result using a Hartung-Knapp correction (in the metafor::rma() function), when I have a small number of studies, and very similar effect sizes.
What I typically expect is that the Hartung-Knapp correction (appropriately) increases the width of the confidence intervals. I have found an example where the correction dramatically decreases the CIs, by a factor of around 6.
Here's the result without HKNA:
estimate se zval pval ci.lb ci.ub
0.9078 0.8401 1.0806 0.2799 -0.7388 2.5544
And with HKNA:
estimate se tval pval ci.lb ci.ub
0.9078 0.1431 6.3435 0.0240 0.2921 1.5235 *
I've always (at least, since Hartung-Knapp CIs in meta-analysis with two trials) argued for HKNA, but I don't understand this.
library(dplyr)
library(metafor)
d1 <- data.frame(tpos = 1, ttot = 11000,
cpos = 0, ctot = 11000)
d2 <- data.frame(tpos = 2, ttot = 6000,
cpos = 1, ctot = 6000)
d3 <- data.frame(tpos = 1, ttot = 20000,
cpos = 0, ctot = 20000)
d <- dplyr::bind_rows(list(d1, d2, d3))
d <- d %>%
dplyr::mutate(tneg = ttot - tpos,
cneg = ctot - cpos)
d_es <- metafor::escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=d)
res_hk <- metafor::rma(yi = yi, vi = vi, data = d_es, test = "knha")
res_no_hk <- metafor::rma(yi = yi, vi = vi, data = d_es)
res_hk
res_no_hk
```