-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Hi,
I have a question about the behavior of subgroup analysis when tau.common = TRUE. When this option is used, the confidence interval for this common τ estimate does not appear to be calculated or stored in the resulting object.
I've reviewed the package documentation but couldn't find a specific explanation for why the CI is not calculated in this case. Am I missing something in my understanding, or is this the intended behavior?
library(meta)
#> Loading required package: metadat
#> Loading 'meta' package (version 8.2-1).
#> Type 'help(meta)' for a brief overview.
set.seed(123)
data <- data.frame(
studlab = paste("Study", 1:10),
event.e = rpois(10, 25),
n.e = rpois(10, 100),
event.c = rpois(10, 30),
n.c = rpois(10, 100),
subgroup = rep(c("Drug A", "Drug B"), each = 5)
)
# Using tau.common = FALSE
meta <- metabin(
event.e = event.e,
n.e = n.e,
event.c = event.c,
n.c = n.c,
studlab = studlab,
data = data,
subgroup = subgroup,
tau.common = FALSE
)
meta[["upper.tau.w"]]
#> Drug A Drug B
#> 0.5903846 0.9797538
# Using tau.common = TRUE
meta = update(meta, tau.common = TRUE)
meta[["upper.tau.w"]]
#> Drug A Drug B
#> NA NA
meta[["upper.tau.resid"]]
#> [1] NACreated on 2025-09-17 with reprex v2.1.1
Edit:
Some other situations, confidence intervals are not calculated:
1- Confidence interval for I2 and tau2 measures when k = 2
2- Confidence interval for I2 when using method.I2 = "tau2"
3- Prediction interval when using method.predict = "HK" and k = 2
for those three additional situations, I think they are normally calculated in metafor package
I think providing documentation for this behavior would be beneficial
and thanks again for this great package