Debian Codegraph @

man/glance.lmodel2.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/lmodel2.R
3 \name{glance.lmodel2}
4 \alias{glance.lmodel2}
5 \title{Glance at a(n) lmodel2 object}
6 \usage{
7 \method{glance}{lmodel2}(x, ...)
8 }
9 \arguments{
10 \item{x}{A \code{lmodel2} object returned by \code{\link[lmodel2:lmodel2]{lmodel2::lmodel2()}}.}
11
12 \item{...}{Additional arguments. Not used. Needed to match generic
13 signature only. \strong{Cautionary note:} Misspelled arguments will be
14 absorbed in \code{...}, where they will be ignored. If the misspelled
15 argument has a default value, the default value will be used.
16 For example, if you pass \code{conf.lvel = 0.9}, all computation will
17 proceed using \code{conf.level = 0.95}. Two exceptions here are:
18 \itemize{
19 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
20 it will be ignored.
21 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
22 will be ignored.
23 }}
24 }
25 \description{
26 Glance accepts a model object and returns a \code{\link[tibble:tibble]{tibble::tibble()}}
27 with exactly one row of model summaries. The summaries are typically
28 goodness of fit measures, p-values for hypothesis tests on residuals,
29 or model convergence information.
30
31 Glance never returns information from the original call to the modeling
32 function. This includes the name of the modeling function or any
33 arguments passed to the modeling function.
34
35 Glance does not calculate summary measures. Rather, it farms out these
36 computations to appropriate methods and gathers the results together.
37 Sometimes a goodness of fit measure will be undefined. In these cases
38 the measure will be reported as \code{NA}.
39
40 Glance returns the same number of columns regardless of whether the
41 model matrix is rank-deficient or not. If so, entries in columns
42 that no longer have a well-defined value are filled in with an \code{NA}
43 of the appropriate type.
44 }
45 \examples{
46 \dontshow{if (rlang::is_installed(c("lmodel2", "ggplot2"))) withAutoprint(\{ # examplesIf}
47
48 # load libraries for models and data
49 library(lmodel2)
50
51 data(mod2ex2)
52 Ex2.res <- lmodel2(Prey ~ Predators, data = mod2ex2, "relative", "relative", 99)
53 Ex2.res
54
55 # summarize model fit with tidiers + visualization
56 tidy(Ex2.res)
57 glance(Ex2.res)
58
59 # this allows coefficient plots with ggplot2
60 library(ggplot2)
61
62 ggplot(tidy(Ex2.res), aes(estimate, term, color = method)) +
63 geom_point() +
64 geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) +
65 geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))
66 \dontshow{\}) # examplesIf}
67 }
68 \seealso{
69 \code{\link[=glance]{glance()}}, \code{\link[lmodel2:lmodel2]{lmodel2::lmodel2()}}
70
71 Other lmodel2 tidiers:
72 \code{\link{tidy.lmodel2}()}
73 }
74 \concept{lmodel2 tidiers}
75 \value{
76 A \code{\link[tibble:tibble]{tibble::tibble()}} with exactly one row and columns:
77 \item{nobs}{Number of observations used.}
78 \item{p.value}{P-value corresponding to the test statistic.}
79 \item{r.squared}{R squared statistic, or the percent of variation explained by the model. Also known as the coefficient of determination.}
80 \item{theta}{Angle between OLS lines `lm(y ~ x)` and `lm(x ~ y)`}
81 \item{H}{H statistic for computing confidence interval of major axis slope}
82
83 }