[R] lsmeans

Douglas Bates bates at stat.wisc.edu
Sun Jun 8 19:58:24 CEST 2008


On 6/7/08, John Fox <jfox at mcmaster.ca> 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: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
>  On
>  > Behalf Of Dieter Menne
>  > Sent: June-07-08 4:36 AM
>  > To: r-help at stat.math.ethz.ch
>  > Subject: Re: [R] lsmeans
>  >
>  > John Fox <jfox <at> mcmaster.ca> 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:
>  > https://stat.ethz.ch/pipermail/r-sig-mixed-models/2007q2/000222.html
>  > >>
>  > 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
>  >
>  > ______________________________________________
>  > R-help at r-project.org mailing list
>  > https://stat.ethz.ch/mailman/listinfo/r-help
>  > PLEASE do read the posting guide
>  http://www.R-project.org/posting-guide.html
>  > and provide commented, minimal, self-contained, reproducible code.
>
>  ______________________________________________
>  R-help at r-project.org mailing list
>  https://stat.ethz.ch/mailman/listinfo/r-help
>  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>  and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list