Skip to contents

Run a contrast analysis by estimating the differences between each level of a factor. See also other related functions such as estimate_means() and estimate_slopes().

Usage

estimate_contrasts(
  model,
  contrast = NULL,
  at = NULL,
  fixed = NULL,
  transform = "none",
  ci = 0.95,
  p_adjust = "holm",
  method = "pairwise",
  adjust = NULL,
  ...
)

Arguments

model

A statistical model.

contrast

A character vector indicating the name of the variable(s) for which to compute the contrasts.

at

The predictor variable(s) at which to evaluate the desired effect / mean / contrasts. Other predictors of the model that are not included here will be collapsed and "averaged" over (the effect will be estimated across them).

fixed

A character vector indicating the names of the predictors to be "fixed" (i.e., maintained), so that the estimation is made at these values.

transform

Is passed to the type argument in emmeans::emmeans(). See this vignette. Can be "none" (default for contrasts), "response" (default for means), "mu", "unlink", "log". "none" will leave the values on scale of the linear predictors. "response" will transform them on scale of the response variable. Thus for a logistic model, "none" will give estimations expressed in log-odds (probabilities on logit scale) and "response" in terms of probabilities.

ci

Confidence Interval (CI) level. Default to 0.95 (95%).

p_adjust

The p-values adjustment method for frequentist multiple comparisons. Can be one of "holm" (default), "tukey", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr" or "none". See the p-value adjustment section in the emmeans::test documentation.

method

Contrast method. See same argument in emmeans::contrast.

adjust

Deprecated in favour of p_adjust.

...

Other arguments passed for instance to insight::get_datagrid().

Value

A data frame of estimated contrasts.

Details

See the Details section below, and don't forget to also check out the Vignettes and README examples for various examples, tutorials and use cases.

The estimate_slopes(), estimate_means() and estimate_contrasts() functions are forming a group, as they are all based on marginal estimations (estimations based on a model). All three are also built on the emmeans package, so reading its documentation (for instance for emmeans::emmeans() and emmeans::emtrends()) is recommended to understand the idea behind these types of procedures.

  • Model-based predictions is the basis for all that follows. Indeed, the first thing to understand is how models can be used to make predictions (see estimate_link()). This corresponds to the predicted response (or "outcome variable") given specific predictor values of the predictors (i.e., given a specific data configuration). This is why the concept of reference grid() is so important for direct predictions.

  • Marginal "means", obtained via estimate_means(), are an extension of such predictions, allowing to "average" (collapse) some of the predictors, to obtain the average response value at a specific predictors configuration. This is typically used when some of the predictors of interest are factors. Indeed, the parameters of the model will usually give you the intercept value and then the "effect" of each factor level (how different it is from the intercept). Marginal means can be used to directly give you the mean value of the response variable at all the levels of a factor. Moreover, it can also be used to control, or average over predictors, which is useful in the case of multiple predictors with or without interactions.

  • Marginal contrasts, obtained via estimate_contrasts(), are themselves at extension of marginal means, in that they allow to investigate the difference (i.e., the contrast) between the marginal means. This is, again, often used to get all pairwise differences between all levels of a factor. It works also for continuous predictors, for instance one could also be interested in whether the difference at two extremes of a continuous predictor is significant.

  • Finally, marginal effects, obtained via estimate_slopes(), are different in that their focus is not values on the response variable, but the model's parameters. The idea is to assess the effect of a predictor at a specific configuration of the other predictors. This is relevant in the case of interactions or non-linear relationships, when the effect of a predictor variable changes depending on the other predictors. Moreover, these effects can also be "averaged" over other predictors, to get for instance the "general trend" of a predictor over different factor levels.

Example: Let's imagine the following model lm(y ~ condition * x) where condition is a factor with 3 levels A, B and C and x a continuous variable (like age for example). One idea is to see how this model performs, and compare the actual response y to the one predicted by the model (using estimate_response()). Another idea is evaluate the average mean at each of the condition's levels (using estimate_means()), which can be useful to visualize them. Another possibility is to evaluate the difference between these levels (using estimate_contrasts()). Finally, one could also estimate the effect of x averaged over all conditions, or instead within each condition (using [estimate_slopes]).

Examples

# Basic usage
model <- lm(Sepal.Width ~ Species, data = iris)
estimate_contrasts(model)
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
#> Marginal Contrasts Analysis
#> 
#> Level1     |     Level2 | Difference |         95% CI |   SE | t(147) |      p
#> ------------------------------------------------------------------------------
#> setosa     | versicolor |       0.66 | [ 0.49,  0.82] | 0.07 |   9.69 | < .001
#> setosa     |  virginica |       0.45 | [ 0.29,  0.62] | 0.07 |   6.68 | < .001
#> versicolor |  virginica |      -0.20 | [-0.37, -0.04] | 0.07 |  -3.00 | 0.003 
#> 
#> Marginal contrasts estimated at Species
#> p-value adjustment method: Holm (1979)

# Dealing with interactions
model <- lm(Sepal.Width ~ Species * Petal.Width, data = iris)

# By default: selects first factor
estimate_contrasts(model)
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
#> NOTE: Results may be misleading due to involvement in interactions
#> Marginal Contrasts Analysis
#> 
#> Level1     |     Level2 | Difference |        95% CI |   SE | t(144) |      p
#> -----------------------------------------------------------------------------
#> setosa     | versicolor |       1.59 | [ 0.64, 2.54] | 0.39 |   4.04 | < .001
#> setosa     |  virginica |       1.77 | [ 0.77, 2.78] | 0.41 |   4.29 | < .001
#> versicolor |  virginica |       0.18 | [-0.17, 0.54] | 0.15 |   1.27 | 0.205 
#> 
#> Marginal contrasts estimated at Species
#> p-value adjustment method: Holm (1979)

# Can also run contrasts between points of numeric
estimate_contrasts(model, contrast = "Petal.Width", length = 4)
#> NOTE: Results may be misleading due to involvement in interactions
#> Marginal Contrasts Analysis
#> 
#> Level1         |         Level2 | Difference |         95% CI |   SE | t(144) |      p
#> --------------------------------------------------------------------------------------
#> Petal.Width0.1 | Petal.Width0.9 |      -0.67 | [-1.02, -0.33] | 0.13 |  -5.18 | < .001
#> Petal.Width0.1 | Petal.Width1.7 |      -1.35 | [-2.04, -0.65] | 0.26 |  -5.18 | < .001
#> Petal.Width0.1 | Petal.Width2.5 |      -2.02 | [-3.06, -0.98] | 0.39 |  -5.18 | < .001
#> Petal.Width0.9 | Petal.Width1.7 |      -0.67 | [-1.02, -0.33] | 0.13 |  -5.18 | < .001
#> Petal.Width0.9 | Petal.Width2.5 |      -1.35 | [-2.04, -0.65] | 0.26 |  -5.18 | < .001
#> Petal.Width1.7 | Petal.Width2.5 |      -0.67 | [-1.02, -0.33] | 0.13 |  -5.18 | < .001
#> 
#> Marginal contrasts estimated at Petal.Width
#> p-value adjustment method: Holm (1979)

# Or both
estimate_contrasts(model, contrast = c("Species", "Petal.Width"), length = 2)
#> Marginal Contrasts Analysis
#> 
#> Level1                    |                    Level2 | Difference |         95% CI |   SE | t(144) |      p
#> ------------------------------------------------------------------------------------------------------------
#> setosa Petal.Width0.1     |     setosa Petal.Width2.5 |      -2.01 | [-4.92,  0.91] | 0.98 |  -2.06 | 0.166 
#> setosa Petal.Width0.1     | versicolor Petal.Width0.1 |       1.83 | [ 0.99,  2.66] | 0.28 |   6.55 | < .001
#> setosa Petal.Width0.1     | versicolor Petal.Width2.5 |      -0.70 | [-1.50,  0.10] | 0.27 |  -2.61 | 0.059 
#> setosa Petal.Width0.1     |  virginica Petal.Width0.1 |       1.55 | [ 0.62,  2.48] | 0.31 |   4.95 | < .001
#> setosa Petal.Width0.1     |  virginica Petal.Width2.5 |       0.03 | [-0.30,  0.37] | 0.11 |   0.29 | 0.984 
#> setosa Petal.Width2.5     | versicolor Petal.Width2.5 |       1.31 | [-1.54,  4.16] | 0.95 |   1.37 | 0.517 
#> setosa Petal.Width2.5     |  virginica Petal.Width2.5 |       2.04 | [-0.71,  4.79] | 0.92 |   2.21 | 0.142 
#> versicolor Petal.Width0.1 |     setosa Petal.Width2.5 |      -3.84 | [-6.69, -0.98] | 0.96 |  -4.01 | < .001
#> versicolor Petal.Width0.1 | versicolor Petal.Width2.5 |      -2.53 | [-4.08, -0.98] | 0.52 |  -4.86 | < .001
#> versicolor Petal.Width0.1 |  virginica Petal.Width0.1 |      -0.28 | [-1.49,  0.93] | 0.41 |  -0.69 | 0.984 
#> versicolor Petal.Width0.1 |  virginica Petal.Width2.5 |      -1.80 | [-2.64, -0.95] | 0.28 |  -6.35 | < .001
#> versicolor Petal.Width2.5 |  virginica Petal.Width2.5 |       0.73 | [-0.08,  1.55] | 0.27 |   2.70 | 0.055 
#> virginica Petal.Width0.1  |     setosa Petal.Width2.5 |      -3.56 | [-6.44, -0.67] | 0.97 |  -3.68 | 0.003 
#> virginica Petal.Width0.1  | versicolor Petal.Width2.5 |      -2.25 | [-3.44, -1.06] | 0.40 |  -5.64 | < .001
#> virginica Petal.Width0.1  |  virginica Petal.Width2.5 |      -1.52 | [-2.63, -0.40] | 0.37 |  -4.04 | < .001
#> 
#> Marginal contrasts estimated at Species, Petal.Width
#> p-value adjustment method: Holm (1979)

# Or with custom specifications
estimate_contrasts(model, contrast = c("Species", "Petal.Width=c(1, 2)"))
#> Marginal Contrasts Analysis
#> 
#> Level1                  |                  Level2 | Difference |         95% CI |   SE | t(144) |      p
#> --------------------------------------------------------------------------------------------------------
#> setosa Petal.Width1     |     setosa Petal.Width2 |      -0.84 | [-2.05,  0.38] | 0.41 |  -2.06 | 0.166 
#> setosa Petal.Width1     | versicolor Petal.Width1 |       1.63 | [ 0.68,  2.59] | 0.32 |   5.09 | < .001
#> setosa Petal.Width1     | versicolor Petal.Width2 |       0.58 | [-0.45,  1.61] | 0.35 |   1.68 | 0.191 
#> setosa Petal.Width1     |  virginica Petal.Width1 |       1.73 | [ 0.68,  2.78] | 0.35 |   4.93 | < .001
#> setosa Petal.Width1     |  virginica Petal.Width2 |       1.10 | [ 0.17,  2.04] | 0.31 |   3.52 | 0.005 
#> setosa Petal.Width2     | versicolor Petal.Width2 |       1.42 | [-0.77,  3.60] | 0.73 |   1.94 | 0.166 
#> setosa Petal.Width2     |  virginica Petal.Width2 |       1.94 | [-0.20,  4.08] | 0.72 |   2.71 | 0.038 
#> versicolor Petal.Width1 |     setosa Petal.Width2 |      -2.47 | [-4.62, -0.32] | 0.72 |  -3.43 | 0.005 
#> versicolor Petal.Width1 | versicolor Petal.Width2 |      -1.05 | [-1.70, -0.41] | 0.22 |  -4.86 | < .001
#> versicolor Petal.Width1 |  virginica Petal.Width1 |       0.10 | [-0.45,  0.65] | 0.19 |   0.54 | 0.589 
#> versicolor Petal.Width1 |  virginica Petal.Width2 |      -0.53 | [-0.81, -0.25] | 0.09 |  -5.72 | < .001
#> versicolor Petal.Width2 |  virginica Petal.Width2 |       0.52 | [ 0.05,  0.99] | 0.16 |   3.31 | 0.007 
#> virginica Petal.Width1  |     setosa Petal.Width2 |      -2.57 | [-4.76, -0.38] | 0.73 |  -3.50 | 0.005 
#> virginica Petal.Width1  | versicolor Petal.Width2 |      -1.15 | [-1.83, -0.48] | 0.23 |  -5.13 | < .001
#> virginica Petal.Width1  |  virginica Petal.Width2 |      -0.63 | [-1.10, -0.17] | 0.16 |  -4.04 | < .001
#> 
#> Marginal contrasts estimated at Species, Petal.Width
#> p-value adjustment method: Holm (1979)

# Can fixate the numeric at a specific value
estimate_contrasts(model, fixed = "Petal.Width")
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
#> Marginal Contrasts Analysis
#> 
#> Level1     |     Level2 | Petal.Width | Difference |        95% CI |   SE | t(144) |      p
#> -------------------------------------------------------------------------------------------
#> setosa     | versicolor |        1.20 |       1.59 | [ 0.64, 2.54] | 0.39 |   4.04 | < .001
#> setosa     |  virginica |        1.20 |       1.77 | [ 0.77, 2.78] | 0.41 |   4.29 | < .001
#> versicolor |  virginica |        1.20 |       0.18 | [-0.17, 0.54] | 0.15 |   1.27 | 0.205 
#> 
#> Marginal contrasts estimated at Species
#> p-value adjustment method: Holm (1979)

# Or modulate it
estimate_contrasts(model, at = "Petal.Width", length = 4)
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
#> Marginal Contrasts Analysis
#> 
#> Level1     |     Level2 | Petal.Width | Difference |        95% CI |   SE | t(144) |      p
#> -------------------------------------------------------------------------------------------
#> setosa     | versicolor |        0.10 |       1.83 | [ 1.15, 2.50] | 0.28 |   6.55 | < .001
#> setosa     | versicolor |        0.90 |       1.65 | [ 0.96, 2.35] | 0.29 |   5.74 | < .001
#> setosa     | versicolor |        1.70 |       1.48 | [ 0.03, 2.94] | 0.60 |   2.47 | 0.015 
#> setosa     | versicolor |        2.50 |       1.31 | [-1.00, 3.62] | 0.95 |   1.37 | 0.172 
#> setosa     |  virginica |        0.10 |       1.55 | [ 0.79, 2.30] | 0.31 |   4.95 | < .001
#> setosa     |  virginica |        0.90 |       1.71 | [ 0.93, 2.50] | 0.32 |   5.28 | < .001
#> setosa     |  virginica |        1.70 |       1.88 | [ 0.43, 3.32] | 0.60 |   3.14 | 0.004 
#> setosa     |  virginica |        2.50 |       2.04 | [-0.19, 4.28] | 0.92 |   2.21 | 0.057 
#> versicolor |  virginica |        0.10 |      -0.28 | [-1.26, 0.70] | 0.41 |  -0.69 | 0.492 
#> versicolor |  virginica |        0.90 |       0.06 | [-0.44, 0.56] | 0.21 |   0.28 | 0.780 
#> versicolor |  virginica |        1.70 |       0.40 | [ 0.12, 0.67] | 0.11 |   3.50 | 0.002 
#> versicolor |  virginica |        2.50 |       0.73 | [ 0.08, 1.39] | 0.27 |   2.70 | 0.023 
#> 
#> Marginal contrasts estimated at Species
#> p-value adjustment method: Holm (1979)

# Standardized differences
estimated <- estimate_contrasts(lm(Sepal.Width ~ Species, data = iris))
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
standardize(estimated)
#> Marginal Contrasts Analysis (standardized)
#> 
#> Level1     |     Level2 | Difference |         95% CI |   SE | t(147) |      p
#> ------------------------------------------------------------------------------
#> setosa     | versicolor |       1.51 | [ 1.13,  1.89] | 0.16 |   9.69 | < .001
#> setosa     |  virginica |       1.04 | [ 0.66,  1.42] | 0.16 |   6.68 | < .001
#> versicolor |  virginica |      -0.47 | [-0.85, -0.09] | 0.16 |  -3.00 | 0.003 
#> 
#> Marginal contrasts estimated at Species
#> p-value adjustment method: Holm (1979)
# Other models (mixed, Bayesian, ...)
data <- iris
data$Petal.Length_factor <- ifelse(data$Petal.Length < 4.2, "A", "B")

model <- lme4::lmer(Sepal.Width ~ Species + (1 | Petal.Length_factor), data = data)
estimate_contrasts(model)
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
#> Marginal Contrasts Analysis
#> 
#> Level1     |     Level2 | Difference |        95% CI |   SE |     df |     t |      p
#> -------------------------------------------------------------------------------------
#> setosa     | versicolor |       0.87 | [ 0.65, 1.09] | 0.09 | 135.61 |  9.54 | < .001
#> setosa     |  virginica |       0.80 | [ 0.50, 1.09] | 0.12 | 118.54 |  6.52 | < .001
#> versicolor |  virginica |      -0.07 | [-0.26, 0.11] | 0.08 | 145.27 | -0.97 | 0.334 
#> 
#> Marginal contrasts estimated at Species
#> p-value adjustment method: Holm (1979)
library(rstanarm)

data <- mtcars
data$cyl <- as.factor(data$cyl)
data$am <- as.factor(data$am)
# \dontrun{
model <- stan_glm(mpg ~ cyl * am, data = data, refresh = 0)
estimate_contrasts(model)
#> Warning: Could not recover model data from environment. Please make sure your
#>   data is available in your workspace.
#>   Trying to retrieve data from the model frame now.
#> No variable was specified for contrast estimation. Selecting `contrast = "cyl"`.
#> NOTE: Results may be misleading due to involvement in interactions
#> Marginal Contrasts Analysis
#> 
#> Level1 | Level2 | Difference |        95% CI |     pd | % in ROPE
#> -----------------------------------------------------------------
#> cyl4   |   cyl6 |       5.62 | [2.50,  8.92] | 99.92% |        0%
#> cyl4   |   cyl8 |      10.23 | [7.10, 13.35] |   100% |        0%
#> cyl6   |   cyl8 |       4.63 | [1.25,  7.92] | 99.65% |        0%
#> 
#> Marginal contrasts estimated at cyl
estimate_contrasts(model, fixed = "am")
#> Warning: Could not recover model data from environment. Please make sure your
#>   data is available in your workspace.
#>   Trying to retrieve data from the model frame now.
#> No variable was specified for contrast estimation. Selecting `contrast = "cyl"`.
#> Marginal Contrasts Analysis
#> 
#> Level1 | Level2 | am | Difference |         95% CI |     pd | % in ROPE
#> -----------------------------------------------------------------------
#> cyl4   |   cyl6 |  0 |       3.76 | [-0.91,  8.36] | 94.35% |     0.82%
#> cyl4   |   cyl8 |  0 |       7.83 | [ 3.97, 11.84] | 99.95% |        0%
#> cyl6   |   cyl8 |  0 |       4.05 | [ 0.53,  7.67] | 98.80% |        0%
#> 
#> Marginal contrasts estimated at cyl

model <- stan_glm(mpg ~ cyl * wt, data = data, refresh = 0)
estimate_contrasts(model)
#> Warning: Could not recover model data from environment. Please make sure your
#>   data is available in your workspace.
#>   Trying to retrieve data from the model frame now.
#> No variable was specified for contrast estimation. Selecting `contrast = "cyl"`.
#> NOTE: Results may be misleading due to involvement in interactions
#> Marginal Contrasts Analysis
#> 
#> Level1 | Level2 | Difference |        95% CI |     pd | % in ROPE
#> -----------------------------------------------------------------
#> cyl4   |   cyl6 |       2.18 | [-1.28, 5.90] | 89.30% |     2.00%
#> cyl4   |   cyl8 |       4.76 | [ 1.33, 8.42] | 99.67% |        0%
#> cyl6   |   cyl8 |       2.59 | [-0.25, 5.30] | 96.50% |     0.82%
#> 
#> Marginal contrasts estimated at cyl
estimate_contrasts(model, fixed = "wt")
#> Warning: Could not recover model data from environment. Please make sure your
#>   data is available in your workspace.
#>   Trying to retrieve data from the model frame now.
#> No variable was specified for contrast estimation. Selecting `contrast = "cyl"`.
#> Marginal Contrasts Analysis
#> 
#> Level1 | Level2 |   wt | Difference |        95% CI |     pd | % in ROPE
#> ------------------------------------------------------------------------
#> cyl4   |   cyl6 | 3.22 |       2.18 | [-1.28, 5.90] | 89.30% |     2.00%
#> cyl4   |   cyl8 | 3.22 |       4.76 | [ 1.33, 8.42] | 99.67% |        0%
#> cyl6   |   cyl8 | 3.22 |       2.59 | [-0.25, 5.30] | 96.50% |     0.82%
#> 
#> Marginal contrasts estimated at cyl
estimate_contrasts(model, at = "wt", length = 4)
#> Warning: Could not recover model data from environment. Please make sure your
#>   data is available in your workspace.
#>   Trying to retrieve data from the model frame now.
#> No variable was specified for contrast estimation. Selecting `contrast = "cyl"`.
#> Marginal Contrasts Analysis
#> 
#> Level1 | Level2 |   wt | Difference |          95% CI |     pd | % in ROPE
#> --------------------------------------------------------------------------
#> cyl4   |   cyl6 | 1.51 |       6.04 | [ -2.87, 15.07] | 90.42% |     0.61%
#> cyl4   |   cyl8 | 1.51 |       9.99 | [  4.63, 15.28] |   100% |        0%
#> cyl6   |   cyl8 | 1.51 |       3.94 | [ -5.97, 13.89] | 78.67% |     1.50%
#> cyl4   |   cyl6 | 2.82 |       3.11 | [ -0.21,  6.33] | 96.85% |     0.92%
#> cyl4   |   cyl8 | 2.82 |       6.00 | [  2.70,  9.40] | 99.92% |        0%
#> cyl6   |   cyl8 | 2.82 |       2.90 | [ -0.63,  6.41] | 94.80% |     1.16%
#> cyl4   |   cyl6 | 4.12 |       0.17 | [ -7.15,  7.94] | 51.85% |     2.42%
#> cyl4   |   cyl8 | 4.12 |       2.02 | [ -3.39,  7.41] | 77.33% |     2.32%
#> cyl6   |   cyl8 | 4.12 |       1.84 | [ -4.11,  7.51] | 74.08% |     2.63%
#> cyl4   |   cyl6 | 5.42 |      -2.75 | [-17.02, 12.35] | 65.20% |     1.11%
#> cyl4   |   cyl8 | 5.42 |      -1.97 | [-11.25,  7.27] | 67.30% |     1.66%
#> cyl6   |   cyl8 | 5.42 |       0.78 | [-12.25, 12.98] | 54.70% |     1.53%
#> 
#> Marginal contrasts estimated at cyl

model <- stan_glm(Sepal.Width ~ Species + Petal.Width + Petal.Length, data = iris, refresh = 0)
estimate_contrasts(model, at = "Petal.Length", test = "bf")
#> No variable was specified for contrast estimation. Selecting `contrast = "Species"`.
#> Warning: Prior not specified! Please provide the original model to get meaningful results.
#> Warning: Bayes factors might not be precise.
#> For precise Bayes factors, sampling at least 40,000 posterior samples is recommended.
#> Marginal Contrasts Analysis
#> 
#> Level1     |     Level2 | Petal.Length | Difference |       95% CI |   BF
#> -------------------------------------------------------------------------
#> setosa     | versicolor |         1.00 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         1.00 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         1.00 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         1.66 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         1.66 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         1.66 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         2.31 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         2.31 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         2.31 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         2.97 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         2.97 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         2.97 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         3.62 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         3.62 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         3.62 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         4.28 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         4.28 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         4.28 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         4.93 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         4.93 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         4.93 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         5.59 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         5.59 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         5.59 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         6.24 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         6.24 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         6.24 |       0.41 | [0.20, 0.62] | 1.00
#> setosa     | versicolor |         6.90 |       1.72 | [1.36, 2.06] | 1.00
#> setosa     |  virginica |         6.90 |       2.13 | [1.61, 2.64] | 1.00
#> versicolor |  virginica |         6.90 |       0.41 | [0.20, 0.62] | 1.00
#> 
#> Marginal contrasts estimated at Species
# }