At the end of this lesson, students will …
emmeans()
can take many arguments, but it needs at least two~
treatment
plot()
function to show the means and 95% confidence intervalscontrast()
does comparisons between means
emmeans
objectmethod
, is the type of contrastmethod = 'pairwise'
compares all pairs of treatmentsadjust
argumentcontrast
objects also have a built-in plotting method using the plot()
functioncld()
function from the multcomp packageemmeans
object1
, 2
, 3
instead of a
, b
, c
letters
as the labels to get the more familiar letters:method = 'trt.vs.ctrl'
when you call contrast()
type = 'response'
to emmeans()
ratio
\[\log\frac{a}{b} = \log a - \log b\]
None / Late
= 2.72 (model estimate: 2.72 times as many corn borers expected on a plot with no fungal spores applied, versus one with late fungal spore application treatment)species
and prep
variables are involved in an interaction+
cld()
will do comparison for all six estimates|
symbol to show which fixed effect should be used to group the comparisonsprep | species
gets estimated marginal means for prep
grouped by species
cld()
comparison is done within each species separatelyThis concludes the mixed models in R workshop.