[R-sig-ME] BLUP in lmer

Douglas Bates bates at stat.wisc.edu
Fri Mar 23 18:42:52 CET 2007


On 3/23/07, Roberts, J. Kyle <jkrobert at bcm.tmc.edu> wrote:
> Olivier,
>
> Do you mean something like this?
> fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
> with(fm1, xyplot(resid(.) ~ fitted(.)))
>
> This gives you a plot of the residual versus the fitted.  "sleepstudy" is included in the package.

Thanks for the reply, Kyle.  The original question was about
generalized linear mixed models and the resid function doesn't work
for them at present.  The reason is that it is not clear which
residuals should be returned.  A generalized linear model has several
different types of residuals that can be defined for it and I haven't
gotten around to determining which ones would be appropriate for
generalized linear mixed models.

The original also asked about BLUPs from a generalized linear mixed model.

ranef(fm1)

provides what some would call the BLUPs of the random effects.  I call
them the "conditional modes" of the random effects rather than the
BLUPs or Best Linear Unbiased Predictors.  They are the modes in that
they maximize the density of the random effects conditional on the
variance-covariance parameters and the data.  For a linear mixed model
they are also the BLUPs.  For a generalized linear mixed model or a
nonlinear mixed model they aren't.  As Alan James once described the
situation, "They aren't linear (i.e. linear functions of the
observations) and they aren't unbiased and there is no clear sense in
which they are "best" but, other than than, they're exactly like the
BLUPs".

> Hope this helps,
> Kyle
>
> ***************************************
> J. Kyle Roberts, Ph.D.
> Baylor College of Medicine
> Center for Educational Outreach
> One Baylor Plaza, MS:  BCM411
> Houston, TX   77030-3411
> 713-798-6672 - 713-798-8201 Fax
> jkrobert at bcm.edu
> ***************************************
>
> -----Original Message-----
> From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Olivier MARTIN
> Sent: Friday, March 23, 2007 10:30 AM
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] BLUP in lmer
>
> Hi all,
>
> I am using 'lmer' to fit generalized linear mixed-effects models.
> I would like to know if there is a function to estimate the random effects.
> And, is there a way to compare the observed values vs. fitted values or fitted values vs. residuals ?
>
> Thanks,
> olivier
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> _______________________________________________
> 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