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

Hadley Wickham hadley at rice.edu
Thu Jul 1 21:54:36 CEST 2010


> 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?

Hadley


-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/




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