[R-sig-ME] Fwd: help with a cross-classified random effects model code in R.

Daniel Ezra Johnson danielezrajohnson at gmail.com
Wed Sep 3 14:52:10 CEST 2008

Am I right that if the primary schools were nested within the
secondary schools, the model would still be fit with the exact same


On Wed, Sep 3, 2008 at 1:44 PM, Douglas Bates <bates at stat.wisc.edu> wrote:
> On Wed, Sep 3, 2008 at 7:14 AM, Stijn Ruiter <s.ruiter at maw.ru.nl> wrote:
>> Dear Dr. Bates,
>> You replied to a question by Violet(Shu) Xu on how to estimate
>> cross-classified (XC) models. In the DIGEST version however, no example
>> code is provided.
>> In general, how do we estimate XC models using lme4?
>> Is the following example for a null model for some dependent variable Y
>> for pupils who attended specific primary and secondary schools correct?
>> Or does lmer then estimate a nested model?
>> lmer(Y~(1|primaryschool)+(1|secondaryschool),data=dataname)
> That will estimate the model with crossed random effects.

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