Debian Codegraph @

man/glance.anova.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/stats-anova.R
3 \name{glance.anova}
4 \alias{glance.anova}
5 \title{Glance at a(n) anova object}
6 \usage{
7 \method{glance}{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 Glance accepts a model object and returns a \code{\link[tibble:tibble]{tibble::tibble()}}
28 with exactly one row of model summaries. The summaries are typically
29 goodness of fit measures, p-values for hypothesis tests on residuals,
30 or model convergence information.
31
32 Glance never returns information from the original call to the modeling
33 function. This includes the name of the modeling function or any
34 arguments passed to the modeling function.
35
36 Glance does not calculate summary measures. Rather, it farms out these
37 computations to appropriate methods and gathers the results together.
38 Sometimes a goodness of fit measure will be undefined. In these cases
39 the measure will be reported as \code{NA}.
40
41 Glance returns the same number of columns regardless of whether the
42 model matrix is rank-deficient or not. If so, entries in columns
43 that no longer have a well-defined value are filled in with an \code{NA}
44 of the appropriate type.
45 }
46 \note{
47 Note that the output of \code{glance.anova()} will vary depending on the initializing
48 anova call. In some cases, it will just return an empty data frame. In other
49 cases, \code{glance.anova()} may return columns that are also common to
50 \code{tidy.anova()}. This is partly to preserve backwards compatibility with early
51 versions of \code{broom}, but also because the underlying anova model yields
52 components that could reasonably be interpreted as goodness-of-fit summaries
53 too.
54 }
55 \examples{
56 \dontshow{if (FALSE) withAutoprint(\{ # examplesIf}
57
58 # fit models
59 a <- lm(mpg ~ wt + qsec + disp, mtcars)
60 b <- lm(mpg ~ wt + qsec, mtcars)
61
62 mod <- anova(a, b)
63
64 # summarize model fit with tidiers
65 tidy(mod)
66 glance(mod)
67
68 # car::linearHypothesis() example
69 library(car)
70 mod_lht <- linearHypothesis(a, "wt - disp")
71 tidy(mod_lht)
72 glance(mod_lht)
73 \dontshow{\}) # examplesIf}
74 }
75 \seealso{
76 \code{\link[=glance]{glance()}}
77
78 Other anova tidiers:
79 \code{\link{glance.aov}()},
80 \code{\link{tidy.TukeyHSD}()},
81 \code{\link{tidy.anova}()},
82 \code{\link{tidy.aov}()},
83 \code{\link{tidy.aovlist}()},
84 \code{\link{tidy.manova}()}
85 }
86 \concept{anova tidiers}
87 \value{
88 A \code{\link[tibble:tibble]{tibble::tibble()}} with exactly one row and columns:
89 \item{deviance}{Deviance of the model.}
90 \item{df.residual}{Residual degrees of freedom.}
91
92 }