| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/multcomp.R |
| 3 |
\name{tidy.glht} |
| 4 |
\alias{tidy.glht} |
| 5 |
\alias{multcomp_tidiers} |
| 6 |
\title{Tidy a(n) glht object} |
| 7 |
\usage{ |
| 8 |
\method{tidy}{glht}(x, conf.int = FALSE, conf.level = 0.95, ...) |
| 9 |
} |
| 10 |
\arguments{ |
| 11 |
\item{x}{A \code{glht} object returned by \code{\link[multcomp:glht]{multcomp::glht()}}.} |
| 12 |
|
| 13 |
\item{conf.int}{Logical indicating whether or not to include a confidence |
| 14 |
interval in the tidied output. Defaults to \code{FALSE}.} |
| 15 |
|
| 16 |
\item{conf.level}{The confidence level to use for the confidence interval |
| 17 |
if \code{conf.int = TRUE}. Must be strictly greater than 0 and less than 1. |
| 18 |
Defaults to 0.95, which corresponds to a 95 percent confidence interval.} |
| 19 |
|
| 20 |
\item{...}{Additional arguments passed to \code{\link[=summary]{summary()}} and |
| 21 |
\code{\link[=tidy.summary.glht]{tidy.summary.glht()}}.} |
| 22 |
} |
| 23 |
\description{ |
| 24 |
Tidy summarizes information about the components of a model. |
| 25 |
A model component might be a single term in a regression, a single |
| 26 |
hypothesis, a cluster, or a class. Exactly what tidy considers to be a |
| 27 |
model component varies across models but is usually self-evident. |
| 28 |
If a model has several distinct types of components, you will need to |
| 29 |
specify which components to return. |
| 30 |
} |
| 31 |
\examples{ |
| 32 |
\dontshow{if (rlang::is_installed(c("multcomp", "ggplot2"))) withAutoprint(\{ # examplesIf} |
| 33 |
|
| 34 |
# load libraries for models and data |
| 35 |
library(multcomp) |
| 36 |
library(ggplot2) |
| 37 |
|
| 38 |
amod <- aov(breaks ~ wool + tension, data = warpbreaks) |
| 39 |
wht <- glht(amod, linfct = mcp(tension = "Tukey")) |
| 40 |
|
| 41 |
tidy(wht) |
| 42 |
|
| 43 |
ggplot(wht, aes(lhs, estimate)) + |
| 44 |
geom_point() |
| 45 |
|
| 46 |
CI <- confint(wht) |
| 47 |
|
| 48 |
tidy(CI) |
| 49 |
|
| 50 |
ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + |
| 51 |
geom_pointrange() |
| 52 |
|
| 53 |
tidy(summary(wht)) |
| 54 |
ggplot(mapping = aes(lhs, estimate)) + |
| 55 |
geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + |
| 56 |
geom_point(aes(size = p), data = summary(wht)) + |
| 57 |
scale_size(trans = "reverse") |
| 58 |
|
| 59 |
cld <- cld(wht) |
| 60 |
tidy(cld) |
| 61 |
\dontshow{\}) # examplesIf} |
| 62 |
} |
| 63 |
\seealso{ |
| 64 |
\code{\link[=tidy]{tidy()}}, \code{\link[multcomp:glht]{multcomp::glht()}} |
| 65 |
|
| 66 |
Other multcomp tidiers: |
| 67 |
\code{\link{tidy.cld}()}, |
| 68 |
\code{\link{tidy.confint.glht}()}, |
| 69 |
\code{\link{tidy.summary.glht}()} |
| 70 |
} |
| 71 |
\concept{multcomp tidiers} |
| 72 |
\value{ |
| 73 |
A \code{\link[tibble:tibble]{tibble::tibble()}} with columns: |
| 74 |
\item{contrast}{Levels being compared.} |
| 75 |
\item{estimate}{The estimated value of the regression term.} |
| 76 |
\item{null.value}{Value to which the estimate is compared.} |
| 77 |
|
| 78 |
} |