[R-sig-ME] different aic and LL in glmer(lme4) and glimmix(SAS)?

Douglas Bates bates at stat.wisc.edu
Thu Jul 1 22:56:50 CEST 2010

On Thu, Jul 1, 2010 at 2:54 PM, Hadley Wickham <hadley at rice.edu> wrote:
>> The difference is probably due to the way that the deviance is defined
>> for the binomial family in R.  A glm family object is a list of
>> functions and expressions.  One of the functions, called "dev.resids"
>> has arguments y, mu and weights.  You can specify the response for a
>> binomial family as the 0/1 responses or as a matrix with two columns
>> as you did here.  When you use the two column specification the
>> response y is transformed to the fraction of successes and the number
>> of cases is incorporated in the weights.  It turns out that this is
>> all the information necessary for obtaining the mle's of the
>> parameters but it does not give the same deviance as you would get by
>> listing the 0/1 responses.
> Isn't it also possible the difference is because (e.g.) lme4 drops
> constants out of the likelihood and SAS doesn't?

Certainly a possibility.  I sometimes amaze myself with how sloppy I
can be in derivations. :-)

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