[R] lme4 and Variable level detection
Jeroen Ooms
j.c.l.ooms at uu.nl
Sat Feb 28 16:00:15 CET 2009
I am making a little GUI for lme4, and I was wondering if there is a function
that automatically detects on which level every variable exists.
Furtheremore I got kind of confused about what a random effects model
actually calculates.
I have some experience with commercial software packages for multilevel
analysis, like HLM6, and I was surprised that lme4 does not require the user
to specify the level for every predictor variable. Is this because the
function automatically detects the level by testing on which levels the
predictor has variance, or is this information simply not needed?
I was taught that a crosslevel interaction predicts the regression
coefficient of the lower level variable, which is also what is implied by
the HLM gui. However, in an lme4 formula, a crosslevel interaction has the
same syntax as a regular interaction term. Furthermore, lme4 also allows
adding crosslevel interactions without a random slope for the lower level
variable. Now I'm confused. Is there a fundamental difference between a
crosslevel interaction, or is the same thing as a regular interaction when
the model also holds an error term for the lower level variable?
-----
Jeroen Ooms * Dept. of Methodology and Statistics * Utrecht University
Visit http://www.jeroenooms.com www.jeroenooms.com to explore some of my
current projects.
--
View this message in context: http://www.nabble.com/lme4-and-Variable-level-detection-tp22262944p22262944.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list