Re: [R] GLMM error message

About this list Date view Thread view Subject view Author view Attachment view

From: Peter Dalgaard (p.dalgaard@biostat.ku.dk)
Date: Mon 17 May 2004 - 08:16:03 EST


Message-id: <x2ekpk9fx8.fsf@biostat.ku.dk>


"Matt Loveland" <loveland.1@nd.edu> writes:

> Hi,
>
> I wrote a few days ago about an error message I'm getting when I use GLMM
> from lme4 to do random effects modelling.
> When I add random effects, I get the following error message: Error in
> "EMsteps<-"(`*tmp*`, value = control) : invalid source matrix.
>
> (I wanted to note that I've only just started to learn about random effects
> modelling and R, so am a novice at both, but R/lme4 have been great up to
> this hiccup)
>
> I was asked to provide a reproducable example, so here is my try, using the
> guImmun data frame included with the package:
>
> library(lme4)
> data(guImmun)
>
> fm1 = GLMM(immun ~ kid2p + mom25p + momWork,
> data = guImmun, family = binomial,
> random = ~1|mom)
>
> fm2 = GLMM(immun ~ kid2p + mom25p + momWork,
> data = guImmun, family = binomial,
> random = ~kid2p|mom)
> **
> fm1 produces output, and fm2 gives me the following error message:
>
> Error in "EMsteps<-"(`*tmp*`, value = control) :
> invalid source matrix
>
> Is my model statement incorrect? Are there possible data problems I should
> direct my attention to?
> Any help will be appreciated.

> I'm using R 1.8.1

I get the same thing with R 1.9.0. Looks like it might be a bug, but I
notice that quite few moms have more than a single observation:

> with(guImmun, table(table(mom)))

   1 2 3
1063 500 32

and digging a bit deeper, I see that only 287 moms have observations
with different values of kid2p. This kind of data pattern has been
known to confuse lme-type algorithms before.

We probably need to leave further investigation to the package author.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST