[R-sig-ME] Random or Fixed effects appropriate?

Andrew Robinson A.Robinson at ms.unimelb.edu.au
Wed Apr 9 02:37:38 CEST 2008

Hi Reinhold,

On Tue, Apr 08, 2008 at 11:37:30PM +0200, Reinhold Kliegl wrote:
> Hi Andrew,
> >  > >  lmer( y ~ x + (1|A) + (1|B) + (1|C) + (1|D) + C + x:C) #error:
> >  > >  Downdated X'X is not positive definite, 82
> >  > You cannot include C both as a random and a fixed effect
> >
> >
> >  I do not believe that this is generally true.  See, for example,
> >
> >  > require(lme4)
> >  > (fm1 <- lmer(Reaction ~ Days + Subject + (Days|Subject),  sleepstudy))
> >
> >  Therefore I am uncertain as to how you can draw this conclusion
> >  without more information about the design (which the poster really
> >  should have provided).
> I stand corrected. I thought this would force the between-subject
> variance to zero. So what does the (substantially reduced)
> between-subjects variance estimated in this model refer to? I noticed
> that the residual variance stayed the same.

[see earlier reply to you and Doug]
> >  >
> >  > The following may not apply to your case, but it might: Sometimes
> >  > people think that a nested/taxonomic design implies a random effect
> >  > structure (e.g., schools, classes, students). This is not true. If you
> >  > have only a few units for each factor, you are better off to specify
> >  > it as a fixed-effects rather than a random-effects taxonomy. (Of
> >  > course, you lose generalizability, but if you want this you should
> >  > make sure you have sample that provides a basis for it.)
> >
> >  I can see the sense behind this position but sometimes a few units are
> >  all that is available, and including them in a model as fixed effects
> >  muddies the statistical waters, especially if they are the kinds of
> >  effects that a model user will be unlikely to naturally condition upon.
> If you have only a few units, how can this muddy the statistical waters?

Sorry, that is not great phrasing on my part.  I guess I should say
that I think that it could unnecessarily complicate the presentation
of the results.  For example, one may have a few-unit variable that is
suggested by the design and required for the assumptions.  Including
that variable as a fixed effect means that it has to be conditioned
on.  Including it as a random effect means that it can be averaged
across.  The latter can make a more straightforward story.  Of course,
it depends on the modelling goal.

> >
> >  I do agree that if there are problems with model fitting and/or
> >  interpretation when the design is rigorously followed, then a more
> >  flexible approach can and should be adopted, and appropriate
> >  allowances must be made.
> >
> >
> >  > The interpretation of conditional modes (formerly knowns as BLUPs,
> >  > that is "predictions") is a tricky business, especially with few
> >  > units per levels.
> >
> >  Sorry, I think I've missed something.  In what sense are the
> >  conditional modes formerly known as BLUPs?
> From: "Douglas Bates" <bates at stat.wisc.edu>
> Date: September 27, 2007 5:00:41 PM GMT+02:00
> The BLUPs of the random effects (actually as Alan James described
> the situation, "For a nonlinear model these are just like the BLUPs
> (Best Linear Unbiased Predictors) except that they are not linear, and
> they're not unbiased, and there is no clear sense in which they are
> "best" but, other than that, ...") are not guaranteed to have an
> observed variance-covariance matrix that corresponds to the estimate
> of the variance-covariance matrix of the random effects.
> 	From: 	  bates at stat.wisc.edu
> 	Subject: 	Re: [R-sig-ME] [R] coef se in lme
> 	Date: 	October 17, 2007 10:04:47 PM GMT+02:00
> Lately I have taken to referring to the "estimates" of the random
> effects, what are sometimes called the BLUPs or Best Linear Unbiased
> Predictors, as the "conditional modes" of the random effects.  That
> is, they are the values that maximize the density of the random
> effects given the observed data and the values of the model
> parameters.  For a linear mixed model the conditional distribution of
> the random effects is multivariate normal so the conditional modes are
> also the conditional means.

Ok, I see where you are coming from.  But I think that this means that
Doug is estimating the random effects by the conditional modes, which
for certain models are the same as the BLUPS.  I think that Doug
prefers "conditional modes" over BLUPS because he is now deploying his
algorithms for models in which BLUPS are no longer necessarily
sensible or available.  

I suppose that whilst I'm channelling Doug I should say something
about p-values, to get full value for my psychic dollar ;).  "P-values
are reported in lme4 but only those who really understand their
meaning can see them."

Doug, if I'm mis-channelling you, please correct me again.

Best wishes,


Andrew Robinson  
Department of Mathematics and Statistics            Tel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia         Fax: +61-3-8344-4599

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