Re: [R] lsmeans

From: Douglas Bates <>
Date: Sun, 08 Jun 2008 12:58:24 -0500

On 6/7/08, John Fox <> wrote:
> Dear Dieter,
> I don't know whether I qualify as a "master," but here's my brief take on
> the subject: First, I dislike the term "least-squares means," which seems to

> me like nonsense. Second, what I prefer to call "effect displays" are just
> judiciously chosen regions of the response surface of a model, meant to
> clarify effects in complex models. For example, a two-way interaction is
> displayed by absorbing the constant and main-effect terms in the interaction
> (more generally, absorbing terms marginal to a particular term) and setting
> other terms to typical values. A table or graph of the resulting fitted
> values is, I would argue, easier to grasp than the coefficients, the
> interpretation of which can entail complicated mental arithmetic.

I like that explanation, John.

As I'm sure you are aware, the key phrase in what you wrote is "setting other terms to typical values". That is, these are conditional cell means, yet they are almost universally misunderstood - even by statisticians who should know better - to be marginal cell means. A more subtle aspect of that phrase is the interpretation of "typical". The user is not required to specify these typical values - they are calculated from the observed data.

If there are no interactions with the "other terms" and if the values chosen for those other terms based on the observed data are indeed typical of the values for which we wish to make inferences with the model then these conditional cell means may tell us something about the marginal cell means. But if either of those conditions fails then these conditional means can be very different from the marginal means.

I wouldn't have any problem at all with providing conditional cell means, especially if the user were required to specify the values at which to fix the other terms in the model, but that is not what people think they are getting. I don't want to encourage them in their delusions by letting them think i can evaluate marginal cell means as a single, conditional evaluation.

> > -----Original Message-----
> > From: []
> On
> > Behalf Of Dieter Menne
> > Sent: June-07-08 4:36 AM
> > To:
> > Subject: Re: [R] lsmeans
> >
> > John Fox <jfox <at>> writes:
> >
> > > I intend at some point to extend the effects package to linear and
> > > generalized linear mixed-effects models, probably using lmer() rather
> > > than lme(), but as you discovered, it doesn't handle these models now.

> > >
> > > It wouldn't be hard, however, to do the computations yourself, using
> > > the coefficient vector for the fixed effects and a suitably constructed
> > > model-matrix to compute the effects; you could also get standard errors
> > > by using the covariance matrix for the fixed effects.
> > >
> >
> > >> Douglas Bates:
> >
> > >>
> > My big problem with lsmeans is
> > that I have never been able to understand how they should be
> > calculated and, more importantly, why one should want to calculate
> > them. In other words, what do lsmeans represent and why should I be
> > interested in these particular values?
> > >>
> >
> > Truly Confused, torn apart by the Masters
> >
> > Dieter
> >
> > ______________________________________________
> > mailing list
> >
> > PLEASE do read the posting guide
> > and provide commented, minimal, self-contained, reproducible code.
> ______________________________________________
> mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
> mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun 08 Jun 2008 - 18:05:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 08 Jun 2008 - 20:32:10 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive