transition {lsmeans} | R Documentation

## Transition to emmeans

### Description

The lsmeans package is being deprecated and further development will take place in its successor, emmeans. Users may use emmeans in almost exactly the same way as lsmeans, but a few function names and internal details are changed.

### Details

In transitioning to emmeans, users will find that the vignettes are constructed quite differently and that, in those and in the documentation, emphasis is placed on “estimated marginal means” rather than “least-squares means”. The term “estimated marginal means” is broader and more appropriate for use with some models, e.g. ordinal regression, that don't really involve least-squares methods. That is the reason for the change.

Accordingly, emmeans users are encouraged to use the functions `emmeans()`, `emtrends()`, `emmip()`, etc. in lieu of `lsmeans()`, etc. The latter functions are still available in emmeans; they run the corresponding `emmxxxx` function and relabel the results.

The emmeans package provides some functions that help convert scripts and R Markdown files containing lsmeans code so they will work in emmeans. There is also a function to convert `ref.grid` and `lsmobj` objects to the `emmGrid` objects used in emmeans. More extensive information is given in `vignette("transition-from-lsmeans", package = "emmeans")`.

### Author(s)

Russell V. Lenth

[Package lsmeans version 2.27-62 Index]