Create a reference grid from a fitted model
These functions are provided in lsmeans because they have been renamed in emmeans
ref.grid(object, ...) recover.data(object, ...) lsm.basis(object, ...)
object |
A model object in a supported class. |
... |
Additional arguments passed to companion functions in the emmeans package. |
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.
Russell V. Lenth
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")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.