Discussion:
[R-sig-ME] R-sig-mixed-models Digest, Vol 139, Issue 13
Resche Rigon Matthieu
2018-07-22 10:02:01 UTC
Permalink
Bonjour,

Je suis actuellement en congé, avec un accès restreint à mes mails.
Je serai de retour le 6 août.

Matthieu Resche-Rigon
Malcolm Fairbrother
2018-07-22 11:40:57 UTC
Permalink
Hi Peter,

Yes, cross-classification is no problem for lme4. The package will determine automatically that your data are cross-classified, assuming you use unique identifiers for each classification. For a random intercept null model (with a normally distributed outcome), you might want something like:

mod1 <- lmer(y ~ 1 + (1 | student) + (1 | teacher), data = yourdataframe)

Hope that helps,

Malcolm
Date: Fri, 20 Jul 2018 09:27:05 -0500
Subject: [R-sig-ME] cross-classified models
I was wondering if the lme4 package can handle so called cross-classified
Level 1: observations/data at time 0,1,2
Level 2: students cross-classified by teachers (student has a different
teacher in each observation, 0,1,2). HLM 7 program follows the convention
of a row-by-column cross classification.
Would anyone hint to what the syntax in lme4 would look like (assuming
random-intercept model, no covariates/null model).
Peter
Loading...