[R] lmer function
Douglas Bates
bates at stat.wisc.edu
Tue May 15 01:17:34 CEST 2007
On 5/14/07, Steven McKinney <smckinney at bccrc.ca> wrote:
>
> Running lme4 0.9975-13
> I'm still getting the warning
>
> $ operator not defined for this S4 class, returning NULL in: x$symbolic.cor
It was my mistake. I fixed the problem in the development sources
long ago but I haven't uploaded a new release since doing so. I'll
upload a new release next week - this is finals week for us and they
seem to expect that we will do things like grade exams rather than
debugging code. :-)
> Is there a more recent version?
> Is there any known problem with this warning
> (incorrect results etc.) ?
Not really. It is a benign cut-and-paste error. If you want to fix
it now look for the function printMer in the source file lme4/R/lmer.R
and change the default for the symbolic.cor argument to FALSE.
> > sessionInfo()
> R version 2.5.0 (2007-04-23)
> powerpc-apple-darwin8.9.1
>
> locale:
> C
>
> attached base packages:
> [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods"
> [7] "base"
>
> other attached packages:
> lme4 Matrix lattice
> "0.9975-13" "0.9975-11" "0.15-4"
> >
>
> Steven McKinney
>
> Statistician
> Molecular Oncology and Breast Cancer Program
> British Columbia Cancer Research Centre
>
> email: smckinney at bccrc.ca
>
> tel: 604-675-8000 x7561
>
> BCCRC
> Molecular Oncology
> 675 West 10th Ave, Floor 4
> Vancouver B.C.
> V5Z 1L3
> Canada
>
>
>
>
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch on behalf of Douglas Bates
> Sent: Mon 5/14/2007 12:43 PM
> To: Iasonas Lamprianou
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] lmer function
>
> On 5/14/07, Iasonas Lamprianou <lamprianou at yahoo.com> wrote:
> > Does anyone know if the lmer function of lme4 works fine for unbalanced designs? I have the examination results of 1000 pupils on three subjects, one score every term. So, I have three scores for English (one for every term), three scores for maths etc. However, not everybody was examined in maths, not everybody was examined in English etc, but everybody was in effect examined on four subjects. I also have information abouit the school. Would this model hive the right results for the variance components?
> >
> > mod_3_f <- lmer(SCORE ~ GENDER + (1 |ID ) + (1 | TERM) + (1 | SUBJECT) , Dataset)
> >
> > Linear mixed-effects model fit by REML
> > Formula: SCORE ~ GENDER + (1 | ID) + (1 | TERM) + (1 | SUBJECT)
> > Data: Dataset
> > AIC BIC logLik MLdeviance REMLdeviance
> > 247882 247926 -123936 247871 247872
> > Random effects:
> > Groups Name Variance Std.Dev.
> > ID (Intercept) 5.97288 2.44395
> > TERM (Intercept) 5.10307 2.25900
> > SUBJECT (Intercept) 0.25943 0.50934
> > Residual 4.41673 2.10160
> > number of obs: 53978, groups: ID, 5695; TERM, 4; SUBJECT, 4
> > Fixed effects:
> > Estimate Std. Error t value
> > (Intercept) 14.30352 1.15870 12.34
> > GENDER[T.Male] -1.01776 0.06885 -14.78
> > Correlation of Fixed Effects:
> > Warning in x$symbolic.cor : $ operator not defined for this S4 class, returning NULL
>
> What version of the lme4 package are you using? (Use sessionInfo() to
> check.) I think the bug that causes that warning has been fixed in
> the most recent version.
>
> > (Intr)
> > GENDER[T.M] -0.023
>
> > How do I interpert the results?
>
> Do you really want to treat SUBJECT as a random effect? I think it
> would be more common to treat it as a fixed effect. If I understand
> you correctly there are only two levels of SUBJECT and these are
> repeatable levels. If that is the case one could model SUBJECT as a
> fixed effect or consider its interaction within student with the term
> (SUBJECT|ID).
>
> It would make sense to regard the pair of responses in maths and
> English for each student in each term as a multivariate response but,
> at present, that model cannot be fit with lmer.
>
> I would also question whether you want the TERM to be modeled with a
> random effect.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
More information about the R-help
mailing list