I am trying to extract the Level 3 random effects of a 3-level hierarchical regression i run with lmer. The problem is, my dataset is imputed (Plausible Values) and I am trying to extract ONLY the L3 random effects to pool with MItools. I can extract them on a regular lmer model with only one PV
m0 <- lmer(PV4MATH ~ 1 + (1 | SCHOOLID) + (1 | CNT), data = pisa, REML = F)
ranef(m0)$CNT
But I fail when trying to extract exactly those from a model I fit with mitools on all PVs and then try to pool them with MIcombine
model0<-with(mis, lmer(MATH ~ 1 + (1 | SCHOOLID) + (1 | CNT), REML = F))
I would like to only extract the L 2 random effects ( = the means for all countries while controlling for individual level variables, I know that this is an empty model). This is how I can extract all of the ranefs, but then I have a problem with MIcombine.
betas<-MIextract(model0, , fun = ranef)
I tried a kinds of combinations of $CNT, but it does not work. Does anyone have an idea? I get an error telling me its a non-numeric operation for a binary operator (not sure if this is the correct translation). I have no problems with the fixed effects.