lsmeans support for glht
These functions and methods provide an interface between lsmeans and the
glht function for simultaneous inference in the multcomp package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
## S3 method for class 'ref.grid' as.glht(object, ...) ## S3 method for class 'lsm.list' as.glht(object, ..., which = 1) ## S3 method for class 'glht.list' coef(object, ...) ## S3 method for class 'glht.list' confint(object, ...) ## S3 method for class 'glht.list' plot(x, ...) ## S3 method for class 'glht.list' summary(object, ...) ## S3 method for class 'glht.list' vcov(object, ...) lsm(...) pmm(...)
An object of the required class.
Numeric index of which element of the
Additional arguuments to other methods.
pmm, which is identical) are meant to be called only from
"glht" as its second (
linfct) argument. It works similarly to
mcp except with
specs (and optionally
contr arguments) provided as in a call to
When there is a non-
by variable (either explicitly or implicitly), each “by” group is passed separately to
glht and returned as a
"glht" objects. For convenience, this is classed as
"glht.list", and appropriate methods
vcov are provided.
as.glht returns an object of class
glht, or of class
by is non-
NULL. The latter is simply a list of
glht objects, and the provided methods
lapply the corresponding methods for class
There is also a
glht method for class
ref.grid, but it is far preferable to use
as.glht instead, as its
model argument is redundant.
Russell V. Lenth
1 2 3 4 5 6 7 8 9 10 11 12 13 14
require(lsmeans) require(multcomp) warp.lm <- lm(breaks ~ wool*tension, data = warpbreaks) # Using 'lsm' summary(glht(warp.lm, lsm(pairwise ~ tension | wool))) # Same, but using an existing 'lsmeans' result warp.lsmobj <- lsmeans(warp.lm, ~ tension | wool) summary(as.glht(pairs(warp.lsmobj))) # Same contrasts, but treat as one family summary(as.glht(pairs(warp.lsmobj), by = NULL))
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.