transformations are handled just likelog
. (#273) Also disabled making ratios withgenlog` as it seems ill-advised.
type = "scale"argument to
emmip(). This is the same as
type = "response"except the scale itself is transformed (i.e., a log scale if the log transformation was used). Since the same transformation is used, the appearance of the plot will be the same as with
type = "lp", but with an altered axis scale. Currently this is implemented only with
engine = "ggplot".
scheffe.rank> 1 was specified. (#171)
mcmc.listobjects (#278, #279)
nullwhenever it is nonzero on the chosen scale (#280)
This version has some changes that affect all users, e.g., not saving
.Last.ref_grid, so we incremented the sub-version number.
contrast(), so that the odds-ratio transformation persists into subsequent
contrast()calls e.g., interaction contrasts.
contrast(..., type = ...)work correctly
mblogitextended to work with
mmblogitmodels (#268) (However, since, mclogit pkg incorporates its own interface)
emm_options(save.ref_grid = FALSE). Years ago, it seemed potentially useful to save the last reference grid, but this is extra overhead, and writes in the user's global environment. The option remains if you want it.
as.data.frame(because we lose potentially important annotations), and information/example on how to see more digits (which I guess is why I'm seeing users do this).
y ~ A:Bdetected
A %in% Band
B %in% A, and hence
A %in% A*Band
B %in% A*Bdue to a change in 1.4.6. Now we omit cases where factors are nested in themselves!
cov.reduceformulas to allow use of custom models for predicting mediating covariates
multinom"correction" in version 1.5.4 was actually an "incorrection." It was right before, and I made it wrong! If analyzing
multinommodels, use a version other than 1.5.4
survregsupport (#258) --
survreg()doesn't handle missing factor levels the same way as
lm(). This also affects results from
auto.noisedataset, and changing that example and vignette example to have
noise/10as the response variable. (Thanks to speech and hearing professor Stuart Rosen for pointing out this issue in an e-mail comment.)
mode = "asymptotic"for
emmip_ggplot()so user can control how facets are labeled (#261)
joint_tests()and interaction contrasts for nested models (#266)
multinomsupport suggested by this SO question
rbind.emm_list()to default for
lqmm, and added support for
rqsobjects (quantreg package). User may pass
bootarguments such as
R, ... (#250)
multinomobjects (SEs were previously incorrect) and addition of support for related
mclogit::mblogitobjects. If at all possible, users should re-run any pre-1.5.4 analyses of multinomial models Note: This correction was wrong! If using multinomial models, you should use some version other than 1.5.4!
regrid(). We are no longer calling this a posterior sample because this is not really a Bayesian method, it is just a simulated set of regression coefficients.
CLD()once and for all. We tried in version 1.5.0, but forced to cave due to downstream problems.
levels<-method that maps to
update(... levels =)(#237)
cld()so it works with nested cases (#239)
coef()method to work with contrasts of nested models. This makes it possible for
pwpp()to work (#239)
plot()that occurs if we use `type = "response" but there is in fact no transformation (reported on StackOverflow)
"log2"as legal transformations in
emmip()to route plot output to rendering functions
emmip_lattice(). These functions allow more customization to the plot and can also be called independently. (To do later, maybe next update: the same for
plot.emmGrid(). What to name rendering functions?? -- suggestions?)
.emmcfunctions so that parenthesization of levels does not get in the way of
datais specified (#247)
$modelslot in a
lmobject, as long as there are no predictor transformations. This provides a little bit more safety in cases the data have been removed or altered.
rbind.emm_list()to allow subsetting. (Also documentation & example)
plot.emmGrid(... comparisons = TRUE)where we determine arrow bounds and unnecessary-arrow deletions separately in each
bygroup. See also Stack Overflow posting
emmeans()with contrasts specified ignores
adjustand passes to
contrast()instead. Associated documentation improved (I hope)
plot(..., comparisons = TRUE)(#228)
plot.emmGrid()so that comparison arrows work correctly with back-transformations. (Previously we used
regrid()in that case, causing different CIs and PIs depending on
as.emmGrid()to fully support nesting and submodels.
submodelsupport. Also, much more memory-efficient code therein (#218, #219)
enable.submodelso user can switch off
submodelsupport when unwanted or to save memory.
emm_basisso that an external package's methods are always found and given priority whether or not they are registered (#220)
gamlsssupport. Smoothers are not supported but other aspects are more reliable. See CV posting
pwpp()for more control over rendering (#178)
plot.emmGrid()where ordering of factor levels could change depending on
disableargument to use for setting aside any existing options. Useful for reproducible bug reporting.
contrargument or two-sided formula, we now suppress several particular
...arguments from being passed on to
contrast()when they should apply only to the construction of the EMMs (#214)
...arguments are passed to methods
CLD()was deprecated in version 1.3.4. THIS IS THE LAST VERSION where it will continue to be available. Users should use
multcomp::cld()instead, for which an
emmGridmethod will continue to exist.
ubdsdataset for testing with messy situations
emmip()to be consistent between one curve and several, in whether points are displayed (
trt.vs.ctrl.emmc()now throws an error (#208)
linfct(the identity) to
"parens", and a
sepcontrols how factor levels are combined when ploted or contrasted, and
parenssets whether, what, and how labels are parenthesized in
contrast(). In constructing contrasts of contrasts, for example, labels like
A - B - C - Dare 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 arrows
emmeans(obj, "1", by = "something")(#197)
emm_listobjects with a
$contrastscomponent, using those contrasts. This helps those who specify
pairwise ~ treatment.
contrast()for factor combinations with
bygroups were wacky (#199)
emtrends()screwed up with multivariate models (#200).
summary(). For example,
calc = c(n = ~.wgt.)will add a column of sample sizes to the summary.
coxphsupport for models with strata
listnow passes any
pwpp()to allow controlling the scale
glsobjects when data are incomplete (#181)
test(..., joint = TRUE)that can occur with nontrivial
gls(#185) and renamed
ref_grid()so it is same as in
pwpm()function for displaying estimates, pairwise comparisons, and P values in matrix form
.all.vars()that addresses #170
summary.emmGrid()to manually specify the desired dimensionality of a Scheffe adjustment (#171)
...to be included in
optionsin calls to
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
plot.emmGrid()that works similarly to that in
character predictors inat` (#175)
emmeans()associated with non-factors such as
emmip()allows plotting on a numeric scale
pwpp()has tick marks on P-value axis (#167)
regrid()for error when estimates exceed bounds
formula.tools:::as.character.formulamesses me up (thanks to Berwin Turloch, UWA, for alerting me)
dqrg()more visible in the documentation (because it's often useful)
...to hook functions (need exposed by #154)
regrid()whereby we can fake any response transformation -- not just
"log"(again inspired by #154)
pwpp()to make extremely small P values more distinguishable
model, to avoid potential mis-matching of the latter with optional
emtrends()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)
eff_size()function for Cohen effect sizes
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)).
regridignored offsets with Bayesian models;
emtrends()did not supply
stanregin particular (#114)
emtrends()making it possible to obtain higher-order trends (#133). Plus minor tuneups, e.g., smaller default increment for difference quotients
emmeans()more forgiving with 'by
variables; e.g.,emmeans(model, ~ dose | treat, by = "route")
will find bothby
variables whereas previously"route"` would be ignored.
recover_data()methods are used in preference to internal ones - so package developers can provide improvements over what I've cobbled together.
contrast()in identifying true contrasts (#134)
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.]
contrast()to decide how to handle
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 methods
infer, explaining that Bayesian models are handled differently (#128)
emmip()(#131). Also, in
intervalsargument has been changed to
CIsfor sake of consistency and less confusion;
intervalsis still supported for backaward compatibility.
colorsargument so we can customize colors used.
glhtsupport (#132 contributed by Balsz Banfai)
N.simarguments whereby we can generate a fake posterior sample from a frequentist model.
glsobjects with non-matrix
as.mcmcto allow for simulating from the posterior predictive distribution
do.call(order, ...), to prevent problems with factor names like
methodthat are argument names for these functions (#94)
summary.emmGrid()whereby transformations of class
update.emmGrid(..., levels = levs)whereby we can easily relabel the reference grid and ensure that the
rolesslots 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
CLD()due to its misleading display of pairwise-comparison tests.
betaregobjects, where the wrong
termscomponent was sometimes used.
byvariables are present (#98).
pwpp()function to plot P values of comparisons
summary(..., 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
nnet::multinomsupport when there are 2 outcomes (#19)
famSizenow correct when
includeis used in a contrast function (see #68)
aovListobjects, in part due to the popularity of
afex::aov_ez()which uses these models.
emm_options(opt.digits = FALSE)
includeargument to most
emmeans()when two-sided formulas are present
clmsupport when model is rank-deficient
regrid(..., transform = "log")error when there are existing non-estimable cases (issue #65)
manovaobject no longer requires
CLDfatal error when
sort = TRUE(#77)
contrast()mis-labeled estimates when levels varied among
bygroups (most prominently this happened in
CLD(..., details = TRUE))
aovlistsupport so it re-fits the model when non-sum-to-zero contrasts were used
print.summary_emm()now cleans up numeric columns with
update(), and addition of
covnestargument for whether to include covariates when auto-detecting nesting
hpd.summary()and handoff to it from
...where it shouldn't
CLD()now works for MCMC models (uses frequentist summary)
ref.grid()put to final rest, and we no longer support packages that provide
.emm_basis()to provide access for extension developers to all available methods
.all.vars()that could cause errors when response variable has a function call with character constants.
regrid()(so results match
type = "response").
plot.emmGrid(..., comparisons = TRUE, type = "response")produced incorrect comparison arrows; now fixed
df$y ~ df$treat + df[["cov"]]. This had failed previously for two obscure reasons, but now works correctly.
simplify.namesoption for above types of models
emm_options()with no arguments now returns all options in force, including the defaults. This makes it more consistent with
emtrends(); produced incorrect results in models with offsets.
qdrg()function (quick and dirty reference grid) for help with unsupported model objects
cld()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
cldwith or without having multcomp installed.
xtending.Rmdvignette on how to export methods
cldregarding comparing only 1 EMM
cld.emm_listnow returns results only for
object[[ which ]], along with a warning message.
cld ~ group, a vestige of lsmeans as it did not work correctly (and was already undocumented)
Suggests(dozens and dozens fewer dependencies)
lmemodels in "models" vignette
excludeargument to most
.emmcfunctions: allows user to omit certain levels when computing contrasts
hpd.summary()function for Bayesian models to show HPD intervals rather than frequentist summary. Note:
summary()automatically reroutes to it. Also
Surv()was interpreted as a response transformation.
cld()is applied to an
ref_grid()(scalar offset only) and to
emmeans()(vector offset allowed) -- (issue #18)
[.summary_emmto choose whether to retain its class or coerce to a
data.frame(relates to issue #14)
trt.vs.ctrland relatives (#27)
termsis accessed with
lmeobjects to make it more robust
emmeans:::convert_scripts()renames output file more simply
[method for class
contrast- essentially the complement of
ylevslist of length > 1; also slight argument change:
weightswas ignored when
dataargument, if supplied to a data.frame (
recover_data()doesn't like tibbles...)
emmGridobjects, making it often possible to pass it directly to other functions as a
bywas ignored for interaction contrasts
as.glht()where it choked on
df = Inf
joint_tests()function tests all [interaction] contrasts
gamlssobjects (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
emm_options(summary = ...)to work as advertised.
emm()as had been intended as alternative to
multcomp::glht()(result of ditto).
Infto display d.f. for asymptotic (z) tests. (
NAwill still work too but
Infis a better choice for consistency and meaning.)
recover_data()now throws an error when it finds recovered data not reproducible
vcov()calls to comply with recent R-devel changes
This 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.
emmip(), etc. But
lstrends(), etc. as well as
pmmeans()etc. are mapped to their corresponding
ref.grid -> ref_grid,
lsm.options -> emm_options, etc.
lsmobjare gone. Both are replaced by class
as.emmGrid()function is provided to convert old objects to class
lmerMod models. Also added options
lmerTest.limit, similar to those for pbkrtest.
emmmeans()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
emmip()are now ggplot2-based. Old lattice-based functionality is still available too, and there is a
graphics.engineoption to choose the default.
Enhanceswhen not needed for building/testing
New developments will take place in emmeans, and lsmeans will remain static and eventually will be archived.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.