Skip to content
Prev 3998 / 20628 Next

different aic and LL in glmer(lme4) and glimmix(SAS)?

I see. Thank you for the clarification.  


I did just try lme4 on a[n expanded] binary version of the same data, but
the numbers are still not coming out the same as in SAS.

No matter. The deltaAIC values are the same, so I am content that they are
doing similar things.

Cheers,
Jeff


-----Original Message-----
From: dmbates at gmail.com [mailto:dmbates at gmail.com] On Behalf Of Douglas
Bates
Sent: Thursday, July 01, 2010 12:24 PM
To: Jeffrey Evans
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] different aic and LL in glmer(lme4) and
glimmix(SAS)?

On Thu, Jul 1, 2010 at 11:03 AM, Jeffrey Evans <Jeffrey.Evans at dartmouth.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.

I'll write an example using the cbpp data from the lme4 package.