stanreg
objects (#202)emmip()
to be consistent between one curve and several, in whether points are displayed (style
option)"scale"
option to make.tran()
emtrends()
(#201)trt.vs.ctrl.emmc()
now throws an error (#208)linfct
(the identity) to emmobj
emm_options
"sep"
and "parens"
, and a parens
argument in contrast()
. sep
controls how factor levels are combined when ploted or contrasted, and parens
sets whether, what, and how labels are parenthesized in contrast()
. In constructing contrasts of contrasts, for example, labels like A - B - C - D
are now (A - B) - (C - D)
, by default. To reproduce old labeling, do `emm_options(sep = “,”, parens = “a^”)pwpp()
so it plays nice with nonestimable cases"xplanations"
vignette with additional documentation on methods used. (comparison arrows, for starters)plot()
, especially regarding comparison arrowsstanreg
models (#196)emmeans(obj, "1", by = "something")
(#197)eff_size()
now supports emm_list
objects with a $contrasts
component, using those contrasts. This helps those who specify pairwise ~ treatment
.contrast()
for factor combinations with by
groups were wacky (#199)emtrends()
screwed up with multivariate models (#200).calc
to summary()
. For example, calc = c(n = ~.wgt.)
will add a column of sample sizes to the summary.coxph
support for models with strataemmeans()
with specs
of class list
now passes any offset
and trend
arguments (#179)plim
argument to pwpp()
to allow controlling the scaleparams
(#180)gls
objects when data are incomplete (#181)joint_tests()
and test(..., joint = TRUE)
that can occur with nontrivial @dffun()
slots (#184)gls
(#185) and renamed boot-satterthwaite
to appx-satterthwaite
(#176)transform
argument in ref_grid()
so it is same as in regrid()
(#188)pwpm()
function for displaying estimates, pairwise comparisons, and P values in matrix form.all.vars()
that addresses #170scheffe.rank
in summary.emmGrid()
to manually specify the desired dimensionality of a Scheffe adjustment (#171)...
to be included in options
in calls to emmeans()
and contrast()
. This allows passing any summary()
argument more easily, e.g., emmeans(..., type = "response", bias.adjust = TRUE, infer = c(TRUE, TRUE))
(Before, we would have had to wrap this in summary()
)plotit
argument to plot.emmGrid()
that works similarly to that in emmip()
.character predictors in
at` (#175)emmeans()
associated with non-factors such as Date
(#162)nesting.order
option to emmip()
(#163)style
argument for emmip()
allows plotting on a numeric scalepwpp()
has tick marks on P-value axis (#167)regrid()
for error when estimates exceed boundsformula.tools:::as.character.formula
messes me up (thanks to Berwin Turloch, UWA, for alerting me)dqrg()
more visible in the documentation (because it’s often useful)emm_list
objects, e.g. rbind()
and as.data.frame()
, as.list()
, and as.emm_list()
"bcnPower"
option to make.tran()
(per car::bcnPower()
)emmtrends()
(#153)...
to hook functions (need exposed by #154)regrid()
whereby we can fake any response transformation – not just "log"
(again inspired by #154)merMod
objects) (#157)pwpp()
to make extremely small P values more distinguishableemtrends()
is now object
, not model
, to avoid potential mis-matching of the latter with optional mode
argumentemtrends()
now uses more robust and efficient code whereby a single reference grid is constructed containing all needed values of var
. The old version could fail, e.g., in cases where the reference grid involves post-processing. (#145)scale
argument to contrast()
"identity"
contrast methodeff_size()
function for Cohen effect sizescov.keep
argument in ref_grid()
for specifying covariates to be treated just like factors (#148). A side effect is that the system default for indicator variables as covariates is to treat them like 2-level factors. This could change the results obtained from some analyses using earlier versions. To replicate old analyses, set emm_options(cov.keep = character(0))
.regrid
ignored offsets with Bayesian models; emtrends()
did not supply options
and misc
arguments to emm_basis()
(#143)stanreg
in particular (#114)max.degree
argument in emtrends()
making it possible to obtain higher-order trends (#133). Plus minor tuneups, e.g., smaller default increment for difference quotientsemmeans()
more forgiving with ’byvariables; e.g.,
emmeans(model, ~ dose | treat, by = “route”)will find both
byvariables whereas previously
“route”` would be ignored.emm_basis()
and recover_data()
methods are used in preference to internal ones - so package developers can provide improvements over what I’ve cobbled together.recover_data()
failscontrast()
in identifying true contrasts (#134)plot.summary_emm()
regarding CIs
and intervals
(#137)log(y + 1) ~ ...
and 2*sqrt(y + 0.5) ~ ...
are now auto-detected. [This may cause discrepancies with examples in past usages, but if so, that would be because the response transformation was previously incorrectly interpreted.]ratios
argument to contrast()
to decide how to handle log
and logit
type = "response"
but there is no way to back-transform them (or we opted out with ratios = FALSE
).emm_register()
to make it easier for other packages to register their emmeans support methodsinfer
, explaining that Bayesian models are handled differently (#128)PIs
option to plot.emmGrid()
and emmip()
(#131). Also, in plot.emmGrid()
, the intervals
argument has been changed to CIs
for sake of consistency and less confusion; intervals
is still supported for backaward compatibility.plot.emmGrid
gains a colors
argument so we can customize colors used.glht
support (#132 contributed by Balsz Banfai)regrid
gains sim
and N.sim
arguments whereby we can generate a fake posterior sample from a frequentist model.gls
objects with non-matrix apVar
member (#119)sigma
argument to ref_grid()
(defaults to sigma(object)
if available)interval
argument in predict.emmGrid()
likelihood
argument in as.mcmc
to allow for simulating from the posterior predictive distributionsigma
in objectcld()
and CLD()
exclude
(#107)recover_data
to emm_basis
MCMCglmm
supportdo.call(paste, ...)
and do.call(order, ...)
, to prevent problems with factor names like method
that are argument names for these functions (#94)summary.emmGrid()
whereby transformations of class list
were ignored.update.emmGrid(..., levels = levs)
whereby we can easily relabel the reference grid and ensure that the grid
and roles
slots stay consistent. Added vignette example.emmeans()
. We now ensure that the original order of the reference grid is preserved. Previously, the grid was re-ordered if any numeric or character levels occurred out of order, per order()
CLD()
due to its misleading display of pairwise-comparison tests.betareg
objects, where the wrong terms
component was sometimes used.by
variables are present (#98).pwpp()
function to plot P values of comparisonssummary(..., adjust = "scheffe")
. We now actually compute and use the rank of the matrix of linear functions to obtain the F numerator d.f., rather than trying to guess the likely correct value.contrast()
results if they are later used by emmeans()
. This was first noticed with ordinal models in prob
mode (#83).sommer::mmer
, MuMIn::averaging
, and mice::mira
objectsnnet::multinom
support when there are 2 outcomes (#19)gls
objectsfamSize
now correct when exclude
or include
is used in a contrast function (see #68)aovList
objects, in part due to the popularity of afex::aov_ez()
which uses these models.emm_options(opt.digits = FALSE)
include
argument to most .emmc
functions (#67)ref
, exclude
, and include
in .emmc
functions (#68)...
arguments in emmeans()
when two-sided formulas are presentclm
support when model is rank-deficientregrid(..., transform = "log")
error when there are existing non-estimable cases (issue #65)brmsfit
support (#43)mgcv::gam
and mgcv::gamm
models.my.vcov()
now passes ...
to clientsmanova
object no longer requires data
keyword (#72)aovlist
models (#73)CLD
fatal error when sort = TRUE
(#77)lme
objects (#75)"mvt"
adjustment ignored by
groupingcontrast()
mis-labeled estimates when levels varied among by
groups (most prominently this happened in CLD(..., details = TRUE)
)aovlist
support so it re-fits the model when non-sum-to-zero contrasts were usedprint.summary_emm()
now cleans up numeric columns with zapsmall()
nesting
in ref_grid()
and update()
, and addition of covnest
argument for whether to include covariates when auto-detecting nestinghpd.summary()
and handoff to it from summary()
ref_grid()
ignored mult.levs
...
where it shouldn’tCLD()
now works for MCMC models (uses frequentist summary)opt.digits
optionref.grid()
put to final rest, and we no longer support packages that provide recover.data
or lsm.basis
methods.recover_data()
and .emm_basis()
to provide access for extension developers to all available methodsinst/extdata
.all.vars()
that could cause errors when response variable has a function call with character constants.regrid()
(so results match summary()
labeling with type = "response"
).plot.emmGrid(..., comparisons = TRUE, type = "response")
produced incorrect comparison arrows; now fixeddf$y ~ df$treat + df[["cov"]]
. This had failed previously for two obscure reasons, but now works correctly.simplify.names
option for above types of modelsemm_options()
with no arguments now returns all options in force, including the defaults. This makes it more consistent with options()
emtrends()
; produced incorrect results in models with offsets.update.emmGrid()
and emm_options()
qdrg()
function (quick and dirty reference grid) for help with unsupported model objectscld()
has been deprecated in favor of CLD()
. This had been a headache. multcomp is the wrong place for the generic to be; it is too fancy a dance to export cld
with or without having multcomp installed.xtending.Rmd
vignette on how to export methodsrevpairwise.emmc
and cld
regarding comparing only 1 EMMcld.emm_list
now returns results only for object[[ which[1] ]]
, along with a warning message.emmeans
specs like cld ~ group
, a vestige of lsmeans as it did not work correctly (and was already undocumented)Suggests
(dozens and dozens fewer dependencies)lme
models in “models” vignette.emmc
functions (#22)exclude
argument to most .emmc
functions: allows user to omit certain levels when computing contrastshpd.summary()
function for Bayesian models to show HPD intervals rather than frequentist summary. Note: summary()
automatically reroutes to it. Also plot()
and emmip()
play along.nlme::lme
modelsSurv()
was interpreted as a response transformation.cld()
is applied to an emm_list
(issue #24)offset
argument to ref_grid()
(scalar offset only) and to emmeans()
(vector offset allowed) – (issue #18)[.summary_emm
to choose whether to retain its class or coerce to a data.frame
(relates to issue #14)reverse
option for trt.vs.ctrl
and relatives (#27)terms
is accessed with lme
objects to make it more robustemmeans:::convert_scripts()
renames output file more simply[
method for class summary_emm
simple
argument for contrast
- essentially the complement of by
joint_tests()
ref_grid()
accept ylevs
list of length > 1; also slight argument change: mult.name
-> mult.names
emmeans()
wherein weights
was ignored when specs
is a list
data
argument, if supplied to a data.frame (recover_data()
doesn’t like tibbles…)as.data.frame
method for emmGrid
objects, making it often possible to pass it directly to other functions as a data
argument.contrast()
where by
was ignored for interaction contrastsas.glht()
where it choked on df = Inf
data
or subset
joint_tests()
function tests all [interaction] contrastsgamlss
objects (but doesn’t support smoothing). Additional argument is what = c("mu", "sigma", "nu", "tau")
It seems to be flaky when the model of interest is just ~ 1
.emmeans()
might pass data
to contrast()
summary.emmGrid()
emm_options(summary = ...)
to work as advertised.emmGrid()
function to emm()
as had been intended as alternative to mcp()
in multcomp::glht()
(result of ditto).cld.emm_list()
Inf
to display d.f. for asymptotic (z) tests. (NA
will still work too but Inf
is a better choice for consistency and meaning.)recover_data()
now throws an error when it finds recovered data not reproduciblevcov()
calls to comply with recent R-devel changesThis is the initial major version that replaces the lsmeans package. Changes shown below are changes made to the last real release of lsmeans (version 2.27-2). lsmeans versions greater than that are transitional to that package being retired.
emmeans()
, emtrends()
, emmip()
, etc. But lsmeans()
, lstrends()
, etc. as well as pmmeans()
etc. are mapped to their corresponding emxxxx()
functions.ref.grid -> ref_grid
, lsm.options -> emm_options
, etc.ref.grid
and lsmobj
are gone. Both are replaced by class emmGrid
. An as.emmGrid()
function is provided to convert old objects to class emmGrid
.lmerMod models
. Also added options disable.lmerTest
and lmerTest.limit
, similar to those for pbkrtest.neuralgia
and pigs
datasetsemmmeans()
methods is now top-down rather than convoluted intermingling of S3 methods-
s in labels to /
s to emphasize that thnese results are ratios.ref_grid
. (Can be disabled via emm_options()
)plot()
and emmip()
are now ggplot2-based. Old lattice-based functionality is still available too, and there is a graphics.engine
option to choose the default.Suggests
pkgs to Enhances
when not needed for building/testingNew developments will take place in emmeans, and lsmeans will remain static and eventually will be archived.