[R] Multilevel analysis with package lme
Felix Eschenburg
Atropin75 at t-online.de
Sun Mar 21 16:42:17 CET 2004
Dear list,
i am a student of psychology and have to do a multilevelanalysis on some data.
About that i have one general and one specific question.
This is what i have copied from the help-file on lme:
data(bdf)
fm <- lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf,
random = ~ IQ.ver.cen | schoolNR)
summary(fm)
after summary(fm) i get the following error:
Error in verbose || attr(x, "verbose") : invalid `y' type in `x || y'
I assume that i have not installed the package nlme correcty, but reinstalling
did not fix that error. So, what can i do about that ?
Then i have another question about my data.
I have one response variable and about 20 explanatory variables. These
variables are nested in a grouping variable of about 100 groups, which is
nested in another grouping variable of 2 groups .
I have tried this
lme.model <- lme(respVar~expVar1, data=myData, random = respVar1+...
+respVar20| groupingVariable_level2,na.action=na.omit)
As i understood Snijders and Bosker, with that i have a fixed effect of
expVar1 on respVar and a random effect of all the others explanatory
variables. They are also nested in grouping Variable level 2.
Now my question is, if this is the correct term and how do i include the
groupingVariable 3 into my model ?
As you can see, i just begun to learn about multilevelanalysis, so if you have
a link, where it is explained, how to do that with R, I would be very
thankful.
Yours sincerly
Felix Eschenburg
More information about the R-help
mailing list