[R-meta] Model with intercept gives 0 heterogeneity but without intercept is ok
Luke Martinez
m@rt|nez|ukerm @end|ng |rom gm@||@com
Mon Aug 30 18:02:05 CEST 2021
Dear Colleagues.
I fitted two exact same models except that for one I included the intercept
(Model 1) in the model, for the other, I didn't (Model 2).
I wonder why for Model 1 the estimate of between-study heterogeneity is "0"
but for Model 2 that estimate is not "0"?
Thank you very much,
Luke
set.seed(132)
data <- expand.grid(study = 1:60, outcome = rep(1:2,2))
data$X <- rnorm(nrow(data))
e <- rnorm(nrow(data))
data$yi <- .8+.6*data$X + e
data$vi <- runif(nrow(data))
Model1 <- rma.mv(yi ~ 1 + X, vi, random = ~ 1 | study/outcome, data = dat)
estim sqrt nlvls fixed factor
sigma^2.1 0.0000 0.0001 60 no study
sigma^2.2 0.4707 0.6861 120 no study/outcome
Model2 <- rma.mv(yi ~ 0 + X, vi, random = ~ 1 | study/outcome, data = dat)
estim sqrt nlvls fixed factor
sigma^2.1 0.5634 0.7506 60 no study
sigma^2.2 0.4878 0.6984 120 no study/outcome
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list