[R-sig-ME] Random or Fixed effects appropriate?
Andrew Robinson
A.Robinson at ms.unimelb.edu.au
Wed Apr 9 02:16:31 CEST 2008
Hi Reinhold and Doug,
On Tue, Apr 08, 2008 at 05:49:46PM -0500, Douglas Bates wrote:
> On 4/8/08, Reinhold Kliegl <reinhold.kliegl at gmail.com> 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.
>
> I would regard that result as a numerical accident rather than a
> matter of design. I don't think the same factor A should be present
> in both the fixed effects and as a random effect of the form (1|A).
> The same factor can be involved in the fixed effects and the random
> effects as, for example, the factor Machine in the Machines data (in
> the MEMSS package) for models of the form
>
> lmer(score ~ Machine + (1|Worker/Machine), Machines)
>
> In those cases the role of Machine is different in the fixed effects
> and in the random effects.
>
> (Sorry Andrew but I think you are wrong on this one. As always I am
> willing to be convinced otherwise.)
It is the latter case that I was thinking of, where an effect plays a
different role in the fixed and in the random effects, but nonetheless
does appear in both. I was also thinking of split-plot designs.
So I think that I was tripped up by a poorly-chosen counter-example!
Warm wishes
Andrew
> > > > 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?
> >
> >
> > >
> > > 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.
> >
> > Thanks,
> > Best
> >
> > Reinhold
> >
> >
> > _______________________________________________
> > R-sig-mixed-models at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
--
Andrew Robinson
Department of Mathematics and Statistics Tel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599
http://www.ms.unimelb.edu.au/~andrewpr
http://blogs.mbs.edu/fishing-in-the-bay/
More information about the R-sig-mixed-models
mailing list