[R-sig-ME] Why lme4 doesn't throw an error for illegitimate an model

Simon Harmel @|m@h@rme| @end|ng |rom gm@||@com
Wed Oct 7 21:24:58 CEST 2020


Dear All,

As far as I understand, in a 2-level model, the use of a level-2 predictor
(here "sector") is illegitimate.

But I wonder why in the following model `lmer` doesn't throw an error to
indicate that?

library(lme4)
hsb <- read.csv('
https://raw.githubusercontent.com/rnorouzian/e/master/hsb.csv')

mn <- lmer(math ~ ses + (sector | sch.id), data = hsb)

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list