Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ref.grid

Create a reference grid from a fitted model


Description

These functions are provided in lsmeans because they have been renamed in emmeans

Usage

ref.grid(object, ...)
    
recover.data(object, ...)
lsm.basis(object, ...)

Arguments

object

A model object in a supported class.

...

Additional arguments passed to companion functions in the emmeans package.

Value

lsmeans now passes all its computations to emmeans, and the return values are thus what is returned by the corresponding functions ref_grid, recover_data, and emm_basis, respectively.

Author(s)

Russell V. Lenth

Examples

fiber.lm <- lm(strength ~ machine + diameter, data = fiber)
  rg <- ref.grid(fiber.lm, at = list(diameter = c(20, 24, 28)))
  rg
  
  # Note this is an emmGrid object defined in emmeans. The old "ref.grid"
  # class is now an extension of this:
  r.g. <- new("ref.grid", rg)
  lsmeans(r.g., "machine")

lsmeans

Least-Squares Means

v2.30-0
GPL-2 | GPL-3
Authors
Russell Lenth [aut, cre, cph]
Initial release
2018-11-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.