
```{r}
#| label = "getLibs"
library(multcomp)
library(tidyverse)
library(knitr)
library(broom)
```

## Dunnett's procedure for comparing all treatments with a control

```{r}
#| label = "{{DataName}}.Dunnett"
{{DataName}}.Dunnett = glht({{DataName}}.lm, linfct = mcp({{FactorName}} = "Dunnett"))
{{DataName}}.Dunnett |> tidy() |> kable(caption="Dunnett's multiple comparison procedure for the {{DataName}} data.)
```

```{r}
#| label = "getSummary"
{{DataName}}.Dunnett|> summary() |> tidy() |> kable(caption="Summary of Dunnett's multiple comparison procedure for the {{DataName}} data.)
```

```{r}
#| label = "getCLD"
{{DataName}}.Dunnett|> cld() |> tidy() |> kable(caption="Compact letter display of Dunnett's multiple comparison procedure for the {{DataName}} data.)
```

```{r}
#| label = "plot{{DataName}}.Dunnett",
#| fig.cap = "Plot of Dunnett's procedure for {{ResponseName}} grouped by
#| {{FactorName}}."
plot({{DataName}}.Dunnett)
```
