[R-sig-ME] Start values for glmer: Bug?

Ben Bolker bolker at ufl.edu
Tue Apr 27 04:58:32 CEST 2010


Adam D. I. Kramer wrote:
> On Mon, 26 Apr 2010, Ben Bolker wrote:
> 
>>  I don't think we really need your data, because it's easy to come up with
>> a reproducible example:
>>
>> library(lme4)
>> gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd),
>>             family = binomial, data = cbpp, verbose=TRUE)
>>
>> gm2 <- update(gm1,start=list(ST=gm1 at ST,fixef=fixef(gm1)),verbose=TRUE)
>>
>> ## I think what would be intended for setting only the
>> ## ST parameters would be:
>>
>> gm3 <- update(gm1,start=list(herd=gm1 at ST),verbose=TRUE)
> 
> ...gm3 appears to work, while gm2 throws the error.
> 
> This also works:
> 
> gm2 <- update(gm1,start=list(ST=gm1 at ST),verbose=TRUE)
> 
> ...which suggests to me that the error is in the fixef specification, not
> the ranef specification.

  I think we need to look more closely.  "Causes a warning" and "works"
are not the same (although "causes a warning even when there isn't
really a problem" is still a bug).

  In the verbose output, e.g

 17:     100.09586: 0.642260 -1.39854 -0.992335 -1.12868 -1.58031
(the last line of the initial fit), the first element (before the colon)
is deviance, the rest of the elements are (var-cov, fixed effects).

 start=list(ST=gm1 at ST,fixef=fixef(gm1))

starts in the right place:

    0:     100.09586: 0.642260 -1.39854 -0.992335 -1.12868 -1.58037

start=list(herd=gm1 at ST[[1]])
  doesn't give an error, but doesn't start in the right place either
(it should set starting var-cov to 0.642260):

  0:     101.94202: 0.845154 -1.26902 -1.17076 -1.30141 -1.78228

  I could dig in and fix this according to my understanding, but I'd
rather wait for Martin Maechler or Doug Bates to chime in ...




More information about the R-sig-mixed-models mailing list