[R-sig-ME] Between and within variance in a GLMM
Douglas Bates
bates at stat.wisc.edu
Thu Nov 27 18:06:01 CET 2008
I believe this discrepancy is related to the common scale parameter,
sigma, in the Gaussian model.
When I wrote the code for the Gaussian mixed model I realized that I
could profile out both the fixed effects and one scale parameter so
the deviance or the REML criterion are evaluated as functions only of
the parameters that determine the covariance matrix of the random
effects.
The glm families define "deviance residuals" whose sum is related to
the deviance but is not the same as the deviance. The deviance and
the log-likelihood are defined in the AIC function in the family
(which, by the way, returns NA for the quasi families). I imagine
this is all documented somewhere but I, for one, find it rather
confusing. I am still sorting it out, which typically means that I
need to derive it from scratch. Some progress is being made in that I
now understand the iteratively reweighted least squares algorithm and
its generalization, penalized iteratively reweighted least squares
(PIRLS), for generalized linear mixed models. I think I know how to
define the deviance for binomial (Bernoulli) or Poisson GLMMs and that
there isn't a deviance for the quasi families. The Gamma family is
giving me problems because one of the properties that I thought
applied to the link function - mapping the allowable range of the mean
to the entire real line - doesn't apply to the canonical link
function, which is the reciprocal.
On Thu, Nov 27, 2008 at 10:15 AM, Daniel Ezra Johnson
<danielezrajohnson at gmail.com> wrote:
> I've done a very quick test of this issue of deviance() vs. logLik(),
> using a simpler model than the type illustrated in the link
> https://stat.ethz.ch/pipermail/r-sig-mixed-models/2008q3/001175.html.
>
> For glmer() whether its a "gaussian" or "binomial" model,
> deviance(mod) equals -2*logLik(mod).
>
> For glm() the same is true if it's a "binomial" model.
>
> For a "gaussian" glm() model, the two quantities are different. i
> believe that deviance() gives the residual sum of squares, and that
> logLik() gives ... a scaled deviance? I don't know.
>
> Contrary to what was said above, I think that logLik() of a glm()
> gaussian model is the quantity that is comparable to logLik() or
> deviance() of a glmer() gaussian model.
>
> Dan
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
More information about the R-sig-mixed-models
mailing list