Overview

emmeans-package

Estimated marginal means (aka Least-squares means)

ref_grid()

Create a reference grid from a fitted model

emmeans()

Estimated marginal means (Least-squares means)

emtrends()

Estimated marginal means of linear trends

lsmeans() lstrends() lsmip() lsm() lsmobj() lsm.options() get.lsm.option()

Wrappers for alternative naming of EMMs

qdrg()

Quick and dirty reference grid

Follow-up analyses

contrast() pairs(<emmGrid>) coef(<emmGrid>) weights(<emmGrid>)

Contrasts and linear functions of EMMs

eff_size()

Calculate Cohen effect sizes and confidence bounds thereof

joint_tests() make.meanint() meanint() make.symmint() symmint()

Compute joint tests of the terms in a model

mvcontrast()

Multivariate contrasts

pairwise.emmc() revpairwise.emmc() tukey.emmc() poly.emmc() opoly.emmc() trt.vs.ctrl.emmc() trt.vs.ctrl1.emmc() trt.vs.ctrlk.emmc() dunnett.emmc() eff.emmc() del.eff.emmc() consec.emmc() mean_chg.emmc() helmert.emmc() nrmlz.emmc() wtcon.emmc() identity.emmc()

Contrast families

Summaries

summary(<emmGrid>) confint(<emmGrid>) test() predict(<emmGrid>) as.data.frame(<emmGrid>) `[`(<summary_emm>)

Summaries, predictions, intervals, and tests for emmGrid objects

hpd.summary()

Summarize an emmGrid from a Bayesian model

untidy

Dare to be un-"tidy"!

Modifying objects

comb_facs() split_fac() add_grouping() add_submodels() permute_levels()

Manipulate factors in a reference grid

rbind(<emmGrid>) `+`(<emmGrid>) `[`(<emmGrid>) head(<emmGrid>) tail(<emmGrid>) subset(<emmGrid>) rbind(<emm_list>) rbind(<summary_emm>) force_regular()

Combine or subset emmGrid objects

regrid()

Reconstruct a reference grid with a new transformation or simulations

mvregrid()

Multivariate regridding

update(<emmGrid>) `levels<-`(<emmGrid>) update(<summary_emm>)

Update an emmGrid object

Displays

cld(<emmGrid>) cld(<emm_list>)

Compact letter displays

emmip() emmip_ggplot() emmip_lattice()

Interaction-style plots for estimated marginal means

plot(<emmGrid>) plot(<summary_emm>)

Plot an emmGrid or summary_emm object

pwpm()

Pairwise P-value matrix (plus other statistics)

pwpp()

Pairwise P-value plot

Data sets

auto.noise

Auto Pollution Filter Noise

feedlot

Feedlot data

fiber

Fiber data

MOats

Oats data in multivariate form

neuralgia

Neuralgia data

nutrition

Nutrition data

oranges

Sales of oranges

pigs

Effects of dietary protein on free plasma leucine concentration in pigs

ubds

Unbalanced dataset

Structures

emmGrid-class

The emmGrid class

emmobj()

Construct an emmGrid object from scratch

contrast(<emm_list>) pairs(<emm_list>) test(<emm_list>) confint(<emm_list>) plot(<emm_list>) coef(<emm_list>) linfct(<emm_list>) str(<emm_list>) summary(<emm_list>) print(<emm_list>) as.data.frame(<emm_list>) as.data.frame(<summary_eml>)

The emm_list class

Utilities

emm() as.glht()

Support for multcomp::glht

emm_example()

Run or list additional examples

emm_options() get_emm_option() with_emm_options() emm_defaults

Set or change emmeans options

str(<emmGrid>) print(<emmGrid>) vcov(<emmGrid>) linfct()

Miscellaneous methods for emmGrid objects

make.tran() inverse()

Response-transformation extensions

Convert to outside formats

as.list(<emmGrid>) as.emm_list() as.emmGrid()

Convert to and from emmGrid objects

as.mcmc(<emmGrid>) as.mcmc(<emm_list>) as.mcmc.list(<emmGrid>) as.mcmc.list(<emm_list>)

Support for MCMC-based estimation

xtable(<emmGrid>) xtable(<summary_emm>) print(<xtable_emm>)

Using xtable for EMMs

Models and extending

models

Models supported in emmeans

recover_data() emm_basis() .recover_data() .emm_basis() .emm_register() .std.link.labels() .combine.terms() .aovlist.dffun() .cmpMM() .get.excl() .get.offset() .my.vcov() .all.vars() .diag() .num.key() .emm_vignette() .hurdle.support() .zi.support()

Support functions for model extensions