Debian Codegraph @

man/tidy.ivreg.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/aer.R
3 \name{tidy.ivreg}
4 \alias{tidy.ivreg}
5 \alias{ivreg_tidiers}
6 \alias{aer_tidiers}
7 \title{Tidy a(n) ivreg object}
8 \usage{
9 \method{tidy}{ivreg}(x, conf.int = FALSE, conf.level = 0.95, instruments = FALSE, ...)
10 }
11 \arguments{
12 \item{x}{An \code{ivreg} object created by a call to \code{\link[AER:ivreg]{AER::ivreg()}}.}
13
14 \item{conf.int}{Logical indicating whether or not to include a confidence
15 interval in the tidied output. Defaults to \code{FALSE}.}
16
17 \item{conf.level}{The confidence level to use for the confidence interval
18 if \code{conf.int = TRUE}. Must be strictly greater than 0 and less than 1.
19 Defaults to 0.95, which corresponds to a 95 percent confidence interval.}
20
21 \item{instruments}{Logical indicating whether to return
22 coefficients from the second-stage or diagnostics tests for
23 each endogenous regressor (F-statistics). Defaults to \code{FALSE}.}
24
25 \item{...}{Additional arguments. Not used. Needed to match generic
26 signature only. \strong{Cautionary note:} Misspelled arguments will be
27 absorbed in \code{...}, where they will be ignored. If the misspelled
28 argument has a default value, the default value will be used.
29 For example, if you pass \code{conf.lvel = 0.9}, all computation will
30 proceed using \code{conf.level = 0.95}. Two exceptions here are:
31 \itemize{
32 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
33 it will be ignored.
34 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
35 will be ignored.
36 }}
37 }
38 \description{
39 Tidy summarizes information about the components of a model.
40 A model component might be a single term in a regression, a single
41 hypothesis, a cluster, or a class. Exactly what tidy considers to be a
42 model component varies across models but is usually self-evident.
43 If a model has several distinct types of components, you will need to
44 specify which components to return.
45 }
46 \details{
47 This tidier currently only supports \code{ivreg}-classed objects
48 outputted by the \code{AER} package. The \code{ivreg} package also outputs
49 objects of class \code{ivreg}, and will be supported in a later release.
50 }
51 \examples{
52 \dontshow{if (rlang::is_installed("AER")) withAutoprint(\{ # examplesIf}
53
54 # load libraries for models and data
55 library(AER)
56
57 # load data
58 data("CigarettesSW", package = "AER")
59
60 # fit model
61 ivr <- ivreg(
62 log(packs) ~ income | population,
63 data = CigarettesSW,
64 subset = year == "1995"
65 )
66
67 # summarize model fit with tidiers
68 tidy(ivr)
69 tidy(ivr, conf.int = TRUE)
70 tidy(ivr, conf.int = TRUE, instruments = TRUE)
71
72 augment(ivr)
73 augment(ivr, data = CigarettesSW)
74 augment(ivr, newdata = CigarettesSW)
75
76 glance(ivr)
77 \dontshow{\}) # examplesIf}
78 }
79 \seealso{
80 \code{\link[=tidy]{tidy()}}, \code{\link[AER:ivreg]{AER::ivreg()}}
81
82 Other ivreg tidiers:
83 \code{\link{augment.ivreg}()},
84 \code{\link{glance.ivreg}()}
85 }
86 \concept{ivreg tidiers}
87 \value{
88 A \code{\link[tibble:tibble]{tibble::tibble()}} with columns:
89 \item{conf.high}{Upper bound on the confidence interval for the estimate.}
90 \item{conf.low}{Lower bound on the confidence interval for the estimate.}
91 \item{estimate}{The estimated value of the regression term.}
92 \item{p.value}{The two-sided p-value associated with the observed statistic.}
93 \item{p.value.Sargan}{p-value for Sargan test of overidentifying restrictions.}
94 \item{p.value.weakinst}{p-value for weak instruments test.}
95 \item{p.value.Wu.Hausman}{p-value for Wu-Hausman weak instruments test for endogeneity.}
96 \item{statistic}{The value of a T-statistic to use in a hypothesis that the regression term is non-zero.}
97 \item{statistic.Sargan}{Statistic for Sargan test of overidentifying restrictions.}
98 \item{statistic.weakinst}{Statistic for Wu-Hausman test.}
99 \item{statistic.Wu.Hausman}{Statistic for Wu-Hausman weak instruments test for endogeneity.}
100 \item{std.error}{The standard error of the regression term.}
101 \item{term}{The name of the regression term.}
102
103 }