2
I’m using the function glmer
package lme4
. My answer is binomial.
I have 5 schools, with approximately 100 teachers, and a teacher does not work in more than one school, I have 5 longitudinal information for each teacher.
My question is whether I use:
(1|escola/prof) ou (1 | escola) + (1 | prof) ou (1|prof/escol)
.
Or I’m thinking wrong and it’s another way?
Dear Cleber, I’m voting to close your question because it’s not about programming. I believe you have read the table on page 6 of this link: https://cran.r-project.org/web/packages/lme4/vignettes/lmer.pdf. which explains what each of these commands means. From then on, the problem becomes statistical, which is beyond the scope of the site. My guess is that any one of the three will be very similar since no teacher teaches at two schools. However, I believe that the third does not make much sense (looking through the hierarchy).
– Daniel Falbel
My suggestion is to use the first: each school has a random intercept and each teacher has a random variation within the school.
– Daniel Falbel
Thank you for the comment and the link.
– Cleber Iack