Debian Codegraph @

man/glance.ivreg.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/aer.R
3 \name{glance.ivreg}
4 \alias{glance.ivreg}
5 \title{Glance at a(n) ivreg object}
6 \usage{
7 \method{glance}{ivreg}(x, diagnostics = FALSE, ...)
8 }
9 \arguments{
10 \item{x}{An \code{ivreg} object created by a call to \code{\link[AER:ivreg]{AER::ivreg()}}.}
11
12 \item{diagnostics}{Logical indicating whether or not to return the
13 Wu-Hausman and Sargan diagnostic information.}
14
15 \item{...}{Additional arguments. Not used. Needed to match generic
16 signature only. \strong{Cautionary note:} Misspelled arguments will be
17 absorbed in \code{...}, where they will be ignored. If the misspelled
18 argument has a default value, the default value will be used.
19 For example, if you pass \code{conf.lvel = 0.9}, all computation will
20 proceed using \code{conf.level = 0.95}. Two exceptions here are:
21 \itemize{
22 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
23 it will be ignored.
24 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
25 will be ignored.
26 }}
27 }
28 \description{
29 Glance accepts a model object and returns a \code{\link[tibble:tibble]{tibble::tibble()}}
30 with exactly one row of model summaries. The summaries are typically
31 goodness of fit measures, p-values for hypothesis tests on residuals,
32 or model convergence information.
33
34 Glance never returns information from the original call to the modeling
35 function. This includes the name of the modeling function or any
36 arguments passed to the modeling function.
37
38 Glance does not calculate summary measures. Rather, it farms out these
39 computations to appropriate methods and gathers the results together.
40 Sometimes a goodness of fit measure will be undefined. In these cases
41 the measure will be reported as \code{NA}.
42
43 Glance returns the same number of columns regardless of whether the
44 model matrix is rank-deficient or not. If so, entries in columns
45 that no longer have a well-defined value are filled in with an \code{NA}
46 of the appropriate type.
47 }
48 \details{
49 This tidier currently only supports \code{ivreg}-classed objects
50 outputted by the \code{AER} package. The \code{ivreg} package also outputs
51 objects of class \code{ivreg}, and will be supported in a later release.
52 }
53 \note{
54 Beginning 0.7.0, \code{glance.ivreg} returns statistics for the
55 Wu-Hausman test for endogeneity and the Sargan test of
56 overidentifying restrictions. Sargan test values are returned as \code{NA}
57 if the number of instruments is not greater than the number of
58 endogenous regressors.
59 }
60 \examples{
61 \dontshow{if (rlang::is_installed("AER")) withAutoprint(\{ # examplesIf}
62
63 # load libraries for models and data
64 library(AER)
65
66 # load data
67 data("CigarettesSW", package = "AER")
68
69 # fit model
70 ivr <- ivreg(
71 log(packs) ~ income | population,
72 data = CigarettesSW,
73 subset = year == "1995"
74 )
75
76 # summarize model fit with tidiers
77 tidy(ivr)
78 tidy(ivr, conf.int = TRUE)
79 tidy(ivr, conf.int = TRUE, instruments = TRUE)
80
81 augment(ivr)
82 augment(ivr, data = CigarettesSW)
83 augment(ivr, newdata = CigarettesSW)
84
85 glance(ivr)
86 \dontshow{\}) # examplesIf}
87 }
88 \seealso{
89 \code{\link[=glance]{glance()}}, \code{\link[AER:ivreg]{AER::ivreg()}}
90
91 Other ivreg tidiers:
92 \code{\link{augment.ivreg}()},
93 \code{\link{tidy.ivreg}()}
94 }
95 \concept{ivreg tidiers}
96 \value{
97 A \code{\link[tibble:tibble]{tibble::tibble()}} with exactly one row and columns:
98 \item{adj.r.squared}{Adjusted R squared statistic, which is like the R squared statistic except taking degrees of freedom into account.}
99 \item{df}{Degrees of freedom used by the model.}
100 \item{df.residual}{Residual degrees of freedom.}
101 \item{nobs}{Number of observations used.}
102 \item{r.squared}{R squared statistic, or the percent of variation explained by the model. Also known as the coefficient of determination.}
103 \item{sigma}{Estimated standard error of the residuals.}
104 \item{statistic}{Wald test statistic.}
105 \item{p.value}{P-value for the Wald test.}
106
107 }