Debian Codegraph @

man/tidy.anova.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/stats-anova.R
3 \name{tidy.anova}
4 \alias{tidy.anova}
5 \title{Tidy a(n) anova object}
6 \usage{
7 \method{tidy}{anova}(x, ...)
8 }
9 \arguments{
10 \item{x}{An \code{anova} object, such as those created by \code{\link[stats:anova]{stats::anova()}},
11 \code{\link[car:Anova]{car::Anova()}}, \code{\link[car:leveneTest]{car::leveneTest()}}, or \code{\link[car:linearHypothesis]{car::linearHypothesis()}}.}
12
13 \item{...}{Additional arguments. Not used. Needed to match generic
14 signature only. \strong{Cautionary note:} Misspelled arguments will be
15 absorbed in \code{...}, where they will be ignored. If the misspelled
16 argument has a default value, the default value will be used.
17 For example, if you pass \code{conf.lvel = 0.9}, all computation will
18 proceed using \code{conf.level = 0.95}. Two exceptions here are:
19 \itemize{
20 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
21 it will be ignored.
22 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
23 will be ignored.
24 }}
25 }
26 \description{
27 Tidy summarizes information about the components of a model.
28 A model component might be a single term in a regression, a single
29 hypothesis, a cluster, or a class. Exactly what tidy considers to be a
30 model component varies across models but is usually self-evident.
31 If a model has several distinct types of components, you will need to
32 specify which components to return.
33 }
34 \details{
35 The \code{term} column of an ANOVA table can come with leading or
36 trailing whitespace, which this tidying method trims.
37
38 For documentation on the tidier for \code{\link[car:leveneTest]{car::leveneTest()}} output, see
39 \code{\link[=tidy.leveneTest]{tidy.leveneTest()}}
40 }
41 \examples{
42 \dontshow{if (FALSE) withAutoprint(\{ # examplesIf}
43
44 # fit models
45 a <- lm(mpg ~ wt + qsec + disp, mtcars)
46 b <- lm(mpg ~ wt + qsec, mtcars)
47
48 mod <- anova(a, b)
49
50 # summarize model fit with tidiers
51 tidy(mod)
52 glance(mod)
53
54 # car::linearHypothesis() example
55 library(car)
56 mod_lht <- linearHypothesis(a, "wt - disp")
57 tidy(mod_lht)
58 glance(mod_lht)
59 \dontshow{\}) # examplesIf}
60 }
61 \seealso{
62 \code{\link[=tidy]{tidy()}}, \code{\link[stats:anova]{stats::anova()}}, \code{\link[car:Anova]{car::Anova()}}, \code{\link[car:leveneTest]{car::leveneTest()}}
63
64 Other anova tidiers:
65 \code{\link{glance.anova}()},
66 \code{\link{glance.aov}()},
67 \code{\link{tidy.TukeyHSD}()},
68 \code{\link{tidy.aov}()},
69 \code{\link{tidy.aovlist}()},
70 \code{\link{tidy.manova}()}
71 }
72 \concept{anova tidiers}
73 \value{
74 A \code{\link[tibble:tibble]{tibble::tibble()}} with columns:
75 \item{df}{Degrees of freedom used by this term in the model.}
76 \item{meansq}{Mean sum of squares. Equal to total sum of squares divided by degrees of freedom.}
77 \item{p.value}{The two-sided p-value associated with the observed statistic.}
78 \item{statistic}{The value of a T-statistic to use in a hypothesis that the regression term is non-zero.}
79 \item{sumsq}{Sum of squares explained by this term.}
80 \item{term}{The name of the regression term.}
81
82 }