Learn R Programming

lsmeans (version 2.30-0)

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.

Examples

Run this code
# NOT RUN {
  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")
# }

Run the code above in your browser using DataLab