Gelman & Hill (pp. 252-259) discuss "no-pooling" (single-level), and "partial-pooling regression" (multi-level) with no predictor ($section~ 12.2$).
In almost all mixed-effects models (i.e, partial-pooling) texts (e.g., pp. 4-6 this book), one of the advantages of such methods is said to be their larger $SE$ (standard error) for regression coefficient estimates compared to those from their NON-multi-level peers.
Question: Below, I'm comparing
partial_
andno_pooling
models. However, I see that thepartial_pooling
model has a far smaller $SE$. I wonder why I'm seeing the opposite?
set.seed(0) # Make the following reproducible
groups <- gl(20, 10) # 20 grouping indicators each of length 10 (20 classes each with 10 students)
design <- model.matrix(~groups-1) # Design matrix
U0j <- rnorm(20, 0, 20) # Random intercept deviations each for a classroom
eij <- rnorm(length(groups), 0, 30) # Common error term for observations
y <- 1629 + design%*%U0j + eij # Response variable
#=====Analysis:
no_pooling <- lm(y~groups-1)
(SE_no_pooling <- sqrt(diag(vcov(no_pooling))))
#> 8.864905 # for all groups
partial_pooling <- lmer(y~ 1 + (1|groups))
(SE_partial_pooling <- sqrt(diag(vcov(partial_pooling))))
#> 0.2443936 # for intercept