From c247eed8836e49b4503fff92a3819f83111a3234 Mon Sep 17 00:00:00 2001 From: simonpcouch Date: Mon, 21 Oct 2024 21:10:59 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tidymode?= =?UTF-8?q?ls/broom@e480deb74c8ea172e1d5e69630971c4b59bb43dd=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/news/index.html | 7 ++++++- dev/pkgdown.yml | 2 +- dev/reference/glance.cv.glmnet.html | 6 +++--- dev/reference/glance.glmnet.html | 8 ++++---- dev/reference/tidy.cv.glmnet.html | 6 +++--- dev/reference/tidy.glmnet.html | 8 ++++---- dev/search.json | 2 +- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/dev/news/index.html b/dev/news/index.html index cfa0c5d2a..789747be5 100644 --- a/dev/news/index.html +++ b/dev/news/index.html @@ -43,7 +43,12 @@

broom (development version)

-
diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 39dcd113b..7ef6f6e2b 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -9,7 +9,7 @@ articles: broom: broom.html kmeans: kmeans.html articles/maintenance: maintenance.html -last_built: 2024-10-21T20:34Z +last_built: 2024-10-21T21:06Z urls: reference: https://broom.tidymodels.org/reference article: https://broom.tidymodels.org/articles diff --git a/dev/reference/glance.cv.glmnet.html b/dev/reference/glance.cv.glmnet.html index c6e77e07c..f75c0b0a0 100644 --- a/dev/reference/glance.cv.glmnet.html +++ b/dev/reference/glance.cv.glmnet.html @@ -99,7 +99,7 @@

Argumentsx -

A cv.glmnet object returned from glmnet::cv.glmnet().

+

A cv.glmnet object returned from glmnet::cv.glmnet().

...
@@ -117,7 +117,7 @@

Arguments

See also

-

glance(), glmnet::cv.glmnet()

+

glance(), glmnet::cv.glmnet()

Other glmnet tidiers: glance.glmnet(), tidy.cv.glmnet(), @@ -155,7 +155,7 @@

Examplesbeta <- c(rnorm(real, 0, 1), rep(0, nvar - real)) y <- c(t(beta) %*% t(x)) + rnorm(nvar, sd = 3) -cvfit1 <- cv.glmnet(x, y) +cvfit1 <- cv.glmnet(x, y) tidy(cvfit1) #> # A tibble: 74 × 6 diff --git a/dev/reference/glance.glmnet.html b/dev/reference/glance.glmnet.html index f336830ea..2de67acb2 100644 --- a/dev/reference/glance.glmnet.html +++ b/dev/reference/glance.glmnet.html @@ -99,7 +99,7 @@

Argumentsx -

A glmnet object returned from glmnet::glmnet().

+

A glmnet object returned from glmnet::glmnet().

...
@@ -117,7 +117,7 @@

Arguments

See also

-

glance(), glmnet::glmnet()

+

glance(), glmnet::glmnet()

Other glmnet tidiers: glance.cv.glmnet(), tidy.cv.glmnet(), @@ -147,7 +147,7 @@

Examplesset.seed(2014) x <- matrix(rnorm(100 * 20), 100, 20) y <- rnorm(100) -fit1 <- glmnet(x, y) +fit1 <- glmnet(x, y) # summarize model fit with tidiers + visualization tidy(fit1) @@ -191,7 +191,7 @@

Examples # works for other types of regressions as well, such as logistic g2 <- sample(1:2, 100, replace = TRUE) -fit2 <- glmnet(x, g2, family = "binomial") +fit2 <- glmnet(x, g2, family = "binomial") tidy(fit2) #> # A tibble: 947 × 5 #> term step estimate lambda dev.ratio diff --git a/dev/reference/tidy.cv.glmnet.html b/dev/reference/tidy.cv.glmnet.html index ea6463c1c..ab9264ef1 100644 --- a/dev/reference/tidy.cv.glmnet.html +++ b/dev/reference/tidy.cv.glmnet.html @@ -72,7 +72,7 @@

Argumentsx -

A cv.glmnet object returned from glmnet::cv.glmnet().

+

A cv.glmnet object returned from glmnet::cv.glmnet().

...
@@ -90,7 +90,7 @@

Arguments

See also

-

tidy(), glmnet::cv.glmnet()

+

tidy(), glmnet::cv.glmnet()

Other glmnet tidiers: glance.cv.glmnet(), glance.glmnet(), @@ -139,7 +139,7 @@

Examplesbeta <- c(rnorm(real, 0, 1), rep(0, nvar - real)) y <- c(t(beta) %*% t(x)) + rnorm(nvar, sd = 3) -cvfit1 <- cv.glmnet(x, y) +cvfit1 <- cv.glmnet(x, y) tidy(cvfit1) #> # A tibble: 74 × 6 diff --git a/dev/reference/tidy.glmnet.html b/dev/reference/tidy.glmnet.html index cd3d3e69e..f79d3a5f2 100644 --- a/dev/reference/tidy.glmnet.html +++ b/dev/reference/tidy.glmnet.html @@ -72,7 +72,7 @@

Argumentsx -

A glmnet object returned from glmnet::glmnet().

+

A glmnet object returned from glmnet::glmnet().

return_zeros
@@ -106,7 +106,7 @@

Details

See also

-

tidy(), glmnet::glmnet()

+

tidy(), glmnet::glmnet()

Other glmnet tidiers: glance.cv.glmnet(), glance.glmnet(), @@ -142,7 +142,7 @@

Examplesset.seed(2014) x <- matrix(rnorm(100 * 20), 100, 20) y <- rnorm(100) -fit1 <- glmnet(x, y) +fit1 <- glmnet(x, y) # summarize model fit with tidiers + visualization tidy(fit1) @@ -186,7 +186,7 @@

Examples # works for other types of regressions as well, such as logistic g2 <- sample(1:2, 100, replace = TRUE) -fit2 <- glmnet(x, g2, family = "binomial") +fit2 <- glmnet(x, g2, family = "binomial") tidy(fit2) #> # A tibble: 947 × 5 #> term step estimate lambda dev.ratio diff --git a/dev/search.json b/dev/search.json index 9dfde349b..669dbf5a5 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to broom","title":"Contributing to broom","text":"outlines propose change broom. detailed info contributing package, tidyverse/tidymodels packages, please see development contributing guide. adding new tidiers broom, sure read vignette adding tidying methods.","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to broom","text":"Small typos grammatical errors documentation may edited directly using GitHub web interface, long changes made source file. YES: edit roxygen comment .R file R/. : edit .Rd file man/.","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":"prerequisites","dir":"","previous_headings":"","what":"Prerequisites","title":"Contributing to broom","text":"make substantial pull request, always file issue make sure someone team agrees ’s problem. ’ve found bug, create associated issue illustrate bug minimal reprex.","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"","what":"Pull request process","title":"Contributing to broom","text":"recommend create Git branch pull request (PR). New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code related PR. use roxygen2, Markdown syntax, documentation. use testthat. Contributions test cases included easier accept. See existing unit tests, like , guide unit test broom tidiers. user-facing changes, add bullet top NEWS.md current development version header describing changes made followed GitHub username, links relevant issue(s)/PR(s).","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to broom","text":"Please note project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 broom authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/bootstrapping.html","id":"tidy-bootstrapping","dir":"Articles","previous_headings":"","what":"Tidy bootstrapping","title":"Tidy bootstrapping","text":"vignette now article {tidymodels} website.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"broom-lets-tidy-up-a-bit","dir":"Articles","previous_headings":"","what":"broom: let’s tidy up a bit","title":"Introduction to broom","text":"broom package takes messy output built-functions R, lm, nls, t.test, turns tidy tibbles. concept “tidy data”, introduced Hadley Wickham, offers powerful framework data manipulation analysis. paper makes convincing statement problem package tries solve (emphasis mine): model inputs usually require tidy inputs, attention detail doesn’t carry model outputs. Outputs predictions estimated coefficients aren’t always tidy. makes difficult combine results multiple models. example, R, default representation model coefficients tidy explicit variable records variable name estimate, instead recorded row names. R, row names must unique, combining coefficients many models (e.g., bootstrap resamples, subgroups) requires workarounds avoid losing important information. knocks flow analysis makes harder combine results multiple models. ’m currently aware packages resolve problem. broom attempt bridge gap untidy outputs predictions estimations tidy data want work . centers around three S3 methods, take common objects produced R statistical functions (lm, t.test, nls, etc) convert tibble. broom particularly designed work Hadley’s dplyr package (see broom+dplyr vignette ). broom distinguished packages like reshape2 tidyr, rearrange reshape data frames different forms. packages perform critical tasks tidy data analysis focus manipulating data frames one specific format another. contrast, broom designed take format tabular data format (sometimes anywhere close) convert tidy tibble. Tidying model outputs exact science, ’s based judgment kinds values data scientist typically wants tidy analysis (instance, estimates, test statistics, p-values). may lose information original object wanted, keep information need. think tidy output model changed, ’re missing tidying function S3 class ’d like, strongly encourage open issue pull request.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"tidying-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit","what":"Tidying functions","title":"Introduction to broom","text":"package provides three S3 methods three distinct kinds tidying. tidy: constructs tibble summarizes model’s statistical findings. includes coefficients p-values term regression, per-cluster information clustering applications, per-test information multtest functions. augment: add columns original data modeled. includes predictions, residuals, cluster assignments. glance: construct concise one-row summary model. typically contains values R^2, adjusted R^2, residual standard error computed entire model. Note classes may one two methods defined. Consider illustrative example linear fit built-mtcars dataset. summary output useful enough just want read . However, converting tabular data contains information, can combine models analysis, trivial. coef(summary(lmfit)) get matrix coefficients, terms still stored row names, column names inconsistent packages (e.g. Pr(>|t|) compared p.value). Instead, can use tidy function, broom package, fit: gives tabular data representation. Note row names moved column called term, column names simple consistent (can accessed using $). Instead viewing coefficients, might interested fitted values residuals original points regression. , use augment, augments original data information model: Note new columns begins . (avoid overwriting original columns). Finally, several summary statistics computed entire regression, R^2 F-statistic. can accessed glance function: distinction tidy, augment glance functions explored different context k-means vignette.","code":"lmfit <- lm(mpg ~ wt, mtcars) lmfit ## ## Call: ## lm(formula = mpg ~ wt, data = mtcars) ## ## Coefficients: ## (Intercept) wt ## 37.285 -5.344 summary(lmfit) ## ## Call: ## lm(formula = mpg ~ wt, data = mtcars) ## ## Residuals: ## Min 1Q Median 3Q Max ## -4.5432 -2.3647 -0.1252 1.4096 6.8727 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 37.2851 1.8776 19.858 < 2e-16 *** ## wt -5.3445 0.5591 -9.559 1.29e-10 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 3.046 on 30 degrees of freedom ## Multiple R-squared: 0.7528, Adjusted R-squared: 0.7446 ## F-statistic: 91.38 on 1 and 30 DF, p-value: 1.294e-10 library(broom) tidy(lmfit) ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## ## 1 (Intercept) 37.3 1.88 19.9 8.24e-19 ## 2 wt -5.34 0.559 -9.56 1.29e-10 augment(lmfit) ## # A tibble: 32 × 9 ## .rownames mpg wt .fitted .resid .hat .sigma .cooksd .std.resid ## ## 1 Mazda RX4 21 2.62 23.3 -2.28 0.0433 3.07 1.33e-2 -0.766 ## 2 Mazda RX4 … 21 2.88 21.9 -0.920 0.0352 3.09 1.72e-3 -0.307 ## 3 Datsun 710 22.8 2.32 24.9 -2.09 0.0584 3.07 1.54e-2 -0.706 ## 4 Hornet 4 D… 21.4 3.22 20.1 1.30 0.0313 3.09 3.02e-3 0.433 ## 5 Hornet Spo… 18.7 3.44 18.9 -0.200 0.0329 3.10 7.60e-5 -0.0668 ## 6 Valiant 18.1 3.46 18.8 -0.693 0.0332 3.10 9.21e-4 -0.231 ## 7 Duster 360 14.3 3.57 18.2 -3.91 0.0354 3.01 3.13e-2 -1.31 ## 8 Merc 240D 24.4 3.19 20.2 4.16 0.0313 3.00 3.11e-2 1.39 ## 9 Merc 230 22.8 3.15 20.5 2.35 0.0314 3.07 9.96e-3 0.784 ## 10 Merc 280 19.2 3.44 18.9 0.300 0.0329 3.10 1.71e-4 0.100 ## # ℹ 22 more rows glance(lmfit) ## # A tibble: 1 × 12 ## r.squared adj.r.squared sigma statistic p.value df logLik AIC ## ## 1 0.753 0.745 3.05 91.4 1.29e-10 1 -80.0 166. ## # ℹ 4 more variables: BIC , deviance , df.residual , ## # nobs "},{"path":[]},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"generalized-linear-and-non-linear-models","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Other Examples","what":"Generalized linear and non-linear models","title":"Introduction to broom","text":"functions apply equally well output glm: Note statistics computed glance different glm objects lm (e.g. deviance rather R^2): functions also work fits, nonlinear models (nls):","code":"glmfit <- glm(am ~ wt, mtcars, family = \"binomial\") tidy(glmfit) ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## ## 1 (Intercept) 12.0 4.51 2.67 0.00759 ## 2 wt -4.02 1.44 -2.80 0.00509 augment(glmfit) ## # A tibble: 32 × 9 ## .rownames am wt .fitted .resid .hat .sigma .cooksd .std.resid ## ## 1 Mazda RX4 1 2.62 1.50 0.635 0.126 0.803 0.0184 0.680 ## 2 Mazda RX4 … 1 2.88 0.471 0.985 0.108 0.790 0.0424 1.04 ## 3 Datsun 710 1 2.32 2.70 0.360 0.0963 0.810 0.00394 0.379 ## 4 Hornet 4 D… 0 3.22 -0.897 -0.827 0.0744 0.797 0.0177 -0.860 ## 5 Hornet Spo… 0 3.44 -1.80 -0.553 0.0681 0.806 0.00647 -0.572 ## 6 Valiant 0 3.46 -1.88 -0.532 0.0674 0.807 0.00590 -0.551 ## 7 Duster 360 0 3.57 -2.33 -0.432 0.0625 0.809 0.00348 -0.446 ## 8 Merc 240D 0 3.19 -0.796 -0.863 0.0755 0.796 0.0199 -0.897 ## 9 Merc 230 0 3.15 -0.635 -0.922 0.0776 0.793 0.0242 -0.960 ## 10 Merc 280 0 3.44 -1.80 -0.553 0.0681 0.806 0.00647 -0.572 ## # ℹ 22 more rows glance(glmfit) ## # A tibble: 1 × 8 ## null.deviance df.null logLik AIC BIC deviance df.residual nobs ## ## 1 43.2 31 -9.59 23.2 26.1 19.2 30 32 nlsfit <- nls(mpg ~ k / wt + b, mtcars, start = list(k = 1, b = 0)) tidy(nlsfit) ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## ## 1 k 45.8 4.25 10.8 7.64e-12 ## 2 b 4.39 1.54 2.85 7.74e- 3 augment(nlsfit, mtcars) ## # A tibble: 32 × 14 ## .rownames mpg cyl disp hp drat wt qsec vs am gear ## ## 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 ## 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 ## 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 ## 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 ## 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 ## 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 ## 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 ## 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 ## 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 ## 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 ## # ℹ 22 more rows ## # ℹ 3 more variables: carb , .fitted , .resid glance(nlsfit) ## # A tibble: 1 × 9 ## sigma isConv finTol logLik AIC BIC deviance df.residual nobs ## ## 1 2.77 TRUE 0.0000000197 -77.0 160. 164. 231. 30 32"},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"hypothesis-testing","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Other Examples","what":"Hypothesis testing","title":"Introduction to broom","text":"tidy function can also applied htest objects, output popular built-functions like t.test, cor.test, wilcox.test. cases might fewer columns (example, confidence interval): Since tidy output already one row, glance returns output: augment method defined chi-squared tests, since meaningful sense, tests, hypothesis test produces output initial data point.","code":"tt <- t.test(wt ~ am, mtcars) tidy(tt) ## # A tibble: 1 × 10 ## estimate estimate1 estimate2 statistic p.value parameter conf.low ## ## 1 1.36 3.77 2.41 5.49 0.00000627 29.2 0.853 ## # ℹ 3 more variables: conf.high , method , alternative wt <- wilcox.test(wt ~ am, mtcars) tidy(wt) ## # A tibble: 1 × 4 ## statistic p.value method alternative ## ## 1 230. 0.0000435 Wilcoxon rank sum test with continuity … two.sided glance(tt) ## # A tibble: 1 × 10 ## estimate estimate1 estimate2 statistic p.value parameter conf.low ## ## 1 1.36 3.77 2.41 5.49 0.00000627 29.2 0.853 ## # ℹ 3 more variables: conf.high , method , alternative glance(wt) ## # A tibble: 1 × 4 ## statistic p.value method alternative ## ## 1 230. 0.0000435 Wilcoxon rank sum test with continuity … two.sided chit <- chisq.test(xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic) )) tidy(chit) ## # A tibble: 1 × 4 ## statistic p.value parameter method ## ## 1 350. 1.56e-75 3 Pearson's Chi-squared test augment(chit) ## # A tibble: 8 × 9 ## Sex Class .observed .prop .row.prop .col.prop .expected .resid ## ## 1 Male 1st 180 0.0818 0.104 0.554 256. -4.73 ## 2 Female 1st 145 0.0659 0.309 0.446 69.4 9.07 ## 3 Male 2nd 179 0.0813 0.103 0.628 224. -3.02 ## 4 Female 2nd 106 0.0482 0.226 0.372 60.9 5.79 ## 5 Male 3rd 510 0.232 0.295 0.722 555. -1.92 ## 6 Female 3rd 196 0.0891 0.417 0.278 151. 3.68 ## 7 Male Crew 862 0.392 0.498 0.974 696. 6.29 ## 8 Female Crew 23 0.0104 0.0489 0.0260 189. -12.1 ## # ℹ 1 more variable: .std.resid "},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"conventions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit","what":"Conventions","title":"Introduction to broom","text":"order maintain consistency, attempt follow conventions regarding structure returned data.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"all-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Conventions","what":"All functions","title":"Introduction to broom","text":"output tidy, augment glance functions always tibble. output never rownames. ensures can combine tidy outputs without fear losing information (since rownames R contain duplicates). column names kept consistent, can combined across different models know expect (contrast asking “pval PValue?” every time). examples possible column names, tidy output contain even columns.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"tidy-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Conventions","what":"tidy functions","title":"Introduction to broom","text":"row tidy output typically represents well-defined concept, one term regression, one test, one cluster/class. meaning varies across models usually self-evident. one thing row represent point initial data (, use augment method). term“” term regression model estimated. p.value: spelling chosen (common alternatives pvalue, PValue, pval) consistent functions R’s built-stats package statistic test statistic, usually one used compute p-value. Combining across many sub-groups reliable way perform (e.g.) bootstrap hypothesis testing estimate conf.low low end confidence interval estimate conf.high high end confidence interval estimate df degrees freedom","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"augment-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Conventions","what":"augment functions","title":"Introduction to broom","text":"data argument missing, augment attempts reconstruct data model (note may always possible, usually won’t contain columns used model). row augment output matches corresponding row original data. original data contained rownames, augment turns column called .rownames. Newly added column names begin . avoid overwriting columns original data. .fitted: predicted values, scale data. .resid: residuals: actual y values minus fitted values .cluster: cluster assignments","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"glance-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Conventions","what":"glance functions","title":"Introduction to broom","text":"exception glance(NULL) returns empty tibble. avoid including arguments given modeling function. example, glm glance output need contain field family, since decided user calling glm rather modeling function . r.squared fraction variance explained model adj.r.squared R2R^2 adjusted based degrees freedom sigma square root estimated variance residuals","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom_and_dplyr.html","id":"broom-and-dplyr","dir":"Articles","previous_headings":"","what":"broom and dplyr","title":"broom and dplyr","text":"broom useful summarizing result single analysis consistent format, really designed high-throughput applications, must combine results multiple analyses. subgroups data, analyses using different models, bootstrap replicates, permutations, . particular, plays well nest/unnest functions tidyr map function purrr. First, loading necessary packages setting defaults: Let’s try simple dataset, built-Orange. start coercing Orange tibble. gives nicer print method especially useful later start working list-columns. contains 35 observations three variables: Tree, age, circumference. Tree factor five levels describing five trees. might expected, age circumference correlated: Suppose want test correlations individually within tree. can dplyr’s group_by: (Note correlations much higher aggregated one, furthermore can now see similar across trees). Suppose instead simply estimating correlation, want perform hypothesis test cor.test: contains multiple values want output. vectors length 1, p-value estimate, longer, confidence interval. can get nicely organized tibble using tidy function: Often, want perform multiple tests fit multiple models, different part data. case, recommend nest-map-unnest workflow. example, suppose want perform correlation tests different tree. start nesting data based group interest: run correlation test nested tibble using purrr::map: results list-column S3 objects. want tidy objects, can also map. Finally, want unnest tidied data frames can see results flat tibble. together, looks like: workflow becomes even useful applied regressions. Untidy output regression looks like: tidy results, get multiple rows output model: Now can handle multiple regressions using exactly workflow : can just easily use multiple predictors regressions, shown mtcars dataset. nest data automatic manual cars (column), perform regression within nested tibble. want just tidy output, augment glance outputs well, still performing regression ? Since ’re using list-columns, can just fit model use multiple list-columns store tidied, glanced augmented outputs. combining estimates p-values across groups tidy data frame (instead list output model objects), new class analyses visualizations becomes straightforward. includes Sorting p-value estimate find significant terms across tests P-value histograms Volcano plots comparing p-values effect size estimates cases, can easily filter, facet, distinguish based term column. short, makes tools tidy data analysis available results data analysis models, just inputs.","code":"library(broom) library(tibble) library(ggplot2) library(dplyr) library(tidyr) library(purrr) theme_set(theme_minimal()) data(Orange) Orange <- as_tibble(Orange) Orange ## # A tibble: 35 × 3 ## Tree age circumference ## ## 1 1 118 30 ## 2 1 484 58 ## 3 1 664 87 ## 4 1 1004 115 ## 5 1 1231 120 ## 6 1 1372 142 ## 7 1 1582 145 ## 8 2 118 33 ## 9 2 484 69 ## 10 2 664 111 ## # ℹ 25 more rows cor(Orange$age, Orange$circumference) ## [1] 0.9135189 ggplot(Orange, aes(age, circumference, color = Tree)) + geom_line() Orange %>% group_by(Tree) %>% summarize(correlation = cor(age, circumference)) ## # A tibble: 5 × 2 ## Tree correlation ## ## 1 3 0.988 ## 2 1 0.985 ## 3 5 0.988 ## 4 2 0.987 ## 5 4 0.984 ct <- cor.test(Orange$age, Orange$circumference) ct ## ## Pearson's product-moment correlation ## ## data: Orange$age and Orange$circumference ## t = 12.9, df = 33, p-value = 1.931e-14 ## alternative hypothesis: true correlation is not equal to 0 ## 95 percent confidence interval: ## 0.8342364 0.9557955 ## sample estimates: ## cor ## 0.9135189 tidy(ct) ## # A tibble: 1 × 8 ## estimate statistic p.value parameter conf.low conf.high method ## ## 1 0.914 12.9 1.93e-14 33 0.834 0.956 Pearson's prod… ## # ℹ 1 more variable: alternative nested <- Orange %>% nest(data = -Tree) nested %>% mutate(test = map(data, ~ cor.test(.x$age, .x$circumference))) ## # A tibble: 5 × 3 ## Tree data test ## ## 1 1 ## 2 2 ## 3 3 ## 4 4 ## 5 5 nested %>% mutate( test = map(data, ~ cor.test(.x$age, .x$circumference)), # S3 list-col tidied = map(test, tidy) ) ## # A tibble: 5 × 4 ## Tree data test tidied ## ## 1 1 ## 2 2 ## 3 3 ## 4 4 ## 5 5 Orange %>% nest(data = -Tree) %>% mutate( test = map(data, ~ cor.test(.x$age, .x$circumference)), # S3 list-col tidied = map(test, tidy) ) %>% unnest(tidied) ## # A tibble: 5 × 11 ## Tree data test estimate statistic p.value parameter conf.low ## ## 1 1 0.985 13.0 0.0000485 5 0.901 ## 2 2 0.987 13.9 0.0000343 5 0.914 ## 3 3 0.988 14.4 0.0000290 5 0.919 ## 4 4 0.984 12.5 0.0000573 5 0.895 ## 5 5 0.988 14.1 0.0000318 5 0.916 ## # ℹ 3 more variables: conf.high , method , alternative lm_fit <- lm(age ~ circumference, data = Orange) summary(lm_fit) ## ## Call: ## lm(formula = age ~ circumference, data = Orange) ## ## Residuals: ## Min 1Q Median 3Q Max ## -317.88 -140.90 -17.20 96.54 471.16 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 16.6036 78.1406 0.212 0.833 ## circumference 7.8160 0.6059 12.900 1.93e-14 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 203.1 on 33 degrees of freedom ## Multiple R-squared: 0.8345, Adjusted R-squared: 0.8295 ## F-statistic: 166.4 on 1 and 33 DF, p-value: 1.931e-14 tidy(lm_fit) ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## ## 1 (Intercept) 16.6 78.1 0.212 8.33e- 1 ## 2 circumference 7.82 0.606 12.9 1.93e-14 Orange %>% nest(data = -Tree) %>% mutate( fit = map(data, ~ lm(age ~ circumference, data = .x)), tidied = map(fit, tidy) ) %>% unnest(tidied) ## # A tibble: 10 × 8 ## Tree data fit term estimate std.error statistic p.value ## ## 1 1 (Int… -265. 98.6 -2.68 4.36e-2 ## 2 1 circ… 11.9 0.919 13.0 4.85e-5 ## 3 2 (Int… -132. 83.1 -1.59 1.72e-1 ## 4 2 circ… 7.80 0.560 13.9 3.43e-5 ## 5 3 (Int… -210. 85.3 -2.46 5.74e-2 ## 6 3 circ… 12.0 0.835 14.4 2.90e-5 ## 7 4 (Int… -76.5 88.3 -0.867 4.26e-1 ## 8 4 circ… 7.17 0.572 12.5 5.73e-5 ## 9 5 (Int… -54.5 76.9 -0.709 5.10e-1 ## 10 5 circ… 8.79 0.621 14.1 3.18e-5 data(mtcars) mtcars <- as_tibble(mtcars) # to play nicely with list-cols mtcars ## # A tibble: 32 × 11 ## mpg cyl disp hp drat wt qsec vs am gear carb ## ## 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 ## 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 ## 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 ## 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 ## 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 ## 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 ## 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 ## 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 ## 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 ## 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 ## # ℹ 22 more rows mtcars %>% nest(data = -am) %>% mutate( fit = map(data, ~ lm(wt ~ mpg + qsec + gear, data = .x)), # S3 list-col tidied = map(fit, tidy) ) %>% unnest(tidied) ## # A tibble: 8 × 8 ## am data fit term estimate std.error statistic p.value ## ## 1 1 (Intercept) 4.28 3.46 1.24 0.247 ## 2 1 mpg -0.101 0.0294 -3.43 0.00750 ## 3 1 qsec 0.0398 0.151 0.264 0.798 ## 4 1 gear -0.0229 0.349 -0.0656 0.949 ## 5 0 (Intercept) 4.92 1.40 3.52 0.00309 ## 6 0 mpg -0.192 0.0443 -4.33 0.000591 ## 7 0 qsec 0.0919 0.0983 0.935 0.365 ## 8 0 gear 0.147 0.368 0.398 0.696 regressions <- mtcars %>% nest(data = -am) %>% mutate( fit = map(data, ~ lm(wt ~ mpg + qsec + gear, data = .x)), tidied = map(fit, tidy), glanced = map(fit, glance), augmented = map(fit, augment) ) regressions %>% unnest(tidied) ## # A tibble: 8 × 10 ## am data fit term estimate std.error statistic p.value glanced ## ## 1 1 (Int… 4.28 3.46 1.24 2.47e-1 ## 2 1 mpg -0.101 0.0294 -3.43 7.50e-3 ## 3 1 qsec 0.0398 0.151 0.264 7.98e-1 ## 4 1 gear -0.0229 0.349 -0.0656 9.49e-1 ## 5 0 (Int… 4.92 1.40 3.52 3.09e-3 ## 6 0 mpg -0.192 0.0443 -4.33 5.91e-4 ## 7 0 qsec 0.0919 0.0983 0.935 3.65e-1 ## 8 0 gear 0.147 0.368 0.398 6.96e-1 ## # ℹ 1 more variable: augmented regressions %>% unnest(glanced) ## # A tibble: 2 × 17 ## am data fit tidied r.squared adj.r.squared sigma statistic ## ## 1 1 0.833 0.778 0.291 15.0 ## 2 0 0.625 0.550 0.522 8.32 ## # ℹ 9 more variables: p.value , df , logLik , AIC , ## # BIC , deviance , df.residual , nobs , ## # augmented regressions %>% unnest(augmented) ## # A tibble: 32 × 15 ## am data fit tidied glanced wt mpg qsec gear .fitted ## ## 1 1 2.62 21 16.5 4 2.73 ## 2 1 2.88 21 17.0 4 2.75 ## 3 1 2.32 22.8 18.6 4 2.63 ## 4 1 2.2 32.4 19.5 4 1.70 ## 5 1 1.62 30.4 18.5 4 1.86 ## 6 1 1.84 33.9 19.9 4 1.56 ## 7 1 1.94 27.3 18.9 4 2.19 ## 8 1 2.14 26 16.7 5 2.21 ## 9 1 1.51 30.4 16.9 5 1.77 ## 10 1 3.17 15.8 14.5 5 3.15 ## # ℹ 22 more rows ## # ℹ 5 more variables: .resid , .hat , .sigma , ## # .cooksd , .std.resid "},{"path":"https://broom.tidymodels.org/dev/articles/kmeans.html","id":"tidying-k-means-clustering","dir":"Articles","previous_headings":"","what":"Tidying k-means clustering","title":"kmeans with dplyr and broom","text":"vignette now article {tidymodels} website.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/maintenance.html","id":"motivation","dir":"Articles","previous_headings":"","what":"Motivation","title":"Maintenance guidelines","text":"packages tidymodels, broom oldest, one largest codebases, likely widely used. writing tidyup, package downloaded 30 million times, directly depended 200 CRAN packages -knows--many research analyses. package grew organically course many years—thanks contributions hundreds community members—now supplies hundreds methods summarizing model objects: factors mention cause celebration, time, mean maintaining broom approach tidymodels packages lead significant breaking changes scope creep.","code":"library(broom) length(methods(\"tidy\")) ## [1] 133 length(methods(\"glance\")) ## [1] 82 length(methods(\"augment\")) ## [1] 50"},{"path":"https://broom.tidymodels.org/dev/articles/maintenance.html","id":"guidelines","dir":"Articles","previous_headings":"","what":"Guidelines","title":"Maintenance guidelines","text":"light challenges, broom team look following guidelines determining scope new development package: New methods: broom longer accept new tidier methods package, instead asking maintained model-supplying package. can read tooling help make happen “Writing new tidier methods” vignette! Internal consistency: feel improvement interface gained enforcing internal consistency (e.g. argument order, column names) worth potential breaking change dependencies, merge changes. Ellipsis handling: tidier methods pass ellipses modeling functions others take ellipses documented unused. first setting, wide variety modeling functions wrap handle ellipses, thus feel principled way “vet” ellipses passing along. second case, feel improvement interface failing unused dots worth breaking change dependencies. Note guidelines largely reflect maintenance practice years preceding 1.0.0 version. introduction guidelines isn’t change much reflection approach maintaining broom 2017-2022. Communicating approach clearly also allows us clearly define issue within scope package’s development. examples cases: Visible failures: tidier visibly fails (e.g. raises error) currently unsupported use cases modeling function, accept/implement changes accommodate usage. doesn’t apply prompts raised broom . Silent failures: tidier silently fails (e.g. sensitive documented argument dispatches method return incorrect results), accept/implement changes address failures. Breaking changes dependencies: accept/implement changes address new errors, warnings, messages introduced dependencies. ’re sure whether change ’d like see within scope package’s development, please feel free open issue broom GitHub repository discussion!","code":""},{"path":"https://broom.tidymodels.org/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"David Robinson. Author. Alex Hayes. Author. Simon Couch. Author, maintainer. . Copyright holder, funder. Indrajeet Patil. Contributor. Derek Chiu. Contributor. Matthieu Gomez. Contributor. Boris Demeshev. Contributor. Dieter Menne. Contributor. Benjamin Nutter. Contributor. Luke Johnston. Contributor. Ben Bolker. Contributor. Francois Briatte. Contributor. Jeffrey Arnold. Contributor. Jonah Gabry. Contributor. Luciano Selzer. Contributor. Gavin Simpson. Contributor. Jens Preussner. Contributor. Jay Hesselberth. Contributor. Hadley Wickham. Contributor. Matthew Lincoln. Contributor. Alessandro Gasparini. Contributor. Lukasz Komsta. Contributor. Frederick Novometsky. Contributor. Wilson Freitas. Contributor. Michelle Evans. Contributor. Jason Cory Brunson. Contributor. Simon Jackson. Contributor. Ben Whalley. Contributor. Karissa Whiting. Contributor. Yves Rosseel. Contributor. Michael Kuehn. Contributor. Jorge Cimentada. Contributor. Erle Holgersen. Contributor. Karl Dunkle Werner. Contributor. Ethan Christensen. Contributor. Steven Pav. Contributor. Paul PJ. Contributor. Ben Schneider. Contributor. Patrick Kennedy. Contributor. Lily Medina. Contributor. Brian Fannin. Contributor. Jason Muhlenkamp. Contributor. Matt Lehman. Contributor. Bill Denney. Contributor. Nic Crane. Contributor. Andrew Bates. Contributor. Vincent Arel-Bundock. Contributor. Hideaki Hayashi. Contributor. Luis Tobalina. Contributor. Annie Wang. Contributor. Wei Yang Tham. Contributor. Clara Wang. Contributor. Abby Smith. Contributor. Jasper Cooper. Contributor. E Auden Krauska. Contributor. Alex Wang. Contributor. Malcolm Barrett. Contributor. Charles Gray. Contributor. Jared Wilber. Contributor. Vilmantas Gegzna. Contributor. Eduard Szoecs. Contributor. Frederik Aust. Contributor. Angus Moore. Contributor. Nick Williams. Contributor. Marius Barth. Contributor. Bruna Wundervald. Contributor. Joyce Cahoon. Contributor. Grant McDermott. Contributor. Kevin Zarca. Contributor. Shiro Kuriwaki. Contributor. Lukas Wallrich. Contributor. James Martherus. Contributor. Chuliang Xiao. Contributor. Joseph Larmarange. Contributor. Max Kuhn. Contributor. Michal Bojanowski. Contributor. Hakon Malmedal. Contributor. Clara Wang. Contributor. Sergio Oller. Contributor. Luke Sonnet. Contributor. Jim Hester. Contributor. Ben Schneider. Contributor. Bernie Gray. Contributor. Mara Averick. Contributor. Aaron Jacobs. Contributor. Andreas Bender. Contributor. Sven Templer. Contributor. Paul-Christian Buerkner. Contributor. Matthew Kay. Contributor. Erwan Le Pennec. Contributor. Johan Junkka. Contributor. Hao Zhu. Contributor. Benjamin Soltoff. Contributor. Zoe Wilkinson Saldana. Contributor. Tyler Littlefield. Contributor. Charles T. Gray. Contributor. Shabbh E. Banks. Contributor. Serina Robinson. Contributor. Roger Bivand. Contributor. Riinu Ots. Contributor. Nicholas Williams. Contributor. Nina Jakobsen. Contributor. Michael Weylandt. Contributor. Lisa Lendway. Contributor. Karl Hailperin. Contributor. Josue Rodriguez. Contributor. Jenny Bryan. Contributor. Chris Jarvis. Contributor. Greg Macfarlane. Contributor. Brian Mannakee. Contributor. Drew Tyre. Contributor. Shreyas Singh. Contributor. Laurens Geffert. Contributor. Hong Ooi. Contributor. Henrik Bengtsson. Contributor. Eduard Szocs. Contributor. David Hugh-Jones. Contributor. Matthieu Stigler. Contributor. Hugo Tavares. Contributor. R. Willem Vervoort. Contributor. Brenton M. Wiernik. Contributor. Josh Yamamoto. Contributor. Jasme Lee. Contributor. Taren Sanders. Contributor. Ilaria Prosdocimi. Contributor. Daniel D. Sjoberg. Contributor. Alex Reinhart. Contributor.","code":""},{"path":"https://broom.tidymodels.org/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Robinson D, Hayes , Couch S (2024). broom: Convert Statistical Objects Tidy Tibbles. R package version 1.0.7.9000, https://github.com/tidymodels/broom, https://broom.tidymodels.org/.","code":"@Manual{, title = {broom: Convert Statistical Objects into Tidy Tibbles}, author = {David Robinson and Alex Hayes and Simon Couch}, year = {2024}, note = {R package version 1.0.7.9000, https://github.com/tidymodels/broom}, url = {https://broom.tidymodels.org/}, }"},{"path":[]},{"path":"https://broom.tidymodels.org/dev/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Convert Statistical Objects into Tidy Tibbles","text":"broom summarizes key information models tidy tibble()s. broom provides three verbs make convenient interact model objects: tidy() summarizes information model components glance() reports information entire model augment() adds informations observations dataset detailed introduction, please see vignette(\"broom\"). broom tidies 100+ models popular modelling packages almost model objects stats package comes base R. vignette(\"available-methods\") lists method availability. aren’t familiar tidy data structures want know can make life easier, highly recommend reading Hadley Wickham’s Tidy Data.","code":""},{"path":"https://broom.tidymodels.org/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Convert Statistical Objects into Tidy Tibbles","text":"find bug, please file minimal reproducible example issues.","code":"# we recommend installing the entire tidyverse # modeling set, which includes broom: install.packages(\"tidymodels\") # alternatively, to install just broom: install.packages(\"broom\") # to get the development version from GitHub: install.packages(\"pak\") pak::pak(\"tidymodels/broom\")"},{"path":"https://broom.tidymodels.org/dev/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Convert Statistical Objects into Tidy Tibbles","text":"tidy() produces tibble() row contains information important component model. regression models, often corresponds regression coefficients. can useful want inspect model create custom visualizations. glance() returns tibble exactly one row goodness fitness measures related statistics. useful check model misspecification compare many models. augment adds columns dataset, containing information fitted values, residuals cluster assignments. columns added dataset . prefix prevent existing columns overwritten.","code":"library(broom) fit <- lm(Volume ~ Girth + Height, trees) tidy(fit) #> # A tibble: 3 x 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -58.0 8.64 -6.71 2.75e- 7 #> 2 Girth 4.71 0.264 17.8 8.22e-17 #> 3 Height 0.339 0.130 2.61 1.45e- 2 glance(fit) #> # A tibble: 1 x 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC BIC #> #> 1 0.948 0.944 3.88 255. 1.07e-18 2 -84.5 177. 183. #> # … with 3 more variables: deviance , df.residual , nobs augment(fit, data = trees) #> # A tibble: 31 x 9 #> Girth Height Volume .fitted .resid .std.resid .hat .sigma .cooksd #> #> 1 8.3 70 10.3 4.84 5.46 1.50 0.116 3.79 0.0978 #> 2 8.6 65 10.3 4.55 5.75 1.60 0.147 3.77 0.148 #> 3 8.8 63 10.2 4.82 5.38 1.53 0.177 3.78 0.167 #> 4 10.5 72 16.4 15.9 0.526 0.140 0.0592 3.95 0.000409 #> 5 10.7 81 18.8 19.9 -1.07 -0.294 0.121 3.95 0.00394 #> 6 10.8 83 19.7 21.0 -1.32 -0.370 0.156 3.94 0.00840 #> 7 11 66 15.6 16.2 -0.593 -0.162 0.115 3.95 0.00114 #> 8 11 75 18.2 19.2 -1.05 -0.277 0.0515 3.95 0.00138 #> 9 11.1 80 22.6 21.4 1.19 0.321 0.0920 3.95 0.00348 #> 10 11.2 75 19.9 20.2 -0.288 -0.0759 0.0480 3.95 0.0000968 #> # … with 21 more rows"},{"path":"https://broom.tidymodels.org/dev/index.html","id":"contributing","dir":"","previous_headings":"Usage","what":"Contributing","title":"Convert Statistical Objects into Tidy Tibbles","text":"welcome contributions types! questions discussions tidymodels packages, modeling, machine learning, please post Posit Community. think encountered bug, please submit issue. Either way, learn create share reprex (minimal, reproducible example), clearly communicate code. Check details contributing guidelines tidymodels packages get help. never directly contributed R package , broom excellent place start. Find issue Beginner Friendly tag comment ’d like take ’ll help get started. Generally, , encourage typo corrections, bug reports, bug fixes feature requests. Feedback clarity documentation especially valuable! interested adding tidier methods new model objects, please read article tidymodels website. Contributor Code Conduct. participating broom agree abide terms.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) Mclust object — augment.Mclust","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"","code":"# S3 method for class 'Mclust' augment(x, data = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"x Mclust object return mclust::Mclust(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"tibble::tibble() columns: .class Predicted class. .uncertainty uncertainty associated classification. Equal one minus model class probability.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"","code":"# load library for models and data library(mclust) #> Package 'mclust' version 6.1.1 #> Type 'citation(\"mclust\")' for citing this R package in publications. # load data manipulation libraries library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union library(tibble) library(purrr) #> #> Attaching package: ‘purrr’ #> The following object is masked from ‘package:mclust’: #> #> map library(tidyr) set.seed(27) centers <- tibble( cluster = factor(1:3), # number points in each cluster num_points = c(100, 150, 50), # x1 coordinate of cluster center x1 = c(5, 0, -3), # x2 coordinate of cluster center x2 = c(-1, 1, -2) ) points <- centers %>% mutate( x1 = map2(num_points, x1, rnorm), x2 = map2(num_points, x2, rnorm) ) %>% select(-num_points, -cluster) %>% unnest(c(x1, x2)) # fit model m <- Mclust(points) # summarize model fit with tidiers tidy(m) #> # A tibble: 3 × 6 #> component size proportion variance mean.x1 mean.x2 #> #> 1 1 101 0.335 1.12 5.01 -1.04 #> 2 2 150 0.503 1.12 0.0594 1.00 #> 3 3 49 0.161 1.12 -3.20 -2.06 augment(m, points) #> # A tibble: 300 × 4 #> x1 x2 .class .uncertainty #> #> 1 6.91 -2.74 1 3.98e-11 #> 2 6.14 -2.45 1 1.99e- 9 #> 3 4.24 -0.946 1 1.47e- 4 #> 4 3.54 0.287 1 2.94e- 2 #> 5 3.91 0.408 1 7.48e- 3 #> 6 5.30 -1.58 1 4.22e- 7 #> 7 5.01 -1.77 1 1.06e- 6 #> 8 6.16 -1.68 1 7.64e- 9 #> 9 7.13 -2.17 1 4.16e-11 #> 10 5.24 -2.42 1 1.16e- 7 #> # ℹ 290 more rows glance(m) #> # A tibble: 1 × 7 #> model G BIC logLik df hypvol nobs #> #> 1 EII 3 -2402. -1175. 9 NA 300"},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) betamfx object — augment.betamfx","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"","code":"# S3 method for class 'betamfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"response\", \"link\", \"precision\", \"variance\", \"quantile\"), type.residuals = c(\"sweighted2\", \"deviance\", \"pearson\", \"response\", \"weighted\", \"sweighted\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"x betamfx object. data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument betareg::predict.betareg(). Defaults \"response\". type.residuals Character indicating type residuals use. Passed type argument betareg::residuals.betareg(). Defaults \"sweighted2. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"augment method wraps augment.betareg() mfx::betamfx() objects.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"","code":"library(mfx) #> Loading required package: sandwich #> Loading required package: lmtest #> Loading required package: zoo #> #> Attaching package: ‘zoo’ #> The following objects are masked from ‘package:base’: #> #> as.Date, as.Date.numeric #> Loading required package: MASS #> #> Attaching package: ‘MASS’ #> The following object is masked from ‘package:dplyr’: #> #> select #> Loading required package: betareg # Simulate some data set.seed(12345) n <- 1000 x <- rnorm(n) # Beta outcome y <- rbeta(n, shape1 = plogis(1 + 0.5 * x), shape2 = (abs(0.2 * x))) # Use Smithson and Verkuilen correction y <- (y * (n - 1) + 0.5) / n d <- data.frame(y, x) mod_betamfx <- betamfx(y ~ x | x, data = d) tidy(mod_betamfx, conf.int = TRUE) #> # A tibble: 1 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 x TRUE 0.0226 0.00801 2.82 0.00483 0.00686 0.0383 # Compare with the naive model coefficients of the equivalent betareg call (not run) # tidy(betamfx(y ~ x | x, data = d), conf.int = TRUE) augment(mod_betamfx) #> # A tibble: 1,000 × 4 #> y x .fitted .cooksd #> #> 1 0.951 0.586 0.809 0.000189 #> 2 0.714 0.709 0.811 0.0000993 #> 3 0.999 -0.109 0.793 0.000273 #> 4 0.998 -0.453 0.785 0.000334 #> 5 0.999 0.606 0.809 0.000342 #> 6 0.562 -1.82 0.751 0.000878 #> 7 0.999 0.630 0.810 0.000348 #> 8 0.999 -0.276 0.789 0.000294 #> 9 0.744 -0.284 0.789 0.0000134 #> 10 0.999 -0.919 0.774 0.000551 #> # ℹ 990 more rows glance(mod_betamfx) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.00726 998 1897. -3787. -3767. 996 1000"},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) betareg object — augment.betareg","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"","code":"# S3 method for class 'betareg' augment( x, data = model.frame(x), newdata = NULL, type.predict, type.residuals, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"x betareg object produced call betareg::betareg(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"additional details Cook's distance, see stats::cooks.distance().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"","code":"# load libraries for models and data library(betareg) # load dats data(\"GasolineYield\", package = \"betareg\") # fit model mod <- betareg(yield ~ batch + temp, data = GasolineYield) mod #> #> Call: #> betareg(formula = yield ~ batch + temp, data = GasolineYield) #> #> Coefficients (mean model with logit link): #> (Intercept) batch1 batch2 batch3 batch4 #> -6.15957 1.72773 1.32260 1.57231 1.05971 #> batch5 batch6 batch7 batch8 batch9 #> 1.13375 1.04016 0.54369 0.49590 0.38579 #> temp #> 0.01097 #> #> Phi coefficients (precision model with identity link): #> (phi) #> 440.3 #> # summarize model fit with tidiers tidy(mod) #> # A tibble: 12 × 6 #> component term estimate std.error statistic p.value #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 tidy(mod, conf.int = TRUE) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.52 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.53 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.09 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.34 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.859 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.931 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.832 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.330 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.282 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.153 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.0102 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 225. #> # ℹ 1 more variable: conf.high tidy(mod, conf.int = TRUE, conf.level = .99) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.63 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.47 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.02 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.27 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.796 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.867 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.767 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.263 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.215 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.0803 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.00990 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 157. #> # ℹ 1 more variable: conf.high augment(mod) #> # A tibble: 32 × 6 #> yield batch temp .fitted .resid .cooksd #> #> 1 0.122 1 205 0.101 1.41 0.0791 #> 2 0.223 1 275 0.195 1.44 0.0917 #> 3 0.347 1 345 0.343 0.170 0.00155 #> 4 0.457 1 407 0.508 -2.14 0.606 #> 5 0.08 2 218 0.0797 0.0712 0.0000168 #> 6 0.131 2 273 0.137 -0.318 0.00731 #> 7 0.266 2 347 0.263 0.169 0.00523 #> 8 0.074 3 212 0.0943 -1.52 0.0805 #> 9 0.182 3 272 0.167 0.831 0.0441 #> 10 0.304 3 340 0.298 0.304 0.0170 #> # ℹ 22 more rows glance(mod) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.962 30 84.8 -146. -128. 20 32"},{"path":"https://broom.tidymodels.org/dev/reference/augment.clm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) clm object — augment.clm","title":"Augment data with information from a(n) clm object — augment.clm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.clm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) clm object — augment.clm","text":"","code":"# S3 method for class 'clm' augment( x, data = model.frame(x), newdata = NULL, type.predict = c(\"prob\", \"class\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.clm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) clm object — augment.clm","text":"x clm object returned ordinal::clm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict type prediction compute, either \"prob\" \"class\", passed ordinal::predict.clm(). Defaults \"prob\". ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.clm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) clm object — augment.clm","text":"","code":"# load libraries for models and data library(ordinal) #> #> Attaching package: ‘ordinal’ #> The following object is masked from ‘package:dplyr’: #> #> slice # fit model fit <- clm(rating ~ temp * contact, data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 7 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 intercept #> 5 tempwarm 2.32 0.701 3.31 9.28e- 4 location #> 6 contactyes 1.35 0.660 2.04 4.13e- 2 location #> 7 tempwarm:contactyes 0.360 0.924 0.389 6.97e- 1 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 NA NA intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 NA NA intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 NA NA intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 NA NA intercept #> 5 temp… 2.32 0.701 3.31 9.28e- 4 1.20 3.52 location #> 6 cont… 1.35 0.660 2.04 4.13e- 2 0.284 2.47 location #> 7 temp… 0.360 0.924 0.389 6.97e- 1 -1.17 1.89 location tidy(fit, conf.int = TRUE, conf.type = \"Wald\", exponentiate = TRUE) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.244 0.545 -2.59 9.66e- 3 0.0837 0.710 intercept #> 2 2|3 3.14 0.510 2.24 2.48e- 2 1.16 8.52 intercept #> 3 3|4 29.3 0.638 5.29 1.21e- 7 8.38 102. intercept #> 4 4|5 140. 0.751 6.58 4.66e-11 32.1 610. intercept #> 5 temp… 10.2 0.701 3.31 9.28e- 4 2.58 40.2 location #> 6 cont… 3.85 0.660 2.04 4.13e- 2 1.05 14.0 location #> 7 temp… 1.43 0.924 0.389 6.97e- 1 0.234 8.76 location glance(fit) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 7 187. 203. -86.4162 65 72 augment(fit, type.predict = \"prob\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 0.562 #> 2 3 cold no 0.209 #> 3 3 cold yes 0.435 #> 4 4 cold yes 0.0894 #> 5 4 warm no 0.190 #> 6 4 warm no 0.190 #> 7 5 warm yes 0.286 #> 8 5 warm yes 0.286 #> 9 1 cold no 0.196 #> 10 2 cold no 0.562 #> # ℹ 62 more rows augment(fit, type.predict = \"class\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 2 #> 2 3 cold no 2 #> 3 3 cold yes 3 #> 4 4 cold yes 3 #> 5 4 warm no 3 #> 6 4 warm no 3 #> 7 5 warm yes 4 #> 8 5 warm yes 4 #> 9 1 cold no 2 #> 10 2 cold no 2 #> # ℹ 62 more rows # ...and again with another model specification fit2 <- clm(rating ~ temp, nominal = ~contact, data = wine) tidy(fit2) #> # A tibble: 9 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2.(Intercept) -1.32 0.562 -2.35 0.0186 intercept #> 2 2|3.(Intercept) 1.25 0.475 2.63 0.00866 intercept #> 3 3|4.(Intercept) 3.55 0.656 5.41 0.0000000625 intercept #> 4 4|5.(Intercept) 4.66 0.860 5.42 0.0000000608 intercept #> 5 1|2.contactyes -1.62 1.16 -1.39 0.164 intercept #> 6 2|3.contactyes -1.51 0.591 -2.56 0.0105 intercept #> 7 3|4.contactyes -1.67 0.649 -2.58 0.00985 intercept #> 8 4|5.contactyes -1.05 0.897 -1.17 0.241 intercept #> 9 tempwarm 2.52 0.535 4.71 0.00000250 location glance(fit2) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 9 190. 211. -86.20855 63 72"},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) coxph object — augment.coxph","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"","code":"# S3 method for class 'coxph' augment( x, data = model.frame(x), newdata = NULL, type.predict = \"lp\", type.residuals = \"martingale\", ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"x coxph object returned survival::coxph(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"modeling performed na.action = \"na.omit\" (typical default), rows NA initial data omitted entirely augmented data frame. modeling performed na.action = \"na.exclude\", one provide original data second argument, point augmented data contain rows (typically NAs place new columns). original data provided augment() na.action = \"na.exclude\", warning raised incomplete rows dropped.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values. .se.fit Standard errors fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) # summarize model fit with tidiers tidy(cfit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 0.0170 0.00922 1.85 0.0646 #> 2 sex -0.513 0.167 -3.06 0.00218 tidy(cfit, exponentiate = TRUE) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 1.02 0.00922 1.85 0.0646 #> 2 sex 0.599 0.167 -3.06 0.00218 lp <- augment(cfit, lung) risks <- augment(cfit, lung, type.predict = \"risk\") expected <- augment(cfit, lung, type.predict = \"expected\") glance(cfit) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 228 165 14.1 0.000857 13.7 0.00105 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs # also works on clogit models resp <- levels(logan$occupation) n <- nrow(logan) indx <- rep(1:n, length(resp)) logan2 <- data.frame( logan[indx, ], id = indx, tocc = factor(rep(resp, each = n)) ) logan2$case <- (logan2$occupation == logan2$tocc) cl <- clogit(case ~ tocc + tocc:education + strata(id), logan2) tidy(cl) #> # A tibble: 9 × 5 #> term estimate std.error statistic p.value #> #> 1 toccfarm -1.90 1.38 -1.37 1.70e- 1 #> 2 toccoperatives 1.17 0.566 2.06 3.91e- 2 #> 3 toccprofessional -8.10 0.699 -11.6 4.45e-31 #> 4 toccsales -5.03 0.770 -6.53 6.54e-11 #> 5 tocccraftsmen:education -0.332 0.0569 -5.84 5.13e- 9 #> 6 toccfarm:education -0.370 0.116 -3.18 1.47e- 3 #> 7 toccoperatives:education -0.422 0.0584 -7.23 4.98e-13 #> 8 toccprofessional:education 0.278 0.0510 5.45 4.94e- 8 #> 9 toccsales:education NA 0 NA NA glance(cl) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 4190 838 666. 1.90e-138 682. 5.01e-142 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs library(ggplot2) ggplot(lp, aes(age, .fitted, color = sex)) + geom_point() ggplot(risks, aes(age, .fitted, color = sex)) + geom_point() ggplot(expected, aes(time, .fitted, color = sex)) + geom_point()"},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"","code":"# S3 method for class 'decomposed.ts' augment(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"x decomposed.ts object returned stats::decompose(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"tibble::tibble one row observation original times series: .seasonal seasonal component decomposition. .trend trend component decomposition. .remainder remainder, \"random\" component decomposition. .weight final robust weights (stl ). .seasadj seasonally adjusted (\"deseasonalised\") series.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"","code":"# time series of temperatures in Nottingham, 1920-1939: nottem #> Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec #> 1920 40.6 40.8 44.4 46.7 54.1 58.5 57.7 56.4 54.3 50.5 42.9 39.8 #> 1921 44.2 39.8 45.1 47.0 54.1 58.7 66.3 59.9 57.0 54.2 39.7 42.8 #> 1922 37.5 38.7 39.5 42.1 55.7 57.8 56.8 54.3 54.3 47.1 41.8 41.7 #> 1923 41.8 40.1 42.9 45.8 49.2 52.7 64.2 59.6 54.4 49.2 36.3 37.6 #> 1924 39.3 37.5 38.3 45.5 53.2 57.7 60.8 58.2 56.4 49.8 44.4 43.6 #> 1925 40.0 40.5 40.8 45.1 53.8 59.4 63.5 61.0 53.0 50.0 38.1 36.3 #> 1926 39.2 43.4 43.4 48.9 50.6 56.8 62.5 62.0 57.5 46.7 41.6 39.8 #> 1927 39.4 38.5 45.3 47.1 51.7 55.0 60.4 60.5 54.7 50.3 42.3 35.2 #> 1928 40.8 41.1 42.8 47.3 50.9 56.4 62.2 60.5 55.4 50.2 43.0 37.3 #> 1929 34.8 31.3 41.0 43.9 53.1 56.9 62.5 60.3 59.8 49.2 42.9 41.9 #> 1930 41.6 37.1 41.2 46.9 51.2 60.4 60.1 61.6 57.0 50.9 43.0 38.8 #> 1931 37.1 38.4 38.4 46.5 53.5 58.4 60.6 58.2 53.8 46.6 45.5 40.6 #> 1932 42.4 38.4 40.3 44.6 50.9 57.0 62.1 63.5 56.3 47.3 43.6 41.8 #> 1933 36.2 39.3 44.5 48.7 54.2 60.8 65.5 64.9 60.1 50.2 42.1 35.8 #> 1934 39.4 38.2 40.4 46.9 53.4 59.6 66.5 60.4 59.2 51.2 42.8 45.8 #> 1935 40.0 42.6 43.5 47.1 50.0 60.5 64.6 64.0 56.8 48.6 44.2 36.4 #> 1936 37.3 35.0 44.0 43.9 52.7 58.6 60.0 61.1 58.1 49.6 41.6 41.3 #> 1937 40.8 41.0 38.4 47.4 54.1 58.6 61.4 61.8 56.3 50.9 41.4 37.1 #> 1938 42.1 41.2 47.3 46.6 52.4 59.0 59.6 60.4 57.0 50.7 47.8 39.2 #> 1939 39.4 40.9 42.4 47.8 52.4 58.0 60.7 61.8 58.2 46.7 46.6 37.8 # perform seasonal decomposition on the data with both decompose # and stl: d1 <- decompose(nottem) d2 <- stl(nottem, s.window = \"periodic\", robust = TRUE) # compare the original series to its decompositions. cbind( tidy(nottem), augment(d1), augment(d2) ) #> index value .seasonal .trend .remainder .seasadj .seasonal #> 1 1920.000 40.6 -9.3393640 NA NA 49.93936 -9.3419811 #> 2 1920.083 40.8 -9.8998904 NA NA 50.69989 -9.5256227 #> 3 1920.167 44.4 -6.9466009 NA NA 51.34660 -7.0008077 #> 4 1920.250 46.7 -2.7573465 NA NA 49.45735 -2.8175429 #> 5 1920.333 54.1 3.4533991 NA NA 50.64660 3.3639836 #> 6 1920.417 58.5 8.9865132 NA NA 49.51349 9.0952310 #> 7 1920.500 57.7 12.9672149 49.04167 -4.308881579 44.73279 12.8624908 #> 8 1920.583 56.4 11.4591009 49.15000 -4.209100877 44.94090 11.7116742 #> 9 1920.667 54.3 7.4001096 49.13750 -2.237609649 46.89989 7.4288506 #> 10 1920.750 50.5 0.6547149 49.17917 0.666118421 49.84529 0.3474728 #> 11 1920.833 42.9 -6.6176535 49.19167 0.325986842 49.51765 -6.5449727 #> 12 1920.917 39.8 -9.3601974 49.20000 -0.039802632 49.16020 -9.5787757 #> 13 1921.000 44.2 -9.3393640 49.56667 3.972697368 53.53936 -9.3419811 #> 14 1921.083 39.8 -9.8998904 50.07083 -0.370942982 49.69989 -9.5256227 #> 15 1921.167 45.1 -6.9466009 50.32917 1.717434211 52.04660 -7.0008077 #> 16 1921.250 47.0 -2.7573465 50.59583 -0.838486842 49.75735 -2.8175429 #> 17 1921.333 54.1 3.4533991 50.61667 0.029934211 50.64660 3.3639836 #> 18 1921.417 58.7 8.9865132 50.60833 -0.894846491 49.71349 9.0952310 #> 19 1921.500 66.3 12.9672149 50.45417 2.878618421 53.33279 12.8624908 #> 20 1921.583 59.9 11.4591009 50.12917 -1.688267544 48.44090 11.7116742 #> 21 1921.667 57.0 7.4001096 49.85000 -0.250109649 49.59989 7.4288506 #> 22 1921.750 54.2 0.6547149 49.41250 4.132785088 53.54529 0.3474728 #> 23 1921.833 39.7 -6.6176535 49.27500 -2.957346491 46.31765 -6.5449727 #> 24 1921.917 42.8 -9.3601974 49.30417 2.856030702 52.16020 -9.5787757 #> 25 1922.000 37.5 -9.3393640 48.87083 -2.031469298 46.83936 -9.3419811 #> 26 1922.083 38.7 -9.8998904 48.24167 0.358223684 48.59989 -9.5256227 #> 27 1922.167 39.5 -6.9466009 47.89583 -1.449232456 46.44660 -7.0008077 #> 28 1922.250 42.1 -2.7573465 47.48750 -2.630153509 44.85735 -2.8175429 #> 29 1922.333 55.7 3.4533991 47.27917 4.967434211 52.24660 3.3639836 #> 30 1922.417 57.8 8.9865132 47.32083 1.492653509 48.81349 9.0952310 #> 31 1922.500 56.8 12.9672149 47.45417 -3.621381579 43.83279 12.8624908 #> 32 1922.583 54.3 11.4591009 47.69167 -4.850767544 42.84090 11.7116742 #> 33 1922.667 54.3 7.4001096 47.89167 -0.991776316 46.89989 7.4288506 #> 34 1922.750 47.1 0.6547149 48.18750 -1.742214912 46.44529 0.3474728 #> 35 1922.833 41.8 -6.6176535 48.07083 0.346820175 48.41765 -6.5449727 #> 36 1922.917 41.7 -9.3601974 47.58750 3.472697368 51.06020 -9.5787757 #> 37 1923.000 41.8 -9.3393640 47.68333 3.456030702 51.13936 -9.3419811 #> 38 1923.083 40.1 -9.8998904 48.21250 1.787390351 49.99989 -9.5256227 #> 39 1923.167 42.9 -6.9466009 48.43750 1.409100877 49.84660 -7.0008077 #> 40 1923.250 45.8 -2.7573465 48.52917 0.028179825 48.55735 -2.8175429 #> 41 1923.333 49.2 3.4533991 48.38750 -2.640899123 45.74660 3.3639836 #> 42 1923.417 52.7 8.9865132 47.98750 -4.274013158 43.71349 9.0952310 #> 43 1923.500 64.2 12.9672149 47.71250 3.520285088 51.23279 12.8624908 #> 44 1923.583 59.6 11.4591009 47.50000 0.640899123 48.14090 11.7116742 #> 45 1923.667 54.4 7.4001096 47.20000 -0.200109649 46.99989 7.4288506 #> 46 1923.750 49.2 0.6547149 46.99583 1.549451754 48.54529 0.3474728 #> 47 1923.833 36.3 -6.6176535 47.15000 -4.232346491 42.91765 -6.5449727 #> 48 1923.917 37.6 -9.3601974 47.52500 -0.564802632 46.96020 -9.5787757 #> 49 1924.000 39.3 -9.3393640 47.59167 1.047697368 48.63936 -9.3419811 #> 50 1924.083 37.5 -9.8998904 47.39167 0.008223684 47.39989 -9.5256227 #> 51 1924.167 38.3 -6.9466009 47.41667 -2.170065789 45.24660 -7.0008077 #> 52 1924.250 45.5 -2.7573465 47.52500 0.732346491 48.25735 -2.8175429 #> 53 1924.333 53.2 3.4533991 47.88750 1.859100877 49.74660 3.3639836 #> 54 1924.417 57.7 8.9865132 48.47500 0.238486842 48.71349 9.0952310 #> 55 1924.500 60.8 12.9672149 48.75417 -0.921381579 47.83279 12.8624908 #> 56 1924.583 58.2 11.4591009 48.90833 -2.167434211 46.74090 11.7116742 #> 57 1924.667 56.4 7.4001096 49.13750 -0.137609649 48.99989 7.4288506 #> 58 1924.750 49.8 0.6547149 49.22500 -0.079714912 49.14529 0.3474728 #> 59 1924.833 44.4 -6.6176535 49.23333 1.784320175 51.01765 -6.5449727 #> 60 1924.917 43.6 -9.3601974 49.32917 3.631030702 52.96020 -9.5787757 #> 61 1925.000 40.0 -9.3393640 49.51250 -0.173135965 49.33936 -9.3419811 #> 62 1925.083 40.5 -9.8998904 49.74167 0.658223684 50.39989 -9.5256227 #> 63 1925.167 40.8 -6.9466009 49.71667 -1.970065789 47.74660 -7.0008077 #> 64 1925.250 45.1 -2.7573465 49.58333 -1.725986842 47.85735 -2.8175429 #> 65 1925.333 53.8 3.4533991 49.32917 1.017434211 50.34660 3.3639836 #> 66 1925.417 59.4 8.9865132 48.76250 1.650986842 50.41349 9.0952310 #> 67 1925.500 63.5 12.9672149 48.42500 2.107785088 50.53279 12.8624908 #> 68 1925.583 61.0 11.4591009 48.51250 1.028399123 49.54090 11.7116742 #> 69 1925.667 53.0 7.4001096 48.74167 -3.141776316 45.59989 7.4288506 #> 70 1925.750 50.0 0.6547149 49.00833 0.336951754 49.34529 0.3474728 #> 71 1925.833 38.1 -6.6176535 49.03333 -4.315679825 44.71765 -6.5449727 #> 72 1925.917 36.3 -9.3601974 48.79167 -3.131469298 45.66020 -9.5787757 #> 73 1926.000 39.2 -9.3393640 48.64167 -0.102302632 48.53936 -9.3419811 #> 74 1926.083 43.4 -9.8998904 48.64167 4.658223684 53.29989 -9.5256227 #> 75 1926.167 43.4 -6.9466009 48.87083 1.475767544 50.34660 -7.0008077 #> 76 1926.250 48.9 -2.7573465 48.92083 2.736513158 51.65735 -2.8175429 #> 77 1926.333 50.6 3.4533991 48.92917 -1.782565789 47.14660 3.3639836 #> 78 1926.417 56.8 8.9865132 49.22083 -1.407346491 47.81349 9.0952310 #> 79 1926.500 62.5 12.9672149 49.37500 0.157785088 49.53279 12.8624908 #> 80 1926.583 62.0 11.4591009 49.17917 1.361732456 50.54090 11.7116742 #> 81 1926.667 57.5 7.4001096 49.05417 1.045723684 50.09989 7.4288506 #> 82 1926.750 46.7 0.6547149 49.05833 -3.013048246 46.04529 0.3474728 #> 83 1926.833 41.6 -6.6176535 49.02917 -0.811513158 48.21765 -6.5449727 #> 84 1926.917 39.8 -9.3601974 49.00000 0.160197368 49.16020 -9.5787757 #> 85 1927.000 39.4 -9.3393640 48.83750 -0.098135965 48.73936 -9.3419811 #> 86 1927.083 38.5 -9.8998904 48.68750 -0.287609649 48.39989 -9.5256227 #> 87 1927.167 45.3 -6.9466009 48.50833 3.738267544 52.24660 -7.0008077 #> 88 1927.250 47.1 -2.7573465 48.54167 1.315679825 49.85735 -2.8175429 #> 89 1927.333 51.7 3.4533991 48.72083 -0.474232456 48.24660 3.3639836 #> 90 1927.417 55.0 8.9865132 48.55833 -2.544846491 46.01349 9.0952310 #> 91 1927.500 60.4 12.9672149 48.42500 -0.992214912 47.43279 12.8624908 #> 92 1927.583 60.5 11.4591009 48.59167 0.449232456 49.04090 11.7116742 #> 93 1927.667 54.7 7.4001096 48.59583 -1.295942982 47.29989 7.4288506 #> 94 1927.750 50.3 0.6547149 48.50000 1.145285088 49.64529 0.3474728 #> 95 1927.833 42.3 -6.6176535 48.47500 0.442653509 48.91765 -6.5449727 #> 96 1927.917 35.2 -9.3601974 48.50000 -3.939802632 44.56020 -9.5787757 #> 97 1928.000 40.8 -9.3393640 48.63333 1.506030702 50.13936 -9.3419811 #> 98 1928.083 41.1 -9.8998904 48.70833 2.291557018 50.99989 -9.5256227 #> 99 1928.167 42.8 -6.9466009 48.73750 1.009100877 49.74660 -7.0008077 #> 100 1928.250 47.3 -2.7573465 48.76250 1.294846491 50.05735 -2.8175429 #> 101 1928.333 50.9 3.4533991 48.78750 -1.340899123 47.44660 3.3639836 #> 102 1928.417 56.4 8.9865132 48.90417 -1.490679825 47.41349 9.0952310 #> 103 1928.500 62.2 12.9672149 48.74167 0.491118421 49.23279 12.8624908 #> 104 1928.583 60.5 11.4591009 48.08333 0.957565789 49.04090 11.7116742 #> 105 1928.667 55.4 7.4001096 47.60000 0.399890351 47.99989 7.4288506 #> 106 1928.750 50.2 0.6547149 47.38333 2.161951754 49.54529 0.3474728 #> 107 1928.833 43.0 -6.6176535 47.33333 2.284320175 49.61765 -6.5449727 #> 108 1928.917 37.3 -9.3601974 47.44583 -0.785635965 46.66020 -9.5787757 #> 109 1929.000 34.8 -9.3393640 47.47917 -3.339802632 44.13936 -9.3419811 #> 110 1929.083 31.3 -9.8998904 47.48333 -6.283442982 41.19989 -9.5256227 #> 111 1929.167 41.0 -6.9466009 47.65833 0.288267544 47.94660 -7.0008077 #> 112 1929.250 43.9 -2.7573465 47.80000 -1.142653509 46.65735 -2.8175429 #> 113 1929.333 53.1 3.4533991 47.75417 1.892434211 49.64660 3.3639836 #> 114 1929.417 56.9 8.9865132 47.94167 -0.028179825 47.91349 9.0952310 #> 115 1929.500 62.5 12.9672149 48.41667 1.116118421 49.53279 12.8624908 #> 116 1929.583 60.3 11.4591009 48.94167 -0.100767544 48.84090 11.7116742 #> 117 1929.667 59.8 7.4001096 49.19167 3.208223684 52.39989 7.4288506 #> 118 1929.750 49.2 0.6547149 49.32500 -0.779714912 48.54529 0.3474728 #> 119 1929.833 42.9 -6.6176535 49.37083 0.146820175 49.51765 -6.5449727 #> 120 1929.917 41.9 -9.3601974 49.43750 1.822697368 51.26020 -9.5787757 #> 121 1930.000 41.6 -9.3393640 49.48333 1.456030702 50.93936 -9.3419811 #> 122 1930.083 37.1 -9.8998904 49.43750 -2.437609649 46.99989 -9.5256227 #> 123 1930.167 41.2 -6.9466009 49.37500 -1.228399123 48.14660 -7.0008077 #> 124 1930.250 46.9 -2.7573465 49.32917 0.328179825 49.65735 -2.8175429 #> 125 1930.333 51.2 3.4533991 49.40417 -1.657565789 47.74660 3.3639836 #> 126 1930.417 60.4 8.9865132 49.27917 2.134320175 51.41349 9.0952310 #> 127 1930.500 60.1 12.9672149 48.96250 -1.829714912 47.13279 12.8624908 #> 128 1930.583 61.6 11.4591009 48.82917 1.311732456 50.14090 11.7116742 #> 129 1930.667 57.0 7.4001096 48.76667 0.833223684 49.59989 7.4288506 #> 130 1930.750 50.9 0.6547149 48.63333 1.611951754 50.24529 0.3474728 #> 131 1930.833 43.0 -6.6176535 48.71250 0.905153509 49.61765 -6.5449727 #> 132 1930.917 38.8 -9.3601974 48.72500 -0.564802632 48.16020 -9.5787757 #> 133 1931.000 37.1 -9.3393640 48.66250 -2.223135965 46.43936 -9.3419811 #> 134 1931.083 38.4 -9.8998904 48.54167 -0.241776316 48.29989 -9.5256227 #> 135 1931.167 38.4 -6.9466009 48.26667 -2.920065789 45.34660 -7.0008077 #> 136 1931.250 46.5 -2.7573465 47.95417 1.303179825 49.25735 -2.8175429 #> 137 1931.333 53.5 3.4533991 47.87917 2.167434211 50.04660 3.3639836 #> 138 1931.417 58.4 8.9865132 48.05833 1.355153509 49.41349 9.0952310 #> 139 1931.500 60.6 12.9672149 48.35417 -0.721381579 47.63279 12.8624908 #> 140 1931.583 58.2 11.4591009 48.57500 -1.834100877 46.74090 11.7116742 #> 141 1931.667 53.8 7.4001096 48.65417 -2.254276316 46.39989 7.4288506 #> 142 1931.750 46.6 0.6547149 48.65417 -2.708881579 45.94529 0.3474728 #> 143 1931.833 45.5 -6.6176535 48.46667 3.650986842 52.11765 -6.5449727 #> 144 1931.917 40.6 -9.3601974 48.30000 1.660197368 49.96020 -9.5787757 #> 145 1932.000 42.4 -9.3393640 48.30417 3.435197368 51.73936 -9.3419811 #> 146 1932.083 38.4 -9.8998904 48.58750 -0.287609649 48.29989 -9.5256227 #> 147 1932.167 40.3 -6.9466009 48.91250 -1.665899123 47.24660 -7.0008077 #> 148 1932.250 44.6 -2.7573465 49.04583 -1.688486842 47.35735 -2.8175429 #> 149 1932.333 50.9 3.4533991 48.99583 -1.549232456 47.44660 3.3639836 #> 150 1932.417 57.0 8.9865132 48.96667 -0.953179825 48.01349 9.0952310 #> 151 1932.500 62.1 12.9672149 48.75833 0.374451754 49.13279 12.8624908 #> 152 1932.583 63.5 11.4591009 48.53750 3.503399123 52.04090 11.7116742 #> 153 1932.667 56.3 7.4001096 48.75000 0.149890351 48.89989 7.4288506 #> 154 1932.750 47.3 0.6547149 49.09583 -2.450548246 46.64529 0.3474728 #> 155 1932.833 43.6 -6.6176535 49.40417 0.813486842 50.21765 -6.5449727 #> 156 1932.917 41.8 -9.3601974 49.70000 1.460197368 51.16020 -9.5787757 #> 157 1933.000 36.2 -9.3393640 50.00000 -4.460635965 45.53936 -9.3419811 #> 158 1933.083 39.3 -9.8998904 50.20000 -1.000109649 49.19989 -9.5256227 #> 159 1933.167 44.5 -6.9466009 50.41667 1.029934211 51.44660 -7.0008077 #> 160 1933.250 48.7 -2.7573465 50.69583 0.761513158 51.45735 -2.8175429 #> 161 1933.333 54.2 3.4533991 50.75417 -0.007565789 50.74660 3.3639836 #> 162 1933.417 60.8 8.9865132 50.44167 1.371820175 51.81349 9.0952310 #> 163 1933.500 65.5 12.9672149 50.32500 2.207785088 52.53279 12.8624908 #> 164 1933.583 64.9 11.4591009 50.41250 3.028399123 53.44090 11.7116742 #> 165 1933.667 60.1 7.4001096 50.19583 2.504057018 52.69989 7.4288506 #> 166 1933.750 50.2 0.6547149 49.95000 -0.404714912 49.54529 0.3474728 #> 167 1933.833 42.1 -6.6176535 49.84167 -1.124013158 48.71765 -6.5449727 #> 168 1933.917 35.8 -9.3601974 49.75833 -4.598135965 45.16020 -9.5787757 #> 169 1934.000 39.4 -9.3393640 49.75000 -1.010635965 48.73936 -9.3419811 #> 170 1934.083 38.2 -9.8998904 49.60417 -1.504276316 48.09989 -9.5256227 #> 171 1934.167 40.4 -6.9466009 49.37917 -2.032565789 47.34660 -7.0008077 #> 172 1934.250 46.9 -2.7573465 49.38333 0.274013158 49.65735 -2.8175429 #> 173 1934.333 53.4 3.4533991 49.45417 0.492434211 49.94660 3.3639836 #> 174 1934.417 59.6 8.9865132 49.90000 0.713486842 50.61349 9.0952310 #> 175 1934.500 66.5 12.9672149 50.34167 3.191118421 53.53279 12.8624908 #> 176 1934.583 60.4 11.4591009 50.55000 -1.609100877 48.94090 11.7116742 #> 177 1934.667 59.2 7.4001096 50.86250 0.937390351 51.79989 7.4288506 #> 178 1934.750 51.2 0.6547149 51.00000 -0.454714912 50.54529 0.3474728 #> 179 1934.833 42.8 -6.6176535 50.86667 -1.449013158 49.41765 -6.5449727 #> 180 1934.917 45.8 -9.3601974 50.76250 4.397697368 55.16020 -9.5787757 #> 181 1935.000 40.0 -9.3393640 50.72083 -1.381469298 49.33936 -9.3419811 #> 182 1935.083 42.6 -9.8998904 50.79167 1.708223684 52.49989 -9.5256227 #> 183 1935.167 43.5 -6.9466009 50.84167 -0.395065789 50.44660 -7.0008077 #> 184 1935.250 47.1 -2.7573465 50.63333 -0.775986842 49.85735 -2.8175429 #> 185 1935.333 50.0 3.4533991 50.58333 -4.036732456 46.54660 3.3639836 #> 186 1935.417 60.5 8.9865132 50.25000 1.263486842 51.51349 9.0952310 #> 187 1935.500 64.6 12.9672149 49.74583 1.886951754 51.63279 12.8624908 #> 188 1935.583 64.0 11.4591009 49.31667 3.224232456 52.54090 11.7116742 #> 189 1935.667 56.8 7.4001096 49.02083 0.379057018 49.39989 7.4288506 #> 190 1935.750 48.6 0.6547149 48.90833 -0.963048246 47.94529 0.3474728 #> 191 1935.833 44.2 -6.6176535 48.88750 1.930153509 50.81765 -6.5449727 #> 192 1935.917 36.4 -9.3601974 48.92083 -3.160635965 45.76020 -9.5787757 #> 193 1936.000 37.3 -9.3393640 48.65000 -2.010635965 46.63936 -9.3419811 #> 194 1936.083 35.0 -9.8998904 48.33750 -3.437609649 44.89989 -9.5256227 #> 195 1936.167 44.0 -6.9466009 48.27083 2.675767544 50.94660 -7.0008077 #> 196 1936.250 43.9 -2.7573465 48.36667 -1.709320175 46.65735 -2.8175429 #> 197 1936.333 52.7 3.4533991 48.30000 0.946600877 49.24660 3.3639836 #> 198 1936.417 58.6 8.9865132 48.39583 1.217653509 49.61349 9.0952310 #> 199 1936.500 60.0 12.9672149 48.74583 -1.713048246 47.03279 12.8624908 #> 200 1936.583 61.1 11.4591009 49.14167 0.499232456 49.64090 11.7116742 #> 201 1936.667 58.1 7.4001096 49.15833 1.541557018 50.69989 7.4288506 #> 202 1936.750 49.6 0.6547149 49.07083 -0.125548246 48.94529 0.3474728 #> 203 1936.833 41.6 -6.6176535 49.27500 -1.057346491 48.21765 -6.5449727 #> 204 1936.917 41.3 -9.3601974 49.33333 1.326864035 50.66020 -9.5787757 #> 205 1937.000 40.8 -9.3393640 49.39167 0.747697368 50.13936 -9.3419811 #> 206 1937.083 41.0 -9.8998904 49.47917 1.420723684 50.89989 -9.5256227 #> 207 1937.167 38.4 -6.9466009 49.43333 -4.086732456 45.34660 -7.0008077 #> 208 1937.250 47.4 -2.7573465 49.41250 0.744846491 50.15735 -2.8175429 #> 209 1937.333 54.1 3.4533991 49.45833 1.188267544 50.64660 3.3639836 #> 210 1937.417 58.6 8.9865132 49.27500 0.338486842 49.61349 9.0952310 #> 211 1937.500 61.4 12.9672149 49.15417 -0.721381579 48.43279 12.8624908 #> 212 1937.583 61.8 11.4591009 49.21667 1.124232456 50.34090 11.7116742 #> 213 1937.667 56.3 7.4001096 49.59583 -0.695942982 48.89989 7.4288506 #> 214 1937.750 50.9 0.6547149 49.93333 0.311951754 50.24529 0.3474728 #> 215 1937.833 41.4 -6.6176535 49.82917 -1.811513158 48.01765 -6.5449727 #> 216 1937.917 37.1 -9.3601974 49.77500 -3.314802632 46.46020 -9.5787757 #> 217 1938.000 42.1 -9.3393640 49.71667 1.722697368 51.43936 -9.3419811 #> 218 1938.083 41.2 -9.8998904 49.58333 1.516557018 51.09989 -9.5256227 #> 219 1938.167 47.3 -6.9466009 49.55417 4.692434211 54.24660 -7.0008077 #> 220 1938.250 46.6 -2.7573465 49.57500 -0.217653509 49.35735 -2.8175429 #> 221 1938.333 52.4 3.4533991 49.83333 -0.886732456 48.94660 3.3639836 #> 222 1938.417 59.0 8.9865132 50.18750 -0.174013158 50.01349 9.0952310 #> 223 1938.500 59.6 12.9672149 50.16250 -3.529714912 46.63279 12.8624908 #> 224 1938.583 60.4 11.4591009 50.03750 -1.096600877 48.94090 11.7116742 #> 225 1938.667 57.0 7.4001096 49.82083 -0.220942982 49.59989 7.4288506 #> 226 1938.750 50.7 0.6547149 49.66667 0.378618421 50.04529 0.3474728 #> 227 1938.833 47.8 -6.6176535 49.71667 4.700986842 54.41765 -6.5449727 #> 228 1938.917 39.2 -9.3601974 49.67500 -1.114802632 48.56020 -9.5787757 #> 229 1939.000 39.4 -9.3393640 49.67917 -0.939802632 48.73936 -9.3419811 #> 230 1939.083 40.9 -9.8998904 49.78333 1.016557018 50.79989 -9.5256227 #> 231 1939.167 42.4 -6.9466009 49.89167 -0.545065789 49.34660 -7.0008077 #> 232 1939.250 47.8 -2.7573465 49.77500 0.782346491 50.55735 -2.8175429 #> 233 1939.333 52.4 3.4533991 49.55833 -0.611732456 48.94660 3.3639836 #> 234 1939.417 58.0 8.9865132 49.45000 -0.436513158 49.01349 9.0952310 #> 235 1939.500 60.7 12.9672149 NA NA 47.73279 12.8624908 #> 236 1939.583 61.8 11.4591009 NA NA 50.34090 11.7116742 #> 237 1939.667 58.2 7.4001096 NA NA 50.79989 7.4288506 #> 238 1939.750 46.7 0.6547149 NA NA 46.04529 0.3474728 #> 239 1939.833 46.6 -6.6176535 NA NA 53.21765 -6.5449727 #> 240 1939.917 37.8 -9.3601974 NA NA 47.16020 -9.5787757 #> .trend .remainder .weight .seasadj #> 1 50.01420 -0.07222032 0.9998117442 49.94198 #> 2 49.92165 0.40397500 0.9941070247 50.32562 #> 3 49.82909 1.57171369 0.9126802010 51.40081 #> 4 49.76684 -0.24930092 0.9977553984 49.51754 #> 5 49.70459 1.03142281 0.9619042613 50.73602 #> 6 49.66925 -0.26447916 0.9974748211 49.40477 #> 7 49.63390 -4.79639351 0.3412380823 44.83751 #> 8 49.59154 -4.90321001 0.3197191080 44.68833 #> 9 49.54917 -2.67801942 0.7575428238 46.87115 #> 10 49.53142 0.62110779 0.9860987725 50.15253 #> 11 49.51367 -0.06869727 0.9998295734 49.44497 #> 12 49.67527 -0.29648970 0.9968240120 49.37878 #> 13 49.83686 3.70512025 0.5652530794 53.54198 #> 14 50.01995 -0.69432647 0.9826486724 49.32562 #> 15 50.20304 1.89777018 0.8740330207 52.10081 #> 16 50.21930 -0.40175826 0.9941717811 49.81754 #> 17 50.23556 0.50045164 0.9909689604 50.73602 #> 18 50.08369 -0.47892462 0.9917222061 49.60477 #> 19 49.93182 3.50568674 0.6050590645 53.43751 #> 20 49.64468 -1.45635323 0.9247811015 48.18833 #> 21 49.35754 0.21361388 0.9983531664 49.57115 #> 22 49.04307 4.80945774 0.3386139271 53.85253 #> 23 48.72860 -2.48363068 0.7893864291 46.24497 #> 24 48.41063 3.96814679 0.5117966525 52.37878 #> 25 48.09265 -1.25067337 0.9442359375 46.84198 #> 26 47.78527 0.44034827 0.9930065146 48.22562 #> 27 47.47789 -0.97708673 0.9657717152 46.50081 #> 28 47.32123 -2.40368684 0.8020068621 44.91754 #> 29 47.16456 5.17145139 0.2668499980 52.33602 #> 30 47.25341 1.45135602 0.9252972241 48.70477 #> 31 47.34226 -3.40475173 0.6248069424 43.93751 #> 32 47.54890 -4.96057839 0.3082343237 42.58833 #> 33 47.75555 -0.88439797 0.9719230049 46.87115 #> 34 47.94715 -1.19461825 0.9490683389 46.75253 #> 35 48.13874 0.20622919 0.9984634649 48.34497 #> 36 48.29300 2.98577154 0.7036777265 51.27878 #> 37 48.44726 2.69471628 0.7546879672 51.14198 #> 38 48.54072 1.08490473 0.9578945067 49.62562 #> 39 48.63417 1.26663654 0.9428345049 49.90081 #> 40 48.56948 0.04806673 0.9999163166 48.61754 #> 41 48.50478 -2.66876475 0.7590860969 45.83602 #> 42 48.29876 -4.69399240 0.3620667289 43.60477 #> 43 48.09274 3.24476757 0.6555667956 51.33751 #> 44 47.88957 -0.00124428 1.0000000000 47.88833 #> 45 47.68640 -0.71524905 0.9815940273 46.97115 #> 46 47.63720 1.21532552 0.9473121845 48.85253 #> 47 47.58800 -4.74303219 0.3520504143 42.84497 #> 48 47.62960 -0.45082633 0.9926638286 47.17878 #> 49 47.67120 0.97078191 0.9662141749 48.64198 #> 50 47.71188 -0.68625939 0.9830480211 47.02562 #> 51 47.75257 -2.45175731 0.7944868364 45.30081 #> 52 47.91295 0.40459740 0.9940901051 48.31754 #> 53 48.07333 1.76269045 0.8908237990 49.83602 #> 54 48.34262 0.26214603 0.9975164909 48.60477 #> 55 48.61192 -0.67441076 0.9836242049 47.93751 #> 56 48.81156 -2.32323163 0.8143918072 46.48833 #> 57 49.01119 -0.04004542 0.9999420200 48.97115 #> 58 49.12549 0.32703709 0.9961383276 49.45253 #> 59 49.23979 1.70518732 0.8976499774 50.94497 #> 60 49.35392 3.82485679 0.5410514810 53.17878 #> 61 49.46805 -0.12607135 0.9994255569 49.34198 #> 62 49.52972 0.49590417 0.9911290425 50.02562 #> 63 49.59138 -1.79057694 0.8874418517 47.80081 #> 64 49.45273 -1.53518313 0.9166077211 47.91754 #> 65 49.31407 1.12194902 0.9550103719 50.43602 #> 66 49.10862 1.19614862 0.9489389693 50.30477 #> 67 48.90317 1.73433583 0.8942072882 50.63751 #> 68 48.89233 0.39599547 0.9943367859 49.28833 #> 69 48.88149 -3.31033782 0.6430636675 45.57115 #> 70 48.91397 0.73855880 0.9803781333 49.65253 #> 71 48.94645 -4.30147685 0.4429222034 44.64497 #> 72 48.90282 -3.02404619 0.6966932090 45.87878 #> 73 48.85919 -0.31721315 0.9963661650 48.54198 #> 74 48.89413 4.03149740 0.4987159288 52.92562 #> 75 48.92906 1.47175131 0.9232248776 50.40081 #> 76 49.03010 2.68744640 0.7559341735 51.71754 #> 77 49.13114 -1.89512018 0.8743670152 47.23602 #> 78 49.14031 -1.43554225 0.9268852631 47.70477 #> 79 49.14949 0.48802331 0.9914078255 49.63751 #> 80 49.07881 1.20951191 0.9478052716 50.28833 #> 81 49.00814 1.06300760 0.9595633931 50.07115 #> 82 48.97150 -2.61897582 0.7673895643 46.35253 #> 83 48.93486 -0.78989152 0.9775667489 48.14497 #> 84 48.86818 0.51059666 0.9906000832 49.37878 #> 85 48.80149 -0.05951278 0.9998720920 48.74198 #> 86 48.70096 -0.67533648 0.9835797380 48.02562 #> 87 48.60042 3.70038320 0.5662269876 52.30081 #> 88 48.56807 1.34947559 0.9352460403 49.91754 #> 89 48.53571 -0.19969368 0.9985585123 48.33602 #> 90 48.52398 -2.61921491 0.7673600584 45.90477 #> 91 48.51226 -0.97474852 0.9659450343 47.53751 #> 92 48.54413 0.24419096 0.9978443356 48.78833 #> 93 48.57601 -1.30486248 0.9393918863 47.27115 #> 94 48.64185 1.31067824 0.9388599059 49.95253 #> 95 48.70769 0.13728668 0.9993192008 48.84497 #> 96 48.78245 -4.00367641 0.5044250461 44.77878 #> 97 48.85722 1.28476289 0.9412111825 50.14198 #> 98 48.89771 1.72791339 0.8949676412 50.62562 #> 99 48.93820 0.86260727 0.9732797776 49.80081 #> 100 48.94613 1.17141777 0.9510048139 50.11754 #> 101 48.95405 -1.41803340 0.9286221314 47.53602 #> 102 48.84896 -1.54418747 0.9156534095 47.30477 #> 103 48.74386 0.59364608 0.9872985476 49.33751 #> 104 48.54573 0.24259718 0.9978720183 48.78833 #> 105 48.34759 -0.37644464 0.9948844472 47.97115 #> 106 48.24623 1.60629421 0.9088932779 49.85253 #> 107 48.14487 1.40010078 0.9303867756 49.54497 #> 108 48.15934 -1.28056361 0.9415880523 46.87878 #> 109 48.17381 -4.03182561 0.4986653502 44.14198 #> 110 48.21910 -7.39348007 0.0001410611 40.82562 #> 111 48.26440 -0.26359115 0.9974900911 48.00081 #> 112 48.35951 -1.64196854 0.9049062600 46.71754 #> 113 48.45462 1.28139240 0.9415175359 49.73602 #> 114 48.67785 -0.87308338 0.9726337710 47.80477 #> 115 48.90108 0.73642845 0.9804880657 49.63751 #> 116 49.09419 -0.50586696 0.9907719650 48.58833 #> 117 49.28730 3.08384471 0.6857277896 52.37115 #> 118 49.34557 -0.49304083 0.9912296487 48.85253 #> 119 49.40383 0.04114136 0.9999389708 49.44497 #> 120 49.40282 2.07595514 0.8502744159 51.47878 #> 121 49.40181 1.54017131 0.9160740197 50.94198 #> 122 49.37361 -2.74798299 0.7456279645 46.62562 #> 123 49.34540 -1.14459392 0.9531961859 48.20081 #> 124 49.30543 0.41211746 0.9938690055 49.71754 #> 125 49.26545 -1.42943281 0.9274919729 47.83602 #> 126 49.18880 2.11597148 0.8446745881 51.30477 #> 127 49.11215 -1.87463661 0.8769857050 47.23751 #> 128 49.00675 0.88157510 0.9720955921 49.88833 #> 129 48.90136 0.66979390 0.9838451572 49.57115 #> 130 48.83104 1.72148929 0.8957307927 50.55253 #> 131 48.76072 0.78425241 0.9778898297 49.54497 #> 132 48.68865 -0.30987458 0.9965298006 48.37878 #> 133 48.61658 -2.17459917 0.8363490822 46.44198 #> 134 48.45541 -0.52979050 0.9898793425 47.92562 #> 135 48.29425 -2.89343846 0.7202274168 45.40081 #> 136 48.16174 1.15580354 0.9522865331 49.31754 #> 137 48.02923 2.10678389 0.8459719861 50.13602 #> 138 48.11025 1.19451432 0.9490780631 49.30477 #> 139 48.19128 -0.45376763 0.9925693662 47.73751 #> 140 48.28599 -1.79766513 0.8865827207 46.48833 #> 141 48.38070 -2.00955555 0.8593276261 46.37115 #> 142 48.33674 -2.08421321 0.8491078381 46.25253 #> 143 48.29278 3.75219686 0.5557873995 52.04497 #> 144 48.28919 1.88958246 0.8750956552 50.17878 #> 145 48.28561 3.45637045 0.6147301243 51.74198 #> 146 48.41723 -0.49161070 0.9912807969 47.92562 #> 147 48.54886 -1.24804849 0.9444757336 47.30081 #> 148 48.62483 -1.20728397 0.9479970261 47.41754 #> 149 48.70080 -1.16478111 0.9515491014 47.53602 #> 150 48.72498 -0.82021192 0.9758272720 47.90477 #> 151 48.74916 0.48834488 0.9913958496 49.23751 #> 152 48.90068 2.88764978 0.7212401964 51.78833 #> 153 49.05219 -0.18103825 0.9988160917 48.87115 #> 154 49.30960 -2.35707551 0.8092259009 46.95253 #> 155 49.56702 0.57795496 0.9879606342 50.14497 #> 156 49.83909 1.53968834 0.9161343536 51.37878 #> 157 50.11116 -4.56917590 0.3876547579 45.54198 #> 158 50.36702 -1.54139691 0.9159538098 48.82562 #> 159 50.62288 0.87792544 0.9723268320 51.50081 #> 160 50.78526 0.73228255 0.9807054171 51.51754 #> 161 50.94764 -0.11162200 0.9995497433 50.83602 #> 162 50.89302 0.81174825 0.9763159822 51.70477 #> 163 50.83840 1.79910611 0.8863986646 52.63751 #> 164 50.61542 2.57290085 0.7749790813 53.18833 #> 165 50.39245 2.27870268 0.8210810117 52.67115 #> 166 50.16815 -0.31561873 0.9964011804 49.85253 #> 167 49.94385 -1.29887241 0.9399319885 48.64497 #> 168 49.76381 -4.38503285 0.4256237643 45.37878 #> 169 49.58377 -0.84179092 0.9745475926 48.74198 #> 170 49.49997 -1.77435174 0.8894181190 47.72562 #> 171 49.41618 -2.01536920 0.8585443585 47.40081 #> 172 49.51935 0.19819417 0.9985805427 49.71754 #> 173 49.62252 0.41349587 0.9938289408 50.03602 #> 174 49.86562 0.63914438 0.9852855184 50.50477 #> 175 50.10873 3.52878051 0.6004799186 53.63751 #> 176 50.30759 -1.61926856 0.9074527330 48.68833 #> 177 50.50646 1.26468946 0.9430139300 51.77115 #> 178 50.56288 0.28964243 0.9969710616 50.85253 #> 179 50.61931 -1.27433689 0.9421411984 49.34497 #> 180 50.60801 4.77076099 0.3464437038 55.37878 #> 181 50.59672 -1.25473874 0.9438903719 49.34198 #> 182 50.58026 1.54536684 0.9155261150 52.12562 #> 183 50.56379 -0.06298420 0.9998563787 50.50081 #> 184 50.48101 -0.56347034 0.9885529916 49.91754 #> 185 50.39823 -3.76221813 0.5537331235 46.63602 #> 186 50.17364 1.23113289 0.9459516122 51.40477 #> 187 49.94904 1.78847153 0.8876995218 51.73751 #> 188 49.67770 2.61062346 0.7687682152 52.28833 #> 189 49.40637 -0.03521753 0.9999552490 49.37115 #> 190 49.20639 -0.95386492 0.9673753542 48.25253 #> 191 49.00642 1.73855541 0.8937126444 50.74497 #> 192 48.83367 -2.85489600 0.7270306698 45.97878 #> 193 48.66093 -2.01894503 0.8580717515 46.64198 #> 194 48.54482 -4.01919856 0.5012586635 44.52562 #> 195 48.42872 2.57209128 0.7751200799 51.00081 #> 196 48.46736 -1.74981759 0.8923691510 46.71754 #> 197 48.50600 0.83001189 0.9752479203 49.33602 #> 198 48.68877 0.81599782 0.9760694451 49.50477 #> 199 48.87154 -1.73402862 0.8942494353 47.13751 #> 200 49.06001 0.32831580 0.9961051216 49.38833 #> 201 49.24848 1.42266730 0.9281619459 50.67115 #> 202 49.36046 -0.10793320 0.9995787408 49.25253 #> 203 49.47244 -1.32746597 0.9373027598 48.14497 #> 204 49.53805 1.34072499 0.9360748588 50.87878 #> 205 49.60366 0.53831833 0.9895484886 50.14198 #> 206 49.62887 0.89674911 0.9711359461 50.52562 #> 207 49.65408 -4.25327673 0.4529118759 45.40081 #> 208 49.61740 0.60014021 0.9870205102 50.21754 #> 209 49.58072 1.15529549 0.9523277817 50.73602 #> 210 49.53425 -0.02948220 0.9999686594 49.50477 #> 211 49.48778 -0.95027228 0.9676207494 48.53751 #> 212 49.50857 0.57975352 0.9878829547 50.08833 #> 213 49.52936 -0.65821360 0.9843982323 48.87115 #> 214 49.57767 0.97485321 0.9659406952 50.55253 #> 215 49.62598 -1.68101226 0.9004371545 47.94497 #> 216 49.59498 -2.91620283 0.7161544741 46.67878 #> 217 49.56397 1.87800899 0.8765541165 51.44198 #> 218 49.53556 1.19006148 0.9494547021 50.72562 #> 219 49.50715 4.79365735 0.3417807348 54.30081 #> 220 49.53811 -0.12056488 0.9994741681 49.41754 #> 221 49.56907 -0.53304877 0.9897514479 49.03602 #> 222 49.57742 0.32735314 0.9961300420 49.90477 #> 223 49.58577 -2.84825734 0.7282020458 46.73751 #> 224 49.53627 -0.84794729 0.9741745765 48.68833 #> 225 49.48678 0.08436985 0.9997428525 49.57115 #> 226 49.48966 0.86286796 0.9732679392 50.35253 #> 227 49.49254 4.85243380 0.3299127676 54.34497 #> 228 49.51944 -0.74066544 0.9802586379 48.77878 #> 229 49.54634 -0.80436230 0.9767456685 48.74198 #> 230 49.54330 0.88232445 0.9720537415 50.42562 #> 231 49.54025 -0.13944543 0.9992967282 49.40081 #> 232 49.46247 1.15507606 0.9523490606 50.61754 #> 233 49.38468 -0.34866410 0.9956083428 49.03602 #> 234 49.28384 -0.37907304 0.9948109879 48.90477 #> 235 49.18300 -1.34549436 0.9356161725 47.83751 #> 236 49.07716 1.01116267 0.9633774008 50.08833 #> 237 48.97132 1.79982679 0.8863220646 50.77115 #> 238 48.86598 -2.51344847 0.7846257080 46.35253 #> 239 48.76063 4.38434399 0.4258156270 53.14497 #> 240 48.65426 -1.27547980 0.9420313503 47.37878 # visually compare seasonal decompositions in tidy data frames. library(tibble) library(dplyr) library(tidyr) library(ggplot2) decomps <- tibble( # turn the ts objects into data frames. series = list(as.data.frame(nottem), as.data.frame(nottem)), # add the models in, one for each row. decomp = c(\"decompose\", \"stl\"), model = list(d1, d2) ) %>% rowwise() %>% # pull out the fitted data using broom::augment. mutate(augment = list(broom::augment(model))) %>% ungroup() %>% # unnest the data frames into a tidy arrangement of # the series next to its seasonal decomposition, grouped # by the method (stl or decompose). group_by(decomp) %>% unnest(c(series, augment)) %>% mutate(index = 1:n()) %>% ungroup() %>% select(decomp, index, x, adjusted = .seasadj) #> Error in select(., decomp, index, x, adjusted = .seasadj): unused arguments (decomp, index, x, adjusted = .seasadj) ggplot(decomps) + geom_line(aes(x = index, y = x), colour = \"black\") + geom_line(aes( x = index, y = adjusted, colour = decomp, group = decomp )) #> Error: object 'decomps' not found"},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) drc object — augment.drc","title":"Augment data with information from a(n) drc object — augment.drc","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) drc object — augment.drc","text":"","code":"# S3 method for class 'drc' augment( x, data = NULL, newdata = NULL, se_fit = FALSE, conf.int = FALSE, conf.level = 0.95, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) drc object — augment.drc","text":"x drc object produced call drc::drm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) drc object — augment.drc","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .lower Lower bound interval fitted values. .resid difference observed fitted values. .se.fit Standard errors fitted values. .upper Upper bound interval fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) drc object — augment.drc","text":"","code":"# load libraries for models and data library(drc) #> #> 'drc' has been loaded. #> Please cite R and 'drc' if used for a publication, #> for references type 'citation()' and 'citation('drc')'. #> #> Attaching package: ‘drc’ #> The following objects are masked from ‘package:stats’: #> #> gaussian, getInitial # fit model mod <- drm(dead / total ~ conc, type, weights = total, data = selenium, fct = LL.2(), type = \"binomial\" ) # summarize model fit with tidiers tidy(mod) #> # A tibble: 8 × 6 #> term curve estimate std.error statistic p.value #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 #> 5 e 1 252. 13.8 18.2 1.16e-74 #> 6 e 2 378. 39.4 9.61 3.53e-22 #> 7 e 3 120. 5.91 20.3 1.14e-91 #> 8 e 4 88.8 8.62 10.3 3.28e-25 tidy(mod, conf.int = TRUE) #> # A tibble: 8 × 8 #> term curve estimate std.error statistic p.value conf.low conf.high #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 -1.81 -1.20 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 -1.12 -0.571 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 -2.43 -1.89 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 -1.78 -1.12 #> 5 e 1 252. 13.8 18.2 1.16e-74 225. 279. #> 6 e 2 378. 39.4 9.61 3.53e-22 301. 456. #> 7 e 3 120. 5.91 20.3 1.14e-91 108. 131. #> 8 e 4 88.8 8.62 10.3 3.28e-25 71.9 106. glance(mod) #> # A tibble: 1 × 4 #> AIC BIC logLik df.residual #> #> 1 768. 778. -376.2099 17 augment(mod, selenium) #> # A tibble: 25 × 7 #> type conc total dead .fitted .resid .cooksd #> #> 1 1 0 151 3 0 0.0199 0 #> 2 1 100 146 40 0.199 0.0748 0.0000909 #> 3 1 200 116 31 0.414 -0.146 0.000104 #> 4 1 300 159 85 0.565 -0.0302 0.00000516 #> 5 1 400 150 102 0.667 0.0133 0.00000220 #> 6 1 500 140 112 0.737 0.0633 0.0000720 #> 7 2 0 141 2 0 0.0142 0 #> 8 2 100 153 30 0.246 -0.0495 0.000168 #> 9 2 200 142 59 0.369 0.0468 0.0000347 #> 10 2 300 139 82 0.451 0.139 0.0000430 #> # ℹ 15 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/augment.factanal.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) factanal object — augment.factanal","title":"Augment data with information from a(n) factanal object — augment.factanal","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.factanal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) factanal object — augment.factanal","text":"","code":"# S3 method for class 'factanal' augment(x, data, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.factanal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) factanal object — augment.factanal","text":"x factanal object created stats::factanal(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.factanal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) factanal object — augment.factanal","text":"data supplied augment.factanal returns one row observation, factor score column added factor X, (.fsX). stats::factanal(), unlike stats methods like stats::lm(), retain original data. data supplied, augment.factanal returns one row observation, factor score column added factor X, (.fsX).","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) felm object — augment.felm","title":"Augment data with information from a(n) felm object — augment.felm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) felm object — augment.felm","text":"","code":"# S3 method for class 'felm' augment(x, data = model.frame(x), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) felm object — augment.felm","text":"x felm object returned lfe::felm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) felm object — augment.felm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) felm object — augment.felm","text":"","code":"# load libraries for models and data library(lfe) #> Loading required package: Matrix #> #> Attaching package: ‘Matrix’ #> The following objects are masked from ‘package:tidyr’: #> #> expand, pack, unpack #> #> Attaching package: ‘lfe’ #> The following object is masked from ‘package:lmtest’: #> #> waldtest # use built-in `airquality` dataset head(airquality) #> Ozone Solar.R Wind Temp Month Day #> 1 41 190 7.4 67 5 1 #> 2 36 118 8.0 72 5 2 #> 3 12 149 12.6 74 5 3 #> 4 18 313 11.5 62 5 4 #> 5 NA NA 14.3 56 5 5 #> 6 28 NA 14.9 66 5 6 # no FEs; same as lm() est0 <- felm(Ozone ~ Temp + Wind + Solar.R, airquality) # summarize model fit with tidiers tidy(est0) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -64.3 23.1 -2.79 0.00623 #> 2 Temp 1.65 0.254 6.52 0.00000000242 #> 3 Wind -3.33 0.654 -5.09 0.00000152 #> 4 Solar.R 0.0598 0.0232 2.58 0.0112 augment(est0) #> # A tibble: 111 × 7 #> .rownames Ozone Temp Wind Solar.R .fitted .resid #> #> 1 1 41 67 7.4 190 33.0 7.95 #> 2 2 36 72 8 118 35.0 1.00 #> 3 3 12 74 12.6 149 24.8 -12.8 #> 4 4 18 62 11.5 313 18.5 -0.475 #> 5 7 23 65 8.6 299 32.3 -9.26 #> 6 8 19 59 13.8 99 -6.95 25.9 #> 7 9 8 61 20.1 19 -29.4 37.4 #> 8 12 16 69 9.7 256 32.6 -16.6 #> 9 13 11 66 9.2 290 31.4 -20.4 #> 10 14 14 68 10.9 274 28.1 -14.1 #> # ℹ 101 more rows # add month fixed effects est1 <- felm(Ozone ~ Temp + Wind + Solar.R | Month, airquality) # summarize model fit with tidiers tidy(est1) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, fe = TRUE) #> # A tibble: 8 × 7 #> term estimate std.error statistic p.value N comp #> #> 1 Temp 1.88 0.341 5.50 0.000000274 NA NA #> 2 Wind -3.11 0.660 -4.71 0.00000778 NA NA #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 NA NA #> 4 Month.5 -74.2 4.23 -17.5 2.00 24 1 #> 5 Month.6 -89.0 6.91 -12.9 2.00 9 1 #> 6 Month.7 -83.0 4.06 -20.4 2 26 1 #> 7 Month.8 -78.4 4.32 -18.2 2.00 23 1 #> 8 Month.9 -90.2 3.85 -23.4 2 29 1 augment(est1) #> # A tibble: 111 × 8 #> .rownames Ozone Temp Wind Solar.R Month .fitted .resid #> #> 1 1 41 67 7.4 190 5 38.3 2.69 #> 2 2 36 72 8 118 5 42.1 -6.07 #> 3 3 12 74 12.6 149 5 33.1 -21.1 #> 4 4 18 62 11.5 313 5 22.6 -4.62 #> 5 7 23 65 8.6 299 5 36.5 -13.5 #> 6 8 19 59 13.8 99 5 -1.33 20.3 #> 7 9 8 61 20.1 19 5 -21.3 29.3 #> 8 12 16 69 9.7 256 5 38.4 -22.4 #> 9 13 11 66 9.2 290 5 36.1 -25.1 #> 10 14 14 68 10.9 274 5 33.7 -19.7 #> # ℹ 101 more rows glance(est1) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.637 0.612 20.7 25.8 4.57e-20 103 103 111 # the \"se.type\" argument can be used to switch out different standard errors # types on the fly. In turn, this can be useful exploring the effect of # different error structures on model inference. tidy(est1, se.type = \"iid\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, se.type = \"robust\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.344 5.45 0.000000344 #> 2 Wind -3.11 0.903 -3.44 0.000834 #> 3 Solar.R 0.0522 0.0226 2.31 0.0227 # add clustered SEs (also by month) est2 <- felm(Ozone ~ Temp + Wind + Solar.R | Month | 0 | Month, airquality) # summarize model fit with tidiers tidy(est2, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"cluster\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"robust\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.344 5.45 0.00550 0.920 2.83 #> 2 Wind -3.11 0.903 -3.44 0.0262 -5.62 -0.602 #> 3 Solar.R 0.0522 0.0226 2.31 0.0817 -0.0104 0.115 tidy(est2, conf.int = TRUE, se.type = \"iid\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.341 5.50 0.00532 0.929 2.82 #> 2 Wind -3.11 0.660 -4.71 0.00924 -4.94 -1.28 #> 3 Solar.R 0.0522 0.0237 2.21 0.0920 -0.0135 0.118"},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) fixest object — augment.fixest","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"","code":"# S3 method for class 'fixest' augment( x, data = NULL, newdata = NULL, type.predict = c(\"link\", \"response\"), type.residuals = c(\"response\", \"deviance\", \"pearson\", \"working\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"x fixest object returned fixest estimators data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Passed predict.fixest type argument. Defaults \"link\" (like predict.glm). type.residuals Passed predict.fixest type argument. Defaults \"response\" (like residuals.lm, unlike residuals.glm). ... Additional arguments passed summary confint. Important arguments se cluster. arguments dof, exact_dof, forceCovariance, keepBounded. See summary.fixest.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"Important note: fixest models include copy input data, must provide manually. augment.fixest works fixest::feols(), fixest::feglm(), fixest::femlm() models. work results fixest::fenegbin(), fixest::feNmlm(), fixest::fepois().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"","code":"# load libraries for models and data library(fixest) #> #> Attaching package: ‘fixest’ #> The following object is masked from ‘package:lfe’: #> #> fepois gravity <- feols( log(Euros) ~ log(dist_km) | Origin + Destination + Product + Year, trade ) tidy(gravity) #> # A tibble: 1 × 5 #> term estimate std.error statistic p.value #> #> 1 log(dist_km) -2.17 0.154 -14.1 0.00000000119 glance(gravity) #> # A tibble: 1 × 9 #> r.squared adj.r.squared within.r.squared pseudo.r.squared sigma nobs #> #> 1 0.706 0.705 0.219 NA 1.74 38325 #> # ℹ 3 more variables: AIC , BIC , logLik augment(gravity, trade) #> # A tibble: 38,325 × 9 #> .rownames Destination Origin Product Year dist_km Euros .fitted #> #> 1 1 LU BE 1 2007 140. 2966697 14.1 #> 2 2 BE LU 1 2007 140. 6755030 13.0 #> 3 3 LU BE 2 2007 140. 57078782 16.9 #> 4 4 BE LU 2 2007 140. 7117406 15.8 #> 5 5 LU BE 3 2007 140. 17379821 16.3 #> 6 6 BE LU 3 2007 140. 2622254 15.2 #> 7 7 LU BE 4 2007 140. 64867588 17.4 #> 8 8 BE LU 4 2007 140. 10731757 16.3 #> 9 9 LU BE 5 2007 140. 330702 14.1 #> 10 10 BE LU 5 2007 140. 7706 13.0 #> # ℹ 38,315 more rows #> # ℹ 1 more variable: .resid # to get robust or clustered SEs, users can either: # 1) specify the arguments directly in the `tidy()` call tidy(gravity, conf.int = TRUE, cluster = c(\"Product\", \"Year\")) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 tidy(gravity, conf.int = TRUE, se = \"threeway\") #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.175 -12.4 6.08e-9 -2.54 -1.79 # 2) or, feed tidy() a summary.fixest object that has already accepted # these arguments gravity_summ <- summary(gravity, cluster = c(\"Product\", \"Year\")) tidy(gravity_summ, conf.int = TRUE) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 # approach (1) is preferred."},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) gam object — augment.gam","title":"Augment data with information from a(n) gam object — augment.gam","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) gam object — augment.gam","text":"","code":"# S3 method for class 'gam' augment( x, data = model.frame(x), newdata = NULL, type.predict, type.residuals, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) gam object — augment.gam","text":"x gam object returned call mgcv::gam(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) gam object — augment.gam","text":"additional details Cook's distance, see stats::cooks.distance().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) gam object — augment.gam","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .hat Diagonal hat matrix. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) gam object — augment.gam","text":"","code":"# load libraries for models and data library(mgcv) #> Loading required package: nlme #> #> Attaching package: ‘nlme’ #> The following object is masked from ‘package:dplyr’: #> #> collapse #> This is mgcv 1.9-1. For overview type 'help(\"mgcv-package\")'. #> #> Attaching package: ‘mgcv’ #> The following object is masked from ‘package:mclust’: #> #> mvn # fit model g <- gam(mpg ~ s(hp) + am + qsec, data = mtcars) # summarize model fit with tidiers tidy(g) #> # A tibble: 1 × 5 #> term edf ref.df statistic p.value #> #> 1 s(hp) 2.36 3.02 6.34 0.00218 tidy(g, parametric = TRUE) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 16.7 9.83 1.70 0.101 #> 2 am 4.37 1.56 2.81 0.00918 #> 3 qsec 0.0904 0.525 0.172 0.865 glance(g) #> # A tibble: 1 × 9 #> df logLik AIC BIC deviance df.residual nobs adj.r.squared npar #> #> 1 5.36 -74.4 162. 171. 196. 26.6 32 0.797 12 augment(g) #> # A tibble: 32 × 11 #> .rownames mpg am qsec hp .fitted .se.fit .resid .hat .sigma #> #> 1 Mazda RX4 21 1 16.5 110 24.3 1.03 -3.25 0.145 NA #> 2 Mazda RX4… 21 1 17.0 110 24.3 0.925 -3.30 0.116 NA #> 3 Datsun 710 22.8 1 18.6 93 26.0 0.894 -3.22 0.109 NA #> 4 Hornet 4 … 21.4 0 19.4 110 20.2 0.827 1.25 0.0930 NA #> 5 Hornet Sp… 18.7 0 17.0 175 15.7 0.815 3.02 0.0902 NA #> 6 Valiant 18.1 0 20.2 105 20.7 0.914 -2.56 0.113 NA #> 7 Duster 360 14.3 0 15.8 245 12.7 1.11 1.63 0.167 NA #> 8 Merc 240D 24.4 0 20 62 25.0 1.45 -0.618 0.287 NA #> 9 Merc 230 22.8 0 22.9 95 21.8 1.81 0.959 0.446 NA #> 10 Merc 280 19.2 0 18.3 123 19.0 0.864 0.211 0.102 NA #> # ℹ 22 more rows #> # ℹ 1 more variable: .cooksd "},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) glm object — augment.glm","title":"Augment data with information from a(n) glm object — augment.glm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) glm object — augment.glm","text":"","code":"# S3 method for class 'glm' augment( x, data = model.frame(x), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) glm object — augment.glm","text":"x glm object returned stats::glm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Passed stats::predict.glm() type argument. Defaults \"link\". type.residuals Passed stats::residuals.glm() stats::rstandard.glm() type arguments. Defaults \"deviance\". se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) glm object — augment.glm","text":"weights observations model 0, columns \".infl\" \".hat\" result 0 observations. .resid column calculated data specified via newdata argument.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) glm object — augment.glm","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .hat Diagonal hat matrix. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model. .std.resid Standardised residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.glmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) glmRob object — augment.glmRob","title":"Augment data with information from a(n) glmRob object — augment.glmRob","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.glmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) glmRob object — augment.glmRob","text":"","code":"# S3 method for class 'glmRob' augment(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.glmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) glmRob object — augment.glmRob","text":"x Unused. ... Unused.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) htest object — augment.htest","title":"Augment data with information from a(n) htest object — augment.htest","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) htest object — augment.htest","text":"","code":"# S3 method for class 'htest' augment(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) htest object — augment.htest","text":"x htest objected, created stats::cor.test(), stats::t.test(), stats::wilcox.test(), stats::chisq.test(), etc. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) htest object — augment.htest","text":"See stats::chisq.test() details residuals computed.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) htest object — augment.htest","text":"tibble::tibble() exactly one row columns: .observed Observed count. .prop Proportion total. .row.prop Row proportion (2 dimensions table ). .col.prop Column proportion (2 dimensions table ). .expected Expected count null hypothesis. .resid Pearson residuals. .std.resid Standardized residual.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) htest object — augment.htest","text":"","code":"tt <- t.test(rnorm(10)) tidy(tt) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.177 -0.539 0.603 9 -0.918 0.565 One Sample t-te… #> # ℹ 1 more variable: alternative # the glance output will be the same for each of the below tests glance(tt) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.177 -0.539 0.603 9 -0.918 0.565 One Sample t-te… #> # ℹ 1 more variable: alternative tt <- t.test(mpg ~ am, data = mtcars) tidy(tt) #> # A tibble: 1 × 10 #> estimate estimate1 estimate2 statistic p.value parameter conf.low #> #> 1 -7.24 17.1 24.4 -3.77 0.00137 18.3 -11.3 #> # ℹ 3 more variables: conf.high , method , alternative wt <- wilcox.test(mpg ~ am, data = mtcars, conf.int = TRUE, exact = FALSE) tidy(wt) #> # A tibble: 1 × 7 #> estimate statistic p.value conf.low conf.high method alternative #> #> 1 -6.80 42 0.00187 -11.7 -2.90 Wilcoxon rank… two.sided ct <- cor.test(mtcars$wt, mtcars$mpg) tidy(ct) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.868 -9.56 1.29e-10 30 -0.934 -0.744 Pearson's prod… #> # ℹ 1 more variable: alternative chit <- chisq.test(xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic))) tidy(chit) #> # A tibble: 1 × 4 #> statistic p.value parameter method #> #> 1 350. 1.56e-75 3 Pearson's Chi-squared test augment(chit) #> # A tibble: 8 × 9 #> Sex Class .observed .prop .row.prop .col.prop .expected .resid #> #> 1 Male 1st 180 0.0818 0.104 0.554 256. -4.73 #> 2 Female 1st 145 0.0659 0.309 0.446 69.4 9.07 #> 3 Male 2nd 179 0.0813 0.103 0.628 224. -3.02 #> 4 Female 2nd 106 0.0482 0.226 0.372 60.9 5.79 #> 5 Male 3rd 510 0.232 0.295 0.722 555. -1.92 #> 6 Female 3rd 196 0.0891 0.417 0.278 151. 3.68 #> 7 Male Crew 862 0.392 0.498 0.974 696. 6.29 #> 8 Female Crew 23 0.0104 0.0489 0.0260 189. -12.1 #> # ℹ 1 more variable: .std.resid "},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) ivreg object — augment.ivreg","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"","code":"# S3 method for class 'ivreg' augment(x, data = model.frame(x), newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"x ivreg object created call AER::ivreg(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"tidier currently supports ivreg-classed objects outputted AER package. ivreg package also outputs objects class ivreg, supported later release.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"","code":"# load libraries for models and data library(AER) #> Loading required package: car #> Loading required package: carData #> #> Attaching package: ‘car’ #> The following object is masked from ‘package:purrr’: #> #> some #> The following object is masked from ‘package:dplyr’: #> #> recode # load data data(\"CigarettesSW\", package = \"AER\") # fit model ivr <- ivreg( log(packs) ~ income | population, data = CigarettesSW, subset = year == \"1995\" ) # summarize model fit with tidiers tidy(ivr) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 tidy(ivr, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 4.52e+0 4.70e+ 0 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 -1.03e-9 -1.13e-10 tidy(ivr, conf.int = TRUE, instruments = TRUE) #> # A tibble: 1 × 5 #> term num.df den.df statistic p.value #> #> 1 income 1 46 3329. 1.46e-44 augment(ivr) #> # A tibble: 48 × 6 #> .rownames `log(packs)` income population .fitted .resid #> #> 1 49 4.62 83903280 4262731 4.56 0.0522 #> 2 50 4.71 45995496 2480121 4.59 0.124 #> 3 51 4.28 88870496 4306908 4.56 -0.285 #> 4 52 4.04 771470144 31493524 4.17 -0.131 #> 5 53 4.41 92946544 3738061 4.56 -0.145 #> 6 54 4.38 104315120 3265293 4.55 -0.177 #> 7 55 4.82 18237436 718265 4.60 0.223 #> 8 56 4.53 333525344 14185403 4.42 0.112 #> 9 57 4.58 159800448 7188538 4.52 0.0591 #> 10 58 4.53 60170928 2840860 4.58 -0.0512 #> # ℹ 38 more rows augment(ivr, data = CigarettesSW) #> # A tibble: 96 × 11 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.56 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.59 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.56 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.17 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.56 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.55 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.60 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.42 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.52 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.58 #> # ℹ 86 more rows #> # ℹ 1 more variable: .resid augment(ivr, newdata = CigarettesSW) #> # A tibble: 96 × 10 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.59 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.60 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.59 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.36 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.58 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.58 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.61 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.52 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.57 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.59 #> # ℹ 86 more rows glance(ivr) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.131 0.112 0.229 5.98 0.0184 2 46 48"},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) kmeans object — augment.kmeans","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"","code":"# S3 method for class 'kmeans' augment(x, data, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"x kmeans object created stats::kmeans(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"tibble::tibble() columns: .cluster Cluster assignment.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"","code":"library(cluster) library(modeldata) library(dplyr) data(hpc_data) x <- hpc_data[, 2:5] fit <- pam(x, k = 4) tidy(fit) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(fit) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(fit, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) lm object — augment.lm","title":"Augment data with information from a(n) lm object — augment.lm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) lm object — augment.lm","text":"","code":"# S3 method for class 'lm' augment( x, data = model.frame(x), newdata = NULL, se_fit = FALSE, interval = c(\"none\", \"confidence\", \"prediction\"), conf.level = 0.95, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) lm object — augment.lm","text":"x lm object created stats::lm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. interval Character indicating type confidence interval columns added augmented output. Passed predict() defaults \"none\". conf.level confidence level use interval created interval \"confidence\" \"prediction\". Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence/prediction interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) lm object — augment.lm","text":"modeling performed na.action = \"na.omit\" (typical default), rows NA initial data omitted entirely augmented data frame. modeling performed na.action = \"na.exclude\", one provide original data second argument, point augmented data contain rows (typically NAs place new columns). original data provided augment() na.action = \"na.exclude\", warning raised incomplete rows dropped. unusual lm objects, rlm MASS, may omit .cooksd .std.resid. gam mgcv omits .sigma. newdata supplied, returns .fitted, .resid .se.fit columns.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) lm object — augment.lm","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .hat Diagonal hat matrix. .lower Lower bound interval fitted values. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model. .std.resid Standardised residuals. .upper Upper bound interval fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) lm object — augment.lm","text":"","code":"library(ggplot2) library(dplyr) mod <- lm(mpg ~ wt + qsec, data = mtcars) tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # coefficient plot d <- tidy(mod, conf.int = TRUE) ggplot(d, aes(estimate, term, xmin = conf.low, xmax = conf.high, height = 0)) + geom_point() + geom_vline(xintercept = 0, lty = 4) + geom_errorbarh() # aside: There are tidy() and glance() methods for lm.summary objects too. # this can be useful when you want to conserve memory by converting large lm # objects into their leaner summary.lm equivalents. s <- summary(mod) tidy(s, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(s) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32 augment(mod) #> # A tibble: 32 × 10 #> .rownames mpg wt qsec .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 0.0693 2.64 2.63e-3 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 0.0444 2.64 5.59e-6 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 0.0607 2.60 2.17e-2 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 0.0576 2.64 1.05e-4 #> 5 Hornet Sportab… 18.7 3.44 17.0 18.2 0.504 0.0389 2.64 5.29e-4 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 0.0957 2.58 5.10e-2 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 0.0729 2.61 1.93e-2 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 0.0791 2.61 2.18e-2 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 0.295 2.59 1.59e-1 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 0.0358 2.64 6.55e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid augment(mod, mtcars, interval = \"confidence\") #> # A tibble: 32 × 20 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 9 more variables: carb , .fitted , .lower , #> # .upper , .resid , .hat , .sigma , .cooksd , #> # .std.resid # predict on new data newdata <- mtcars %>% head(6) %>% mutate(wt = wt + 1) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid # ggplot2 example where we also construct 95% prediction interval # simpler bivariate model since we're plotting in 2D mod2 <- lm(mpg ~ wt, data = mtcars) au <- augment(mod2, newdata = newdata, interval = \"prediction\") ggplot(au, aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) + geom_ribbon(aes(ymin = .lower, ymax = .upper), col = NA, alpha = 0.3) # predict on new data without outcome variable. Output does not include .resid newdata <- newdata %>% select(-mpg) #> Error in select(., -mpg): unused argument (-mpg) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + geom_vline(size = 2, colour = \"white\", xintercept = 0) + geom_hline(size = 2, colour = \"white\", yintercept = 0) + geom_point() + geom_smooth(se = FALSE) #> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0. #> ℹ Please use `linewidth` instead. #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' plot(mod, which = 6) ggplot(au, aes(.hat, .cooksd)) + geom_vline(xintercept = 0, colour = NA) + geom_abline(slope = seq(0, 3, by = 0.5), colour = \"white\") + geom_smooth(se = FALSE) + geom_point() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # column-wise models a <- matrix(rnorm(20), nrow = 10) b <- a + rnorm(length(a)) result <- lm(b ~ a) tidy(result) #> # A tibble: 6 × 6 #> response term estimate std.error statistic p.value #> #> 1 Y1 (Intercept) -0.292 0.280 -1.04 0.332 #> 2 Y1 a1 1.28 0.232 5.50 0.000903 #> 3 Y1 a2 -0.519 0.187 -2.78 0.0274 #> 4 Y2 (Intercept) -0.0923 0.259 -0.357 0.732 #> 5 Y2 a1 -0.231 0.214 -1.08 0.317 #> 6 Y2 a2 0.768 0.172 4.45 0.00296"},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) lmRob object — augment.lmRob","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"","code":"# S3 method for class 'lmRob' augment(x, data = model.frame(x), newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"x lmRob object returned robust::lmRob(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"","code":"# load modeling library library(robust) #> Loading required package: fit.models # fit model m <- lmRob(mpg ~ wt, data = mtcars) # summarize model fit with tidiers tidy(m) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 35.6 3.58 9.93 5.37e-11 #> 2 wt -4.91 1.09 -4.49 9.67e- 5 augment(m) #> # A tibble: 32 × 4 #> .rownames mpg wt .fitted #> #> 1 Mazda RX4 21 2.62 22.7 #> 2 Mazda RX4 Wag 21 2.88 21.4 #> 3 Datsun 710 22.8 2.32 24.2 #> 4 Hornet 4 Drive 21.4 3.22 19.8 #> 5 Hornet Sportabout 18.7 3.44 18.7 #> 6 Valiant 18.1 3.46 18.6 #> 7 Duster 360 14.3 3.57 18.0 #> 8 Merc 240D 24.4 3.19 19.9 #> 9 Merc 230 22.8 3.15 20.1 #> 10 Merc 280 19.2 3.44 18.7 #> # ℹ 22 more rows glance(m) #> # A tibble: 1 × 5 #> r.squared deviance sigma df.residual nobs #> #> 1 0.567 136. 2.95 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) loess object — augment.loess","title":"Tidy a(n) loess object — augment.loess","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) loess object — augment.loess","text":"","code":"# S3 method for class 'loess' augment(x, data = model.frame(x), newdata = NULL, se_fit = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) loess object — augment.loess","text":"x loess objects returned stats::loess(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) loess object — augment.loess","text":"modeling performed na.action = \"na.omit\" (typical default), rows NA initial data omitted entirely augmented data frame. modeling performed na.action = \"na.exclude\", one provide original data second argument, point augmented data contain rows (typically NAs place new columns). original data provided augment() na.action = \"na.exclude\", warning raised incomplete rows dropped. Note loess objects default predict data outside bounding hypercube defined training data unless original loess object fit control = loess.control(surface = \\\"direct\\\")). See stats::predict.loess() details.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) loess object — augment.loess","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values. .se.fit Standard errors fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) loess object — augment.loess","text":"","code":"lo <- loess( mpg ~ hp + wt, mtcars, control = loess.control(surface = \"direct\") ) augment(lo) #> # A tibble: 32 × 6 #> .rownames mpg hp wt .fitted .resid #> #> 1 Mazda RX4 21 110 2.62 21.4 -0.435 #> 2 Mazda RX4 Wag 21 110 2.88 20.9 0.0976 #> 3 Datsun 710 22.8 93 2.32 24.7 -1.88 #> 4 Hornet 4 Drive 21.4 110 3.22 19.6 1.76 #> 5 Hornet Sportabout 18.7 175 3.44 16.7 2.02 #> 6 Valiant 18.1 105 3.46 18.9 -0.833 #> 7 Duster 360 14.3 245 3.57 14.9 -0.641 #> 8 Merc 240D 24.4 62 3.19 25.1 -0.695 #> 9 Merc 230 22.8 95 3.15 21.4 1.43 #> 10 Merc 280 19.2 123 3.44 18.4 0.801 #> # ℹ 22 more rows # with all columns of original data augment(lo, mtcars) #> # A tibble: 32 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 3 more variables: carb , .fitted , .resid # with a new dataset augment(lo, newdata = head(mtcars)) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid "},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) mfx object — augment.mfx","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"","code":"# S3 method for class 'mfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... ) # S3 method for class 'logitmfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... ) # S3 method for class 'negbinmfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... ) # S3 method for class 'poissonmfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... ) # S3 method for class 'probitmfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"x logitmfx, negbinmfx, poissonmfx, probitmfx object. (Note betamfx objects receive set tidiers.) data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Passed stats::predict.glm() type argument. Defaults \"link\". type.residuals Passed stats::residuals.glm() stats::rstandard.glm() type arguments. Defaults \"deviance\". se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"generic augment method wraps augment.glm() applicable objects mfx package.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .hat Diagonal hat matrix. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model. .std.resid Standardised residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"","code":"# load libraries for models and data library(mfx) # get the marginal effects from a logit regression mod_logmfx <- logitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) tidy(mod_logmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0538 0.113 0.475 0.635 -0.178 0.286 #> 2 hp TRUE 0.00359 0.00290 1.24 0.216 -0.00236 0.00954 #> 3 wt TRUE -1.01 0.668 -1.51 0.131 -2.38 0.359 # compare with the naive model coefficients of the same logit call tidy( glm(am ~ cyl + hp + wt, family = binomial, data = mtcars), conf.int = TRUE ) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 8.56 44.3 #> 2 cyl 0.488 1.07 0.455 0.649 -1.53 3.12 #> 3 hp 0.0326 0.0189 1.73 0.0840 0.00332 0.0884 #> 4 wt -9.15 4.15 -2.20 0.0276 -21.4 -3.48 augment(mod_logmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_logmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # another example, this time using probit regression mod_probmfx <- probitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred tidy(mod_probmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0616 0.112 0.548 0.583 -0.169 0.292 #> 2 hp TRUE 0.00383 0.00282 1.36 0.174 -0.00194 0.00960 #> 3 wt TRUE -1.06 0.594 -1.78 0.0753 -2.27 0.160 augment(mod_probmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 1.21 0.490 0.308 0.585 2.05e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.129 1.27 0.249 0.526 1.36e-1 #> 3 Datsun 7… 1 4 93 2.32 1.85 0.256 0.134 0.594 1.48e-3 #> 4 Hornet 4… 0 6 110 3.22 -1.92 -0.237 0.116 0.594 1.05e-3 #> 5 Hornet S… 0 8 175 3.44 -1.25 -0.474 0.236 0.587 1.20e-2 #> 6 Valiant 0 6 105 3.46 -3.30 -0.0312 0.0111 0.596 1.39e-6 #> 7 Duster 3… 0 8 245 3.57 -0.595 -0.804 0.285 0.567 5.32e-2 #> 8 Merc 240D 0 4 62 3.19 -3.31 -0.0304 0.0179 0.596 2.15e-6 #> 9 Merc 230 0 4 95 3.15 -2.47 -0.116 0.130 0.596 2.89e-4 #> 10 Merc 280 0 6 123 3.44 -2.85 -0.0662 0.0315 0.596 1.84e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_probmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.80 17.6 23.5 9.59 28 32"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) mjoint object — augment.mjoint","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"","code":"# S3 method for class 'mjoint' augment(x, data = x$data, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"x mjoint object returned joineRML::mjoint(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"tibble::tibble() one row original observation addition columns: .fitted_j_0 population-level fitted values j-th longitudinal process .fitted_j_1 individuals-level fitted values j-th longitudinal process .resid_j_0 population-level residuals j-th longitudinal process .resid_j_1 individual-level residuals j-th longitudinal process","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"See joineRML::fitted.mjoint() joineRML::residuals.mjoint() information difference population-level individual-level fitted values residuals. fitting joint model single longitudinal process, make sure using named list define formula fixed random effects longitudinal submodel.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"","code":"# broom only skips running these examples because the example models take a # while to generate—they should run just fine, though! if (FALSE) { # \\dontrun{ # load libraries for models and data library(joineRML) # fit a joint model with bivariate longitudinal outcomes data(heart.valve) hvd <- heart.valve[!is.na(heart.valve$log.grad) & !is.na(heart.valve$log.lvmi) & heart.valve$num <= 50, ] fit <- mjoint( formLongFixed = list( \"grad\" = log.grad ~ time + sex + hs, \"lvmi\" = log.lvmi ~ time + sex ), formLongRandom = list( \"grad\" = ~ 1 | num, \"lvmi\" = ~ time | num ), formSurv = Surv(fuyrs, status) ~ age, data = hvd, inits = list(\"gamma\" = c(0.11, 1.51, 0.80)), timeVar = \"time\" ) # extract the survival fixed effects tidy(fit) # extract the longitudinal fixed effects tidy(fit, component = \"longitudinal\") # extract the survival fixed effects with confidence intervals tidy(fit, ci = TRUE) # extract the survival fixed effects with confidence intervals based # on bootstrapped standard errors bSE <- bootSE(fit, nboot = 5, safe.boot = TRUE) tidy(fit, boot_se = bSE, ci = TRUE) # augment original data with fitted longitudinal values and residuals hvd2 <- augment(fit) # extract model statistics glance(fit) } # }"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) mlogit object — augment.mlogit","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"","code":"# S3 method for class 'mlogit' augment(x, data = x$model, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"x object returned mlogit::mlogit(). data currently used ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"moment works estimation dataset. Need set predict another dataset.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"tibble::tibble() columns: .fitted Fitted predicted value. .probability Class probability modal class. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"","code":"# load libraries for models and data library(mlogit) #> Loading required package: dfidx #> #> Attaching package: ‘dfidx’ #> The following object is masked from ‘package:ordinal’: #> #> slice #> The following object is masked from ‘package:MASS’: #> #> select #> The following object is masked from ‘package:stats’: #> #> filter #> #> Attaching package: ‘mlogit’ #> The following object is masked from ‘package:lfe’: #> #> waldtest data(\"Fishing\", package = \"mlogit\") Fish <- dfidx(Fishing, varying = 2:9, shape = \"wide\", choice = \"mode\") # fit model m <- mlogit(mode ~ price + catch | income, data = Fish) # summarize model fit with tidiers tidy(m) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept):boat 0.527 0.223 2.37 1.79e- 2 #> 2 (Intercept):charter 1.69 0.224 7.56 3.95e-14 #> 3 (Intercept):pier 0.778 0.220 3.53 4.18e- 4 #> 4 price -0.0251 0.00173 -14.5 0 #> 5 catch 0.358 0.110 3.26 1.12e- 3 #> 6 income:boat 0.0000894 0.0000501 1.79 7.40e- 2 #> 7 income:charter -0.0000333 0.0000503 -0.661 5.08e- 1 #> 8 income:pier -0.000128 0.0000506 -2.52 1.18e- 2 augment(m) #> # A tibble: 4,728 × 9 #> id alternative chosen price catch income .probability .fitted #> #> 1 1 beach FALSE 158. 0.0678 7083. 0.125 -3.94 #> 2 1 boat FALSE 158. 0.260 7083. 0.427 -2.71 #> 3 1 charter TRUE 183. 0.539 7083. 0.339 -2.94 #> 4 1 pier FALSE 158. 0.0503 7083. 0.109 -4.07 #> 5 2 beach FALSE 15.1 0.105 1250. 0.116 -0.342 #> 6 2 boat FALSE 10.5 0.157 1250. 0.251 0.431 #> 7 2 charter TRUE 34.5 0.467 1250. 0.423 0.952 #> 8 2 pier FALSE 15.1 0.0451 1250. 0.210 0.255 #> 9 3 beach FALSE 162. 0.533 3750. 0.00689 -3.87 #> 10 3 boat TRUE 24.3 0.241 3750. 0.465 0.338 #> # ℹ 4,718 more rows #> # ℹ 1 more variable: .resid glance(m) #> # A tibble: 1 × 6 #> logLik rho2 rho20 AIC BIC nobs #> #> 1 -1215. 0.189 0.258 2446. NA 1182"},{"path":"https://broom.tidymodels.org/dev/reference/augment.nlrq.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) nlrq object — augment.nlrq","title":"Tidy a(n) nlrq object — augment.nlrq","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.nlrq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) nlrq object — augment.nlrq","text":"","code":"# S3 method for class 'nlrq' augment(x, data = NULL, newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.nlrq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) nlrq object — augment.nlrq","text":"x nlrq object returned quantreg::nlrq(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.nlrq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) nlrq object — augment.nlrq","text":"","code":"# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 k 49.7 3.79 13.1 5.96e-14 #> 2 e 0.746 0.0199 37.5 8.86e-27 augment(n) #> # A tibble: 32 × 4 #> mpg wt .fitted .resid #> #> 1 21 2.62 23.0 -2.01 #> 2 21 2.88 21.4 -0.352 #> 3 22.8 2.32 25.1 -2.33 #> 4 21.4 3.22 19.3 2.08 #> 5 18.7 3.44 18.1 0.611 #> 6 18.1 3.46 18.0 0.117 #> 7 14.3 3.57 17.4 -3.11 #> 8 24.4 3.19 19.5 4.93 #> 9 22.8 3.15 19.7 3.10 #> 10 19.2 3.44 18.1 1.11 #> # ℹ 22 more rows glance(n) #> # A tibble: 1 × 9 #> sigma isConv finTol logLik AIC BIC deviance df.residual nobs #> #> 1 2.67 TRUE 0.00000204 -75.8 158. 162. 214. 30 32 library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata) #> # A tibble: 6 × 13 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 2 more variables: carb , .fitted "},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) nls object — augment.nls","title":"Augment data with information from a(n) nls object — augment.nls","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) nls object — augment.nls","text":"","code":"# S3 method for class 'nls' augment(x, data = NULL, newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) nls object — augment.nls","text":"x nls object returned stats::nls(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) nls object — augment.nls","text":"augment.nls currently support confidence intervals due lack support stats::predict.nls().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) nls object — augment.nls","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) nls object — augment.nls","text":"","code":"# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 k 49.7 3.79 13.1 5.96e-14 #> 2 e 0.746 0.0199 37.5 8.86e-27 augment(n) #> # A tibble: 32 × 4 #> mpg wt .fitted .resid #> #> 1 21 2.62 23.0 -2.01 #> 2 21 2.88 21.4 -0.352 #> 3 22.8 2.32 25.1 -2.33 #> 4 21.4 3.22 19.3 2.08 #> 5 18.7 3.44 18.1 0.611 #> 6 18.1 3.46 18.0 0.117 #> 7 14.3 3.57 17.4 -3.11 #> 8 24.4 3.19 19.5 4.93 #> 9 22.8 3.15 19.7 3.10 #> 10 19.2 3.44 18.1 1.11 #> # ℹ 22 more rows glance(n) #> # A tibble: 1 × 9 #> sigma isConv finTol logLik AIC BIC deviance df.residual nobs #> #> 1 2.67 TRUE 0.00000204 -75.8 158. 162. 214. 30 32 library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata) #> # A tibble: 6 × 13 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 2 more variables: carb , .fitted "},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) pam object — augment.pam","title":"Augment data with information from a(n) pam object — augment.pam","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) pam object — augment.pam","text":"","code":"# S3 method for class 'pam' augment(x, data = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) pam object — augment.pam","text":"x pam object returned cluster::pam() data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) pam object — augment.pam","text":"tibble::tibble() columns: .cluster Cluster assignment. .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) pam object — augment.pam","text":"","code":"# load libraries for models and data library(dplyr) library(ggplot2) library(cluster) library(modeldata) data(hpc_data) x <- hpc_data[, 2:5] p <- pam(x, k = 4) # summarize model fit with tidiers + visualization tidy(p) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(p) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(p, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows augment(p, x) %>% ggplot(aes(compounds, input_fields)) + geom_point(aes(color = .cluster)) + geom_text(aes(label = cluster), data = tidy(p), size = 10)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) plm object — augment.plm","title":"Augment data with information from a(n) plm object — augment.plm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) plm object — augment.plm","text":"","code":"# S3 method for class 'plm' augment(x, data = model.frame(x), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) plm object — augment.plm","text":"x plm objected returned plm::plm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) plm object — augment.plm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) plm object — augment.plm","text":"","code":"# load libraries for models and data library(plm) #> #> Attaching package: ‘plm’ #> The following object is masked from ‘package:mlogit’: #> #> has.intercept #> The following object is masked from ‘package:lfe’: #> #> sargan #> The following objects are masked from ‘package:dplyr’: #> #> between, lag, lead # load data data(\"Produc\", package = \"plm\") # fit model zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, index = c(\"state\", \"year\") ) # summarize model fit with tidiers summary(zz) #> Oneway (individual) effect Within Model #> #> Call: #> plm(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, #> data = Produc, index = c(\"state\", \"year\")) #> #> Balanced Panel: n = 48, T = 17, N = 816 #> #> Residuals: #> Min. 1st Qu. Median 3rd Qu. Max. #> -0.120456 -0.023741 -0.002041 0.018144 0.174718 #> #> Coefficients: #> Estimate Std. Error t-value Pr(>|t|) #> log(pcap) -0.02614965 0.02900158 -0.9017 0.3675 #> log(pc) 0.29200693 0.02511967 11.6246 < 2.2e-16 *** #> log(emp) 0.76815947 0.03009174 25.5273 < 2.2e-16 *** #> unemp -0.00529774 0.00098873 -5.3582 1.114e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Total Sum of Squares: 18.941 #> Residual Sum of Squares: 1.1112 #> R-Squared: 0.94134 #> Adj. R-Squared: 0.93742 #> F-statistic: 3064.81 on 4 and 764 DF, p-value: < 2.22e-16 tidy(zz) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 tidy(zz, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0830 0.0307 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.243 0.341 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.709 0.827 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00724 -0.00336 tidy(zz, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0739 0.0216 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.251 0.333 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.719 0.818 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00692 -0.00367 augment(zz) #> # A tibble: 816 × 7 #> `log(gsp)` `log(pcap)` `log(pc)` `log(emp)` unemp .fitted .resid #> #> 1 10.25478 9.617981 10.48553 6.918201 4.7 10.3 -0.046561413 #> 2 10.28790 9.648720 10.52675 6.929419 5.2 10.3 -0.030640422 #> 3 10.35147 9.678618 10.56283 6.977561 4.7 10.4 -0.016454312 #> 4 10.41721 9.705418 10.59873 7.034828 3.9 10.4 -0.008726974 #> 5 10.42671 9.726910 10.64679 7.064588 5.5 10.5 -0.027084312 #> 6 10.42240 9.759401 10.69130 7.052202 7.7 10.4 -0.022368930 #> 7 10.48470 9.783175 10.82420 7.095893 6.8 10.5 -0.036587629 #> 8 10.53111 9.804326 10.84125 7.146142 7.4 10.6 -0.030020604 #> 9 10.59573 9.824430 10.87055 7.197810 6.3 10.6 -0.018942497 #> 10 10.62082 9.845937 10.90643 7.216709 7.1 10.6 -0.014057170 #> # ℹ 806 more rows glance(zz) #> # A tibble: 1 × 7 #> r.squared adj.r.squared statistic p.value deviance df.residual nobs #> #> 1 0.941 0.937 3065. 0 1.11 764 816"},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) poLCA object — augment.poLCA","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"","code":"# S3 method for class 'poLCA' augment(x, data = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"x poLCA object returned poLCA::poLCA(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"data argument given, columns included output (rows predictions made). Otherwise, y element poLCA object, contains manifest variables used fit model, used, along covariates, present, x. Note probability classes (just predicted modal class) can found posterior element, included augmented output.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"tibble::tibble() columns: .class Predicted class. .probability Class probability modal class.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"","code":"# load libraries for models and data library(poLCA) #> Loading required package: scatterplot3d library(dplyr) # generate data data(values) f <- cbind(A, B, C, D) ~ 1 # fit model M1 <- poLCA(f, values, nclass = 2, verbose = FALSE) M1 #> Conditional item response (column) probabilities, #> by outcome variable, for each class (row) #> #> $A #> Pr(1) Pr(2) #> class 1: 0.2864 0.7136 #> class 2: 0.0068 0.9932 #> #> $B #> Pr(1) Pr(2) #> class 1: 0.6704 0.3296 #> class 2: 0.0602 0.9398 #> #> $C #> Pr(1) Pr(2) #> class 1: 0.6460 0.3540 #> class 2: 0.0735 0.9265 #> #> $D #> Pr(1) Pr(2) #> class 1: 0.8676 0.1324 #> class 2: 0.2309 0.7691 #> #> Estimated class population shares #> 0.7208 0.2792 #> #> Predicted class memberships (by modal posterior prob.) #> 0.6713 0.3287 #> #> ========================================================= #> Fit for 2 latent classes: #> ========================================================= #> number of observations: 216 #> number of estimated parameters: 9 #> residual degrees of freedom: 6 #> maximum log-likelihood: -504.4677 #> #> AIC(2): 1026.935 #> BIC(2): 1057.313 #> G^2(2): 2.719922 (Likelihood ratio/deviance statistic) #> X^2(2): 2.719764 (Chi-square goodness of fit) #> # summarize model fit with tidiers + visualization tidy(M1) #> # A tibble: 16 × 5 #> variable class outcome estimate std.error #> #> 1 A 1 1 0.286 0.0393 #> 2 A 2 1 0.00681 0.0254 #> 3 A 1 2 0.714 0.0393 #> 4 A 2 2 0.993 0.0254 #> 5 B 1 1 0.670 0.0489 #> 6 B 2 1 0.0602 0.0649 #> 7 B 1 2 0.330 0.0489 #> 8 B 2 2 0.940 0.0649 #> 9 C 1 1 0.646 0.0482 #> 10 C 2 1 0.0735 0.0642 #> 11 C 1 2 0.354 0.0482 #> 12 C 2 2 0.927 0.0642 #> 13 D 1 1 0.868 0.0379 #> 14 D 2 1 0.231 0.0929 #> 15 D 1 2 0.132 0.0379 #> 16 D 2 2 0.769 0.0929 augment(M1) #> # A tibble: 216 × 7 #> A B C D X.Intercept. .class .probability #> #> 1 2 2 2 2 1 2 0.959 #> 2 2 2 2 2 1 2 0.959 #> 3 2 2 2 2 1 2 0.959 #> 4 2 2 2 2 1 2 0.959 #> 5 2 2 2 2 1 2 0.959 #> 6 2 2 2 2 1 2 0.959 #> 7 2 2 2 2 1 2 0.959 #> 8 2 2 2 2 1 2 0.959 #> 9 2 2 2 2 1 2 0.959 #> 10 2 2 2 2 1 2 0.959 #> # ℹ 206 more rows glance(M1) #> # A tibble: 1 × 8 #> logLik AIC BIC g.squared chi.squared df df.residual nobs #> #> 1 -504. 1027. 1057. 2.72 2.72 9 6 216 library(ggplot2) ggplot(tidy(M1), aes(factor(class), estimate, fill = factor(outcome))) + geom_bar(stat = \"identity\", width = 1) + facet_wrap(~variable) # three-class model with a single covariate. data(election) f2a <- cbind( MORALG, CARESG, KNOWG, LEADG, DISHONG, INTELG, MORALB, CARESB, KNOWB, LEADB, DISHONB, INTELB ) ~ PARTY nes2a <- poLCA(f2a, election, nclass = 3, nrep = 5, verbose = FALSE) td <- tidy(nes2a) td #> # A tibble: 144 × 5 #> variable class outcome estimate std.error #> #> 1 MORALG 1 1 Extremely well 0.108 0.0175 #> 2 MORALG 2 1 Extremely well 0.137 0.0182 #> 3 MORALG 3 1 Extremely well 0.622 0.0309 #> 4 MORALG 1 2 Quite well 0.383 0.0274 #> 5 MORALG 2 2 Quite well 0.668 0.0247 #> 6 MORALG 3 2 Quite well 0.335 0.0293 #> 7 MORALG 1 3 Not too well 0.304 0.0253 #> 8 MORALG 2 3 Not too well 0.180 0.0208 #> 9 MORALG 3 3 Not too well 0.0172 0.00841 #> 10 MORALG 1 4 Not well at all 0.205 0.0243 #> # ℹ 134 more rows ggplot(td, aes(outcome, estimate, color = factor(class), group = class)) + geom_line() + facet_wrap(~variable, nrow = 2) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) au <- augment(nes2a) au #> # A tibble: 1,300 × 16 #> MORALG CARESG KNOWG LEADG DISHONG INTELG MORALB CARESB KNOWB LEADB #> #> 1 3 Not too … 1 Ext… 2 Qu… 2 Qu… 3 Not … 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 2 1 Extremel… 2 Qui… 2 Qu… 1 Ex… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 3 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 2 Quit… 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 4 2 Quite we… 4 Not… 2 Qu… 3 No… 2 Quit… 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 5 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 4 Not… 4 No… 4 No… #> 6 2 Quite we… 2 Qui… 2 Qu… 3 No… 4 Not … 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 7 1 Extremel… 1 Ext… 1 Ex… 1 Ex… 4 Not … 1 Ext… 2 Qui… 4 Not… 2 Qu… 3 No… #> 8 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 2 Qui… 2 Qu… 2 Qu… #> 9 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 10 2 Quite we… 3 Not… 2 Qu… 2 Qu… 3 Not … 2 Qui… 2 Qui… 4 Not… 2 Qu… 4 No… #> # ℹ 1,290 more rows #> # ℹ 6 more variables: DISHONB , INTELB , X.Intercept. , #> # PARTY , .class , .probability count(au, .class) #> # A tibble: 3 × 2 #> .class n #> #> 1 1 444 #> 2 2 496 #> 3 3 360 # if the original data is provided, it leads to NAs in new columns # for rows that weren't predicted au2 <- augment(nes2a, data = election) au2 #> # A tibble: 1,785 × 20 #> MORALG CARESG KNOWG LEADG DISHONG INTELG MORALB CARESB KNOWB LEADB #> #> 1 3 Not too … 1 Ext… 2 Qu… 2 Qu… 3 Not … 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 2 4 Not well… 3 Not… 4 No… 3 No… 2 Quit… 2 Qui… NA NA 2 Qu… 3 No… #> 3 1 Extremel… 2 Qui… 2 Qu… 1 Ex… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 4 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 2 Quit… 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 5 2 Quite we… 4 Not… 2 Qu… 3 No… 2 Quit… 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 6 2 Quite we… 3 Not… 3 No… 2 Qu… 2 Quit… 2 Qui… 2 Qui… NA 3 No… 2 Qu… #> 7 2 Quite we… NA 2 Qu… 2 Qu… 4 Not … 2 Qui… NA 3 Not… 2 Qu… 2 Qu… #> 8 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 4 Not… 4 No… 4 No… #> 9 2 Quite we… 2 Qui… 2 Qu… 3 No… 4 Not … 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 10 1 Extremel… 1 Ext… 1 Ex… 1 Ex… 4 Not … 1 Ext… 2 Qui… 4 Not… 2 Qu… 3 No… #> # ℹ 1,775 more rows #> # ℹ 10 more variables: DISHONB , INTELB , VOTE3 , #> # AGE , EDUC , GENDER , PARTY , .class , #> # .probability , .rownames dim(au2) #> [1] 1785 20"},{"path":"https://broom.tidymodels.org/dev/reference/augment.polr.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) polr object — augment.polr","title":"Augment data with information from a(n) polr object — augment.polr","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.polr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) polr object — augment.polr","text":"","code":"# S3 method for class 'polr' augment( x, data = model.frame(x), newdata = NULL, type.predict = c(\"class\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.polr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) polr object — augment.polr","text":"x polr object returned MASS::polr(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict type prediction compute, passed MASS:::predict.polr(). supports \"class\" moment. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.polr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) polr object — augment.polr","text":"","code":"# load libraries for models and data library(MASS) # fit model fit <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) # summarize model fit with tidiers tidy(fit, exponentiate = TRUE, conf.int = TRUE) #> #> Re-fitting to get Hessian #> # A tibble: 8 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 InflMedium 1.76 0.105 5.41 1.44 2.16 coefficie… #> 2 InflHigh 3.63 0.127 10.1 2.83 4.66 coefficie… #> 3 TypeApartment 0.564 0.119 -4.80 0.446 0.712 coefficie… #> 4 TypeAtrium 0.693 0.155 -2.36 0.511 0.940 coefficie… #> 5 TypeTerrace 0.336 0.151 -7.20 0.249 0.451 coefficie… #> 6 ContHigh 1.43 0.0955 3.77 1.19 1.73 coefficie… #> 7 Low|Medium 0.609 0.125 -3.97 NA NA scale #> 8 Medium|High 2.00 0.125 5.50 NA NA scale glance(fit) #> # A tibble: 1 × 7 #> edf logLik AIC BIC deviance df.residual nobs #> #> 1 8 -1740. 3495. 3539. 3479. 1673 1681 augment(fit, type.predict = \"class\") #> # A tibble: 72 × 6 #> Sat Infl Type Cont `(weights)` .fitted #> #> 1 Low Low Tower Low 21 Low #> 2 Medium Low Tower Low 21 Low #> 3 High Low Tower Low 28 Low #> 4 Low Medium Tower Low 34 High #> 5 Medium Medium Tower Low 22 High #> 6 High Medium Tower Low 36 High #> 7 Low High Tower Low 10 High #> 8 Medium High Tower Low 11 High #> 9 High High Tower Low 36 High #> 10 Low Low Apartment Low 61 Low #> # ℹ 62 more rows fit2 <- polr(factor(gear) ~ am + mpg + qsec, data = mtcars) tidy(fit, p.values = TRUE) #> #> Re-fitting to get Hessian #> p-values can presently only be returned for models that contain no #> categorical variables with more than two levels. #> # A tibble: 8 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 InflMedium 0.566 0.105 5.41 NA coefficient #> 2 InflHigh 1.29 0.127 10.1 NA coefficient #> 3 TypeApartment -0.572 0.119 -4.80 NA coefficient #> 4 TypeAtrium -0.366 0.155 -2.36 NA coefficient #> 5 TypeTerrace -1.09 0.151 -7.20 NA coefficient #> 6 ContHigh 0.360 0.0955 3.77 NA coefficient #> 7 Low|Medium -0.496 0.125 -3.97 NA scale #> 8 Medium|High 0.691 0.125 5.50 NA scale"},{"path":"https://broom.tidymodels.org/dev/reference/augment.prcomp.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) prcomp object — augment.prcomp","title":"Augment data with information from a(n) prcomp object — augment.prcomp","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.prcomp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) prcomp object — augment.prcomp","text":"","code":"# S3 method for class 'prcomp' augment(x, data = NULL, newdata, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.prcomp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) prcomp object — augment.prcomp","text":"x prcomp object returned stats::prcomp(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.prcomp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) prcomp object — augment.prcomp","text":"tibble::tibble containing original data along additional columns containing observation's projection PCA space.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) rlm object — augment.rlm","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"","code":"# S3 method for class 'rlm' augment(x, data = model.frame(x), newdata = NULL, se_fit = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"x rlm object returned MASS::rlm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .hat Diagonal hat matrix. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"","code":"# load libraries for models and data library(MASS) # fit model r <- rlm(stack.loss ~ ., stackloss) # summarize model fit with tidiers tidy(r) #> # A tibble: 4 × 4 #> term estimate std.error statistic #> #> 1 (Intercept) -41.0 9.81 -4.18 #> 2 Air.Flow 0.829 0.111 7.46 #> 3 Water.Temp 0.926 0.303 3.05 #> 4 Acid.Conc. -0.128 0.129 -0.992 augment(r) #> # A tibble: 21 × 10 #> stack.loss Air.Flow Water.Temp Acid.Conc. .fitted .resid .hat .sigma #> #> 1 42 80 27 89 38.9 3.05 0.327 3.32 #> 2 37 80 27 88 39.1 -2.08 0.343 3.39 #> 3 37 75 25 90 32.8 4.18 0.155 3.26 #> 4 28 62 24 87 21.5 6.50 0.0713 3.01 #> 5 18 62 22 87 19.6 -1.65 0.0562 3.42 #> 6 18 62 23 87 20.6 -2.57 0.0835 3.38 #> 7 19 62 24 93 20.7 -1.73 0.230 3.42 #> 8 20 62 24 93 20.7 -0.731 0.230 3.44 #> 9 15 58 23 87 17.3 -2.25 0.155 3.40 #> 10 14 58 18 80 13.5 0.481 0.213 3.45 #> # ℹ 11 more rows #> # ℹ 2 more variables: .cooksd , .std.resid glance(r) #> # A tibble: 1 × 7 #> sigma converged logLik AIC BIC deviance nobs #> #> 1 2.44 TRUE -52.954 116. 121. 191. 21"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) rma object — augment.rma","title":"Augment data with information from a(n) rma object — augment.rma","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) rma object — augment.rma","text":"","code":"# S3 method for class 'rma' augment(x, interval = c(\"prediction\", \"confidence\"), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) rma object — augment.rma","text":"x rma object created metafor::rma(), metafor::rma.uni(), metafor::rma.glmm(), metafor::rma.mh(), metafor::rma.mv(), metafor::rma.peto(). interval rma.mv models, prediction intervals (\"prediction\", default) confidence intervals (\"confidence\") intervals returned? rma.uni models, prediction intervals always returned. rma.mh rma.peto models, confidence intervals always returned. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) rma object — augment.rma","text":"tibble::tibble() columns: .fitted Fitted predicted value. .lower Lower bound interval fitted values. .moderator meta-analysis, moderators used calculate predicted values. .moderator.level meta-analysis, level moderators used calculate predicted values. .resid difference observed fitted values. .se.fit Standard errors fitted values. .upper Upper bound interval fitted values. .observed observed values individual studies","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) rma object — augment.rma","text":"","code":"# load modeling library library(metafor) #> Loading required package: metadat #> Loading required package: numDeriv #> #> Loading the 'metafor' package (version 4.6-0). For an #> introduction to the package please type: help(metafor) #> #> Attaching package: ‘metafor’ #> The following object is masked from ‘package:car’: #> #> vif #> The following object is masked from ‘package:mclust’: #> #> hc # generate data and fit df <- escalc( measure = \"RR\", ai = tpos, bi = tneg, ci = cpos, di = cneg, data = dat.bcg ) meta_analysis <- rma(yi, vi, data = df, method = \"EB\") # summarize model fit with tidiers augment(meta_analysis) #> # A tibble: 13 × 6 #> .observed .fitted .se.fit .lower .upper .resid #> #> 1 -0.889 -0.801 0.411 -1.61 0.00524 -0.174 #> 2 -1.59 -1.26 0.354 -1.95 -0.561 -0.870 #> 3 -1.35 -0.990 0.437 -1.85 -0.134 -0.633 #> 4 -1.44 -1.40 0.138 -1.67 -1.13 -0.727 #> 5 -0.218 -0.287 0.212 -0.701 0.128 0.497 #> 6 -0.786 -0.785 0.0823 -0.946 -0.623 -0.0711 #> 7 -1.62 -1.25 0.370 -1.97 -0.523 -0.906 #> 8 0.0120 0.00301 0.0626 -0.120 0.126 0.727 #> 9 -0.469 -0.506 0.221 -0.939 -0.0740 0.246 #> 10 -1.37 -1.25 0.246 -1.73 -0.767 -0.656 #> 11 -0.339 -0.353 0.110 -0.568 -0.139 0.376 #> 12 0.446 -0.281 0.460 -1.18 0.621 1.16 #> 13 -0.0173 -0.145 0.244 -0.623 0.333 0.698"},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) glmrob object — augment.glmrob","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"","code":"# S3 method for class 'glmrob' augment( x, data = model.frame(x), newdata = NULL, type.predict = c(\"link\", \"response\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"x glmrob object returned robustbase::glmrob(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> #> Attaching package: ‘robustbase’ #> The following object is masked from ‘package:survival’: #> #> heart #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) lmrob object — augment.lmrob","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"","code":"# S3 method for class 'lmrob' augment(x, data = model.frame(x), newdata = NULL, se_fit = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"x lmrob object returned robustbase::lmrob(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) rq object — augment.rq","title":"Augment data with information from a(n) rq object — augment.rq","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) rq object — augment.rq","text":"","code":"# S3 method for class 'rq' augment(x, data = model.frame(x), newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) rq object — augment.rq","text":"x rq object returned quantreg::rq(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Arguments passed quantreg::predict.rq object object class rq rqs rq.process produced rq interval type interval desired: default 'none', set 'confidence' function returns matrix predictions point predictions 'newdata' points well lower upper confidence limits. level converage probability 'confidence' intervals. type predict.rq, method 'confidence' intervals, desired. 'percentile' one bootstrap methods used generate percentile intervals prediction, 'direct' version Portnoy Zhou (1998) method used, otherwise estimated covariance matrix parameter estimates used. arguments determine choice bootstrap method covariance matrix estimate can passed via ... argument. predict.rqs predict.rq.process stepfun = TRUE, type \"Qhat\", \"Fhat\" \"fhat\" depending whether user like estimates conditional quantile, distribution density functions respectively. noted two former estimates can monotonized function rearrange. \"fhat\" option invoked, list conditional density functions returned based Silverman's adaptive kernel method implemented akj approxfun. na.action function determining done missing values 'newdata'. default predict 'NA'.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) rq object — augment.rq","text":"Depending arguments passed predict.rq via ..., confidence interval also calculated fitted values resulting columns .lower .upper. provide confidence intervals data specified via newdata argument.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) rq object — augment.rq","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values. .tau Quantile.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) rq object — augment.rq","text":"","code":"# load modeling library and data library(quantreg) #> Loading required package: SparseM #> #> Attaching package: ‘SparseM’ #> The following object is masked from ‘package:Matrix’: #> #> det #> #> Attaching package: ‘quantreg’ #> The following object is masked from ‘package:survival’: #> #> untangle.specials data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.124 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -78.76986 160. 161. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 0.393 0.696 0.269 0.124 0.5 #> 2 0.458 0.266 0.334 0.124 0.5 #> 3 -1.22 0.660 -1.34 0.124 0.5 #> 4 -1.12 0.212 -1.25 0.124 0.5 #> 5 0.993 0.00527 0.869 0.124 0.5 #> 6 -1.83 0.103 -1.96 0.124 0.5 #> 7 0.124 0.287 0 0.124 0.5 #> 8 0.591 0.444 0.467 0.124 0.5 #> 9 0.805 0.693 0.681 0.124 0.5 #> 10 0.00754 0.0209 -0.116 0.124 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) rqs object — augment.rqs","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"","code":"# S3 method for class 'rqs' augment(x, data = model.frame(x), newdata, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"x rqs object returned quantreg::rq(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Arguments passed quantreg::predict.rq object object class rq rqs rq.process produced rq interval type interval desired: default 'none', set 'confidence' function returns matrix predictions point predictions 'newdata' points well lower upper confidence limits. level converage probability 'confidence' intervals. type predict.rq, method 'confidence' intervals, desired. 'percentile' one bootstrap methods used generate percentile intervals prediction, 'direct' version Portnoy Zhou (1998) method used, otherwise estimated covariance matrix parameter estimates used. arguments determine choice bootstrap method covariance matrix estimate can passed via ... argument. predict.rqs predict.rq.process stepfun = TRUE, type \"Qhat\", \"Fhat\" \"fhat\" depending whether user like estimates conditional quantile, distribution density functions respectively. noted two former estimates can monotonized function rearrange. \"fhat\" option invoked, list conditional density functions returned based Silverman's adaptive kernel method implemented akj approxfun. na.action function determining done missing values 'newdata'. default predict 'NA'.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"Depending arguments passed predict.rq via ..., confidence interval also calculated fitted values resulting columns .lower .upper. provide confidence intervals data specified via newdata argument.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"","code":"# load modeling library and data library(quantreg) data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.0744 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -72.9869 148. 150. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 1.25 0.192 1.18 0.0744 0.5 #> 2 0.458 0.321 0.383 0.0744 0.5 #> 3 0.765 0.0297 0.691 0.0744 0.5 #> 4 0.392 0.870 0.317 0.0744 0.5 #> 5 -0.547 0.647 -0.622 0.0744 0.5 #> 6 -0.468 0.319 -0.542 0.0744 0.5 #> 7 -1.11 0.293 -1.18 0.0744 0.5 #> 8 0.786 0.669 0.711 0.0744 0.5 #> 9 -0.648 0.408 -0.722 0.0744 0.5 #> 10 1.07 0.664 1.00 0.0744 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) spatialreg object — augment.sarlm","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"","code":"# S3 method for class 'sarlm' augment(x, data = x$X, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"x object returned spatialreg::lagsarlm() spatialreg::errorsarlm(). data Ignored, included internal consistency. See details . ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"predict method sarlm objects assumes response known. See ?predict.sarlm discussion. result, since original data can recovered fit object, method currently take data newdata arguments.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"","code":"# load libraries for models and data library(spatialreg) #> Loading required package: spData #> To access larger datasets in this package, install the #> spDataLarge package with: `install.packages('spDataLarge', #> repos='https://nowosad.github.io/drat/', type='source')` #> Loading required package: sf #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE library(spdep) #> #> Attaching package: ‘spdep’ #> The following objects are masked from ‘package:spatialreg’: #> #> get.ClusterOption, get.VerboseOption, get.ZeroPolicyOption, #> get.coresOption, get.mcOption, set.ClusterOption, #> set.VerboseOption, set.ZeroPolicyOption, set.coresOption, #> set.mcOption # load data data(oldcol, package = \"spdep\") listw <- nb2listw(COL.nb, style = \"W\") # fit model crime_sar <- lagsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw = listw, method = \"eigen\" ) # summarize model fit with tidiers tidy(crime_sar) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 tidy(crime_sar, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 0.200 0.662 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 31.0 59.1 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 -1.63 -0.434 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 -0.439 -0.0925 glance(crime_sar) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 375. 384. 4679. -182. 49 augment(crime_sar) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.6 -3.84 #> 2 1 4.48 33.2 32.4 46.6 -14.2 #> 3 1 11.3 37.1 38.4 41.4 -2.97 #> 4 1 8.44 75 0.178 37.9 -37.7 #> 5 1 19.5 80.5 15.7 14.2 1.54 #> 6 1 16.0 26.4 30.6 34.3 -3.66 #> 7 1 11.3 23.2 50.7 44.7 5.99 #> 8 1 16.0 28.8 26.1 38.4 -12.3 #> 9 1 9.87 18 48.6 51.7 -3.12 #> 10 1 13.6 96.4 34.0 16.3 17.7 #> # ℹ 39 more rows # fit another model crime_sem <- errorsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sem) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 59.9 5.37 11.2 0 #> 2 INC -0.941 0.331 -2.85 0.00441 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 #> 4 lambda 0.562 0.134 4.20 0.0000271 tidy(crime_sem, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 59.9 5.37 11.2 0 49.4 70.4 #> 2 INC -0.941 0.331 -2.85 0.00441 -1.59 -0.293 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 -0.480 -0.125 #> 4 lambda 0.562 0.134 4.20 0.0000271 0.299 0.824 glance(crime_sem) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.658 377. 386. 4683. -183. 49 augment(crime_sem) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.5 -3.70 #> 2 1 4.48 33.2 32.4 44.9 -12.5 #> 3 1 11.3 37.1 38.4 38.2 0.223 #> 4 1 8.44 75 0.178 35.0 -34.8 #> 5 1 19.5 80.5 15.7 13.3 2.45 #> 6 1 16.0 26.4 30.6 35.0 -4.33 #> 7 1 11.3 23.2 50.7 42.3 8.41 #> 8 1 16.0 28.8 26.1 39.4 -13.3 #> 9 1 9.87 18 48.6 49.3 -0.721 #> 10 1 13.6 96.4 34.0 16.6 17.4 #> # ℹ 39 more rows # fit another model crime_sac <- sacsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sac) #> # A tibble: 5 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.368 0.197 1.87 0.0613 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 #> 3 INC -1.03 0.326 -3.14 0.00167 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 #> 5 lambda 0.167 0.297 0.562 0.574 tidy(crime_sac, conf.int = TRUE) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.368 0.197 1.87 0.0613 -0.0174 0.754 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 28.4 67.2 #> 3 INC -1.03 0.326 -3.14 0.00167 -1.67 -0.386 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 -0.458 -0.105 #> 5 lambda 0.167 0.297 0.562 0.574 -0.415 0.748 glance(crime_sac) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 376. 388. 4685. -182. 49 augment(crime_sac) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.2 -3.37 #> 2 1 4.48 33.2 32.4 46.4 -14.0 #> 3 1 11.3 37.1 38.4 40.4 -2.00 #> 4 1 8.44 75 0.178 37.5 -37.3 #> 5 1 19.5 80.5 15.7 13.5 2.25 #> 6 1 16.0 26.4 30.6 34.4 -3.74 #> 7 1 11.3 23.2 50.7 44.1 6.60 #> 8 1 16.0 28.8 26.1 39.0 -12.9 #> 9 1 9.87 18 48.6 51.5 -2.93 #> 10 1 13.6 96.4 34.0 15.8 18.2 #> # ℹ 39 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) smooth.spline object — augment.smooth.spline","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"","code":"# S3 method for class 'smooth.spline' augment(x, data = x$data, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"x smooth.spline object returned stats::smooth.spline(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"","code":"# fit model spl <- smooth.spline(mtcars$wt, mtcars$mpg, df = 4) # summarize model fit with tidiers augment(spl, mtcars) #> # A tibble: 32 × 13 #> mpg cyl disp hp drat wt qsec vs am gear carb #> #> 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 #> 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 #> 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 #> 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 #> 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 #> 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 #> 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 #> 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 #> 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 #> 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 #> # ℹ 22 more rows #> # ℹ 2 more variables: .fitted , .resid # calls original columns x and y augment(spl) #> # A tibble: 32 × 5 #> x y w .fitted .resid #> #> 1 2.62 21 1 22.9 -1.87 #> 2 2.88 21 1 21.1 -0.117 #> 3 2.32 22.8 1 25.3 -2.48 #> 4 3.22 21.4 1 19.1 2.33 #> 5 3.44 18.7 1 17.8 0.928 #> 6 3.46 18.1 1 17.7 0.437 #> 7 3.57 14.3 1 17.1 -2.79 #> 8 3.19 24.4 1 19.2 5.19 #> 9 3.15 22.8 1 19.5 3.35 #> 10 3.44 19.2 1 17.8 1.43 #> # ℹ 22 more rows library(ggplot2) ggplot(augment(spl, mtcars), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted))"},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) speedlm object — augment.speedlm","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"","code":"# S3 method for class 'speedlm' augment(x, data = model.frame(x), newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"x speedlm object returned speedglm::speedlm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"","code":"# load modeling library library(speedglm) #> Loading required package: biglm #> Loading required package: DBI # fit model mod <- speedlm(mpg ~ wt + qsec, data = mtcars, fitted = TRUE) # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 11 #> r.squared adj.r.squared statistic p.value df logLik AIC BIC #> #> 1 0.826 0.814 69.0 9.39e-12 3 -74.4 157. 163. #> # ℹ 3 more variables: deviance , df.residual , nobs augment(mod) #> # A tibble: 32 × 6 #> .rownames mpg wt qsec .fitted .resid #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 #> 5 Hornet Sportabout 18.7 3.44 17.0 18.2 0.504 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 #> # ℹ 22 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/augment.stl.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) stl object — augment.stl","title":"Augment data with information from a(n) stl object — augment.stl","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.stl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) stl object — augment.stl","text":"","code":"# S3 method for class 'stl' augment(x, data = NULL, weights = TRUE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.stl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) stl object — augment.stl","text":"x stl object returned stats::stl(). data Ignored, included consistency augment generic signature . weights Logical indicating whether include robust weights output. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.stl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) stl object — augment.stl","text":"tibble::tibble one row observation original times series: .seasonal seasonal component decomposition. .trend trend component decomposition. .remainder remainder, \"random\" component decomposition. .weight final robust weights, requested. .seasadj seasonally adjusted (\"deseasonalised\") series.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) survreg object — augment.survreg","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"","code":"# S3 method for class 'survreg' augment( x, data = model.frame(x), newdata = NULL, type.predict = \"response\", type.residuals = \"response\", ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"x survreg object returned survival::survreg(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values. .se.fit Standard errors fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"","code":"# load libraries for models and data library(survival) # fit model sr <- survreg( Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = \"exponential\" ) # summarize model fit with tidiers + visualization tidy(sr) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 6.96 1.32 5.27 0.000000139 #> 2 ecog.ps -0.433 0.587 -0.738 0.461 #> 3 rx 0.582 0.587 0.991 0.322 augment(sr, ovarian) #> # A tibble: 26 × 9 #> futime fustat age resid.ds rx ecog.ps .fitted .se.fit .resid #> #> 1 59 1 72.3 2 1 1 1224. 639. -1165. #> 2 115 1 74.5 2 1 1 1224. 639. -1109. #> 3 156 1 66.5 2 1 2 794. 350. -638. #> 4 421 0 53.4 2 2 1 2190. 1202. -1769. #> 5 431 1 50.3 2 1 1 1224. 639. -793. #> 6 448 0 56.4 1 1 2 794. 350. -346. #> 7 464 1 56.9 2 2 2 1420. 741. -956. #> 8 475 1 59.9 2 2 2 1420. 741. -945. #> 9 477 0 64.2 2 1 1 1224. 639. -747. #> 10 563 1 55.2 1 2 2 1420. 741. -857. #> # ℹ 16 more rows glance(sr) #> # A tibble: 1 × 9 #> iter df statistic logLik AIC BIC df.residual nobs p.value #> #> 1 4 3 1.67 -97.2 200. 204. 23 26 0.434 # coefficient plot td <- tidy(sr, conf.int = TRUE) library(ggplot2) ggplot(td, aes(estimate, term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/augment_columns.html","id":null,"dir":"Reference","previous_headings":"","what":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","title":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","text":"augment_columns intended use internals augment methods exported developers extending broom package. Please instead use augment() appropriately make use functionality augment_columns().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment_columns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","text":"","code":"augment_columns( x, data, newdata = NULL, type, type.predict = type, type.residuals = type, se.fit = TRUE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment_columns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","text":"x model data original data onto columns added newdata new data predict , optional type Type prediction residuals compute type.predict Type prediction compute; default type type.residuals Type residuals compute; default type se.fit Value pass predict's se.fit, NULL value. Ignored model types accept se.fit argument ... extra arguments (used)","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment_columns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","text":"Note , case residuals() influence() generic implemented supplied model x, function fail quietly.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/bootstrap.html","id":null,"dir":"Reference","previous_headings":"","what":"Set up bootstrap replicates of a dplyr operation — bootstrap","title":"Set up bootstrap replicates of a dplyr operation — bootstrap","text":"bootstrap() function deprecated removed upcoming release broom. tidy resampling, please use rsample package instead. Functionality longer supported method.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/bootstrap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set up bootstrap replicates of a dplyr operation — bootstrap","text":"","code":"bootstrap(df, m, by_group = FALSE)"},{"path":"https://broom.tidymodels.org/dev/reference/bootstrap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set up bootstrap replicates of a dplyr operation — bootstrap","text":"df data frame m number bootstrap replicates perform by_group TRUE, bootstrap within group df grouped tibble.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/bootstrap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set up bootstrap replicates of a dplyr operation — bootstrap","text":"code originates Hadley Wickham (small corrections) : https://github.com/tidyverse/dplyr/issues/269","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/broom.html","id":null,"dir":"Reference","previous_headings":"","what":"broom: Convert Statistical Objects into Tidy Tibbles — broom","title":"broom: Convert Statistical Objects into Tidy Tibbles — broom","text":"Convert statistical analysis objects R tidy tibbles, can easily combined, reshaped otherwise processed tools like dplyr, tidyr ggplot2. package provides three S3 generics: tidy, summarizes model's statistical findings coefficients regression; augment, adds columns original data predictions, residuals cluster assignments; glance, provides one-row summary model-level statistics.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/broom.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"broom: Convert Statistical Objects into Tidy Tibbles — broom","text":"Maintainer: Simon Couch simon.couch@posit.co (ORCID) Authors: David Robinson admiral.david@gmail.com Alex Hayes alexpghayes@gmail.com (ORCID) contributors: Posit Software, PBC [copyright holder, funder] Indrajeet Patil patilindrajeet.science@gmail.com (ORCID) [contributor] Derek Chiu dchiu@bccrc.ca [contributor] Matthieu Gomez mattg@princeton.edu [contributor] Boris Demeshev boris.demeshev@gmail.com [contributor] Dieter Menne dieter.menne@menne-biomed.de [contributor] Benjamin Nutter nutter@battelle.org [contributor] Luke Johnston luke.johnston@mail.utoronto.ca [contributor] Ben Bolker bolker@mcmaster.ca [contributor] Francois Briatte f.briatte@gmail.com [contributor] Jeffrey Arnold jeffrey.arnold@gmail.com [contributor] Jonah Gabry jsg2201@columbia.edu [contributor] Luciano Selzer luciano.selzer@gmail.com [contributor] Gavin Simpson ucfagls@gmail.com [contributor] Jens Preussner jens.preussner@mpi-bn.mpg.de [contributor] Jay Hesselberth jay.hesselberth@gmail.com [contributor] Hadley Wickham hadley@posit.co [contributor] Matthew Lincoln matthew.d.lincoln@gmail.com [contributor] Alessandro Gasparini ag475@leicester.ac.uk [contributor] Lukasz Komsta lukasz.komsta@umlub.pl [contributor] Frederick Novometsky [contributor] Wilson Freitas [contributor] Michelle Evans [contributor] Jason Cory Brunson cornelioid@gmail.com [contributor] Simon Jackson drsimonjackson@gmail.com [contributor] Ben Whalley ben.whalley@plymouth.ac.uk [contributor] Karissa Whiting karissa.whiting@gmail.com [contributor] Yves Rosseel yrosseel@gmail.com [contributor] Michael Kuehn mkuehn10@gmail.com [contributor] Jorge Cimentada cimentadaj@gmail.com [contributor] Erle Holgersen erle.holgersen@gmail.com [contributor] Karl Dunkle Werner (ORCID) [contributor] Ethan Christensen christensen.ej@gmail.com [contributor] Steven Pav shabbychef@gmail.com [contributor] Paul PJ pjpaul.stephens@gmail.com [contributor] Ben Schneider benjamin.julius.schneider@gmail.com [contributor] Patrick Kennedy pkqstr@protonmail.com [contributor] Lily Medina lilymiru@gmail.com [contributor] Brian Fannin captain@pirategrunt.com [contributor] Jason Muhlenkamp jason.muhlenkamp@gmail.com [contributor] Matt Lehman [contributor] Bill Denney wdenney@humanpredictions.com (ORCID) [contributor] Nic Crane [contributor] Andrew Bates [contributor] Vincent Arel-Bundock vincent.arel-bundock@umontreal.ca (ORCID) [contributor] Hideaki Hayashi [contributor] Luis Tobalina [contributor] Annie Wang anniewang.uc@gmail.com [contributor] Wei Yang Tham weiyang.tham@gmail.com [contributor] Clara Wang clara.wang.94@gmail.com [contributor] Abby Smith als1@u.northwestern.edu (ORCID) [contributor] Jasper Cooper jaspercooper@gmail.com (ORCID) [contributor] E Auden Krauska krauskae@gmail.com (ORCID) [contributor] Alex Wang x249wang@uwaterloo.ca [contributor] Malcolm Barrett malcolmbarrett@gmail.com (ORCID) [contributor] Charles Gray charlestigray@gmail.com (ORCID) [contributor] Jared Wilber [contributor] Vilmantas Gegzna GegznaV@gmail.com (ORCID) [contributor] Eduard Szoecs eduardszoecs@gmail.com [contributor] Frederik Aust frederik.aust@uni-koeln.de (ORCID) [contributor] Angus Moore angusmoore9@gmail.com [contributor] Nick Williams ntwilliams.personal@gmail.com [contributor] Marius Barth marius.barth.uni.koeln@gmail.com (ORCID) [contributor] Bruna Wundervald brunadaviesw@gmail.com (ORCID) [contributor] Joyce Cahoon joyceyu48@gmail.com (ORCID) [contributor] Grant McDermott grantmcd@uoregon.edu (ORCID) [contributor] Kevin Zarca kevin.zarca@gmail.com [contributor] Shiro Kuriwaki shirokuriwaki@gmail.com (ORCID) [contributor] Lukas Wallrich lukas.wallrich@gmail.com (ORCID) [contributor] James Martherus james@martherus.com (ORCID) [contributor] Chuliang Xiao cxiao@umich.edu (ORCID) [contributor] Joseph Larmarange joseph@larmarange.net [contributor] Max Kuhn max@posit.co [contributor] Michal Bojanowski michal2992@gmail.com [contributor] Hakon Malmedal hmalmedal@gmail.com [contributor] Clara Wang [contributor] Sergio Oller sergioller@gmail.com [contributor] Luke Sonnet luke.sonnet@gmail.com [contributor] Jim Hester jim.hester@posit.co [contributor] Ben Schneider benjamin.julius.schneider@gmail.com [contributor] Bernie Gray bfgray3@gmail.com (ORCID) [contributor] Mara Averick mara@posit.co [contributor] Aaron Jacobs atheriel@gmail.com [contributor] Andreas Bender bender..R@gmail.com [contributor] Sven Templer sven.templer@gmail.com [contributor] Paul-Christian Buerkner paul.buerkner@gmail.com [contributor] Matthew Kay mjskay@umich.edu [contributor] Erwan Le Pennec lepennec@gmail.com [contributor] Johan Junkka johan.junkka@umu.se [contributor] Hao Zhu haozhu233@gmail.com [contributor] Benjamin Soltoff soltoffbc@uchicago.edu [contributor] Zoe Wilkinson Saldana zoewsaldana@gmail.com [contributor] Tyler Littlefield tylurp1@gmail.com [contributor] Charles T. Gray charlestigray@gmail.com [contributor] Shabbh E. Banks [contributor] Serina Robinson robi0916@umn.edu [contributor] Roger Bivand Roger.Bivand@nhh.[contributor] Riinu Ots riinuots@gmail.com [contributor] Nicholas Williams ntwilliams.personal@gmail.com [contributor] Nina Jakobsen [contributor] Michael Weylandt michael.weylandt@gmail.com [contributor] Lisa Lendway llendway@macalester.edu [contributor] Karl Hailperin khailper@gmail.com [contributor] Josue Rodriguez jerrodriguez@ucdavis.edu [contributor] Jenny Bryan jenny@posit.co [contributor] Chris Jarvis Christopher1.jarvis@gmail.com [contributor] Greg Macfarlane gregmacfarlane@gmail.com [contributor] Brian Mannakee bmannakee@gmail.com [contributor] Drew Tyre atyre2@unl.edu [contributor] Shreyas Singh shreyas.singh.298@gmail.com [contributor] Laurens Geffert laurensgeffert@gmail.com [contributor] Hong Ooi hongooi@microsoft.com [contributor] Henrik Bengtsson henrikb@braju.com [contributor] Eduard Szocs eduardszoecs@gmail.com [contributor] David Hugh-Jones davidhughjones@gmail.com [contributor] Matthieu Stigler Matthieu.Stigler@gmail.com [contributor] Hugo Tavares hm533@cam.ac.uk (ORCID) [contributor] R. Willem Vervoort Willemvervoort@gmail.com [contributor] Brenton M. Wiernik brenton@wiernik.org [contributor] Josh Yamamoto joshuayamamoto5@gmail.com [contributor] Jasme Lee [contributor] Taren Sanders taren.sanders@acu.edu.au (ORCID) [contributor] Ilaria Prosdocimi prosdocimi.ilaria@gmail.com (ORCID) [contributor] Daniel D. Sjoberg danield.sjoberg@gmail.com (ORCID) [contributor] Alex Reinhart areinhar@stat.cmu.edu (ORCID) [contributor]","code":""},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"function now deprecated removed future release broom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"","code":"confint_tidy(x, conf.level = 0.95, func = stats::confint, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"x model object confint() can calculated conf.level confidence level func function compute confidence interval x. Calling func(x, level = conf.level, ...) must return object coercible tibble. dataframe like object columns corresponding lower upper bounds confidence interval. ... extra arguments passed confint","code":""},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"tibble two columns: conf.low conf.high.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"Return confidence interval tidy data frame. directly wraps confint() function, ensures follows broom conventions: column names conf.low conf.high, row names. confint_tidy","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidiers for data.frame objects — data.frame_tidiers","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"Data frame tidiers deprecated removed upcoming release broom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"","code":"# S3 method for class 'data.frame' tidy(x, ..., na.rm = TRUE, trim = 0.1) # S3 method for class 'data.frame' augment(x, data, ...) # S3 method for class 'data.frame' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"Skew Kurtosis functions adapted implementations moments package: Lukasz Komsta Frederick Novomestky (2015). moments: Moments, cumulants, skewness, kurtosis related tests. R package version 0.14. https://CRAN.R-project.org/package=moments","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"x data.frame ... Additional arguments methods. na.rm logical value indicating whether NA values stripped computation proceeds. trim fraction (0 0.5) observations trimmed end x mean computed. Passed trim argument mean data data, used","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"tidy.data.frame produces data frame one row per original column, containing summary statistics : column name original column n Number valid (non-NA) values mean mean sd standard deviation median median trimmed trimmed mean, trim defaulting .1 mad median absolute deviation (median) min minimum value max maximum value range range skew skew kurtosis kurtosis se standard error glance returns one-row data.frame nrow number rows ncol number columns complete.obs number rows missing values na.fraction fraction values across rows columns missing","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"perform tidy summaries data.frame objects. tidy produces summary statistics column, glance simply reports number rows columns. Note augment.data.frame throw error.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"David Robinson, Benjamin Nutter","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"","code":"td <- tidy(mtcars) #> Warning: Data frame tidiers are deprecated and will be removed in an upcoming release of broom. td #> # A tibble: 11 × 13 #> column n mean sd median trimmed mad min max range #> #> 1 mpg 32 20.1 6.03 19.2 19.7 3.65 10.4 33.9 23.5 #> 2 cyl 32 6.19 1.79 6 6.23 2 4 8 4 #> 3 disp 32 231. 124. 196. 223. 94.8 71.1 472 401. #> 4 hp 32 147. 68.6 123 141. 52 52 335 283 #> 5 drat 32 3.60 0.535 3.70 3.58 0.475 2.76 4.93 2.17 #> 6 wt 32 3.22 0.978 3.32 3.15 0.517 1.51 5.42 3.91 #> 7 qsec 32 17.8 1.79 17.7 17.8 0.955 14.5 22.9 8.4 #> 8 vs 32 0.438 0.504 0 0.423 0 0 1 1 #> 9 am 32 0.406 0.499 0 0.385 0 0 1 1 #> 10 gear 32 3.69 0.738 4 3.62 1 3 5 2 #> 11 carb 32 2.81 1.62 2 2.65 1 1 8 7 #> # ℹ 3 more variables: skew , kurtosis , se glance(mtcars) #> Warning: Data frame tidiers are deprecated and will be removed in an upcoming release of broom. #> # A tibble: 1 × 4 #> nrow ncol complete.obs na.fraction #> #> 1 32 11 32 0 library(ggplot2) # compare mean and standard deviation ggplot(td, aes(mean, sd)) + geom_point() + geom_text(aes(label = column), hjust = 1, vjust = 1) + scale_x_log10() + scale_y_log10() + geom_abline()"},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"models single component, tidy() glance() methods identical. Please see documentation methods.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"","code":"# S3 method for class 'durbinWatsonTest' tidy(x, ...) # S3 method for class 'durbinWatsonTest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"x object class durbinWatsonTest created call car::durbinWatsonTest(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"tibble::tibble() columns: alternative Alternative hypothesis (character). autocorrelation Autocorrelation. p.value two-sided p-value associated observed statistic. statistic Test statistic Durbin-Watson test. method Always `Durbin-Watson Test`.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"","code":"# load modeling library library(car) # fit model dw <- durbinWatsonTest(lm(mpg ~ wt, data = mtcars)) # summarize model fit with tidiers tidy(dw) #> # A tibble: 1 × 5 #> statistic p.value autocorrelation method alternative #> #> 1 1.25 0.0200 0.363 Durbin-Watson Test two.sided # same output for all durbinWatsonTests glance(dw) #> # A tibble: 1 × 5 #> statistic p.value autocorrelation method alternative #> #> 1 1.25 0.0200 0.363 Durbin-Watson Test two.sided"},{"path":"https://broom.tidymodels.org/dev/reference/finish_glance.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","title":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","text":"function now deprecated favor using custom logic appropriate nobs() method.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/finish_glance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","text":"","code":"finish_glance(ret, x)"},{"path":"https://broom.tidymodels.org/dev/reference/finish_glance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","text":"ret one-row data frame (partially complete glance) x prediction model","code":""},{"path":"https://broom.tidymodels.org/dev/reference/finish_glance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","text":"one-row data frame additional columns added, logLik log likelihoods AIC Akaike Information Criterion BIC Bayesian Information Criterion deviance deviance df.residual residual degrees freedom","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/fix_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","title":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","text":"function deprecated broom 0.7.0 removed future release. Please see tibble::as_tibble.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/fix_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","text":"","code":"fix_data_frame(x, newnames = NULL, newcol = \"term\")"},{"path":"https://broom.tidymodels.org/dev/reference/fix_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","text":"x data.frame matrix newnames new column names, including rownames newcol name new rownames column","code":""},{"path":"https://broom.tidymodels.org/dev/reference/fix_data_frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","text":"data.frame, rownames moved column new column names assigned","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) Arima object — glance.Arima","title":"Glance at a(n) Arima object — glance.Arima","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) Arima object — glance.Arima","text":"","code":"# S3 method for class 'Arima' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) Arima object — glance.Arima","text":"x object class Arima created stats::arima(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) Arima object — glance.Arima","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) Arima object — glance.Arima","text":"","code":"# fit model fit <- arima(lh, order = c(1, 0, 0)) # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 3 #> term estimate std.error #> #> 1 ar1 0.574 0.116 #> 2 intercept 2.41 0.147 glance(fit) #> # A tibble: 1 × 5 #> sigma logLik AIC BIC nobs #> #> 1 0.444 -29.4 64.8 70.4 48"},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) Mclust object — glance.Mclust","title":"Glance at a(n) Mclust object — glance.Mclust","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) Mclust object — glance.Mclust","text":"","code":"# S3 method for class 'Mclust' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) Mclust object — glance.Mclust","text":"x Mclust object return mclust::Mclust(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) Mclust object — glance.Mclust","text":"tibble::tibble() exactly one row columns: BIC Bayesian Information Criterion model. df Degrees freedom used model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. model string denoting model type optimal BIC G Number mixture components optimal model hypvol model contains noise component, value hypervolume parameter. Otherwise `NA`.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) Mclust object — glance.Mclust","text":"","code":"# load library for models and data library(mclust) # load data manipulation libraries library(dplyr) library(tibble) library(purrr) library(tidyr) set.seed(27) centers <- tibble( cluster = factor(1:3), # number points in each cluster num_points = c(100, 150, 50), # x1 coordinate of cluster center x1 = c(5, 0, -3), # x2 coordinate of cluster center x2 = c(-1, 1, -2) ) points <- centers %>% mutate( x1 = map2(num_points, x1, rnorm), x2 = map2(num_points, x2, rnorm) ) %>% select(-num_points, -cluster) %>% unnest(c(x1, x2)) # fit model m <- Mclust(points) # summarize model fit with tidiers tidy(m) #> # A tibble: 3 × 6 #> component size proportion variance mean.x1 mean.x2 #> #> 1 1 101 0.335 1.12 5.01 -1.04 #> 2 2 150 0.503 1.12 0.0594 1.00 #> 3 3 49 0.161 1.12 -3.20 -2.06 augment(m, points) #> # A tibble: 300 × 4 #> x1 x2 .class .uncertainty #> #> 1 6.91 -2.74 1 3.98e-11 #> 2 6.14 -2.45 1 1.99e- 9 #> 3 4.24 -0.946 1 1.47e- 4 #> 4 3.54 0.287 1 2.94e- 2 #> 5 3.91 0.408 1 7.48e- 3 #> 6 5.30 -1.58 1 4.22e- 7 #> 7 5.01 -1.77 1 1.06e- 6 #> 8 6.16 -1.68 1 7.64e- 9 #> 9 7.13 -2.17 1 4.16e-11 #> 10 5.24 -2.42 1 1.16e- 7 #> # ℹ 290 more rows glance(m) #> # A tibble: 1 × 7 #> model G BIC logLik df hypvol nobs #> #> 1 EII 3 -2402. -1175. 9 NA 300"},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) aareg object — glance.aareg","title":"Glance at a(n) aareg object — glance.aareg","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) aareg object — glance.aareg","text":"","code":"# S3 method for class 'aareg' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) aareg object — glance.aareg","text":"x aareg object returned survival::aareg(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) aareg object — glance.aareg","text":"tibble::tibble() exactly one row columns: df Degrees freedom used model. nobs Number observations used. p.value P-value corresponding test statistic. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) aareg object — glance.aareg","text":"","code":"# load libraries for models and data library(survival) # fit model afit <- aareg( Surv(time, status) ~ age + sex + ph.ecog, data = lung, dfbeta = TRUE ) # summarize model fit with tidiers tidy(afit) #> # A tibble: 4 × 7 #> term estimate statistic std.error robust.se statistic.z p.value #> #> 1 Intercept 0.00505 0.00587 0.00474 0.00477 1.23 0.219 #> 2 age 0.0000401 0.0000715 0.0000723 0.0000700 1.02 0.307 #> 3 sex -0.00316 -0.00403 0.00122 0.00123 -3.28 0.00103 #> 4 ph.ecog 0.00301 0.00367 0.00102 0.00102 3.62 0.000299"},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) anova object — glance.anova","title":"Glance at a(n) anova object — glance.anova","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) anova object — glance.anova","text":"","code":"# S3 method for class 'anova' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) anova object — glance.anova","text":"x anova object, created stats::anova(), car::Anova(), car::leveneTest(), car::linearHypothesis(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) anova object — glance.anova","text":"Note output glance.anova() vary depending initializing anova call. cases, just return empty data frame. cases, glance.anova() may return columns also common tidy.anova(). partly preserve backwards compatibility early versions broom, also underlying anova model yields components reasonably interpreted goodness--fit summaries .","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) anova object — glance.anova","text":"tibble::tibble() exactly one row columns: deviance Deviance model. df.residual Residual degrees freedom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) anova object — glance.anova","text":"","code":"if (FALSE) { # fit models a <- lm(mpg ~ wt + qsec + disp, mtcars) b <- lm(mpg ~ wt + qsec, mtcars) mod <- anova(a, b) # summarize model fit with tidiers tidy(mod) glance(mod) # car::linearHypothesis() example library(car) mod_lht <- linearHypothesis(a, \"wt - disp\") tidy(mod_lht) glance(mod_lht) }"},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lm object — glance.aov","title":"Glance at a(n) lm object — glance.aov","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lm object — glance.aov","text":"","code":"# S3 method for class 'aov' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lm object — glance.aov","text":"x aov object, created stats::aov(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) lm object — glance.aov","text":"Note tidy.aov() now contains numerator denominator degrees freedom, included output glance.aov() previous versions package.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lm object — glance.aov","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lm object — glance.aov","text":"","code":"a <- aov(mpg ~ wt + qsec + disp, mtcars) tidy(a) #> # A tibble: 4 × 6 #> term df sumsq meansq statistic p.value #> #> 1 wt 1 848. 848. 121. 1.08e-11 #> 2 qsec 1 82.9 82.9 11.9 1.82e- 3 #> 3 disp 1 0.00102 0.00102 0.000147 9.90e- 1 #> 4 Residuals 28 195. 6.98 NA NA"},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) betamfx object — glance.betamfx","title":"Glance at a(n) betamfx object — glance.betamfx","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) betamfx object — glance.betamfx","text":"","code":"# S3 method for class 'betamfx' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) betamfx object — glance.betamfx","text":"x betamfx object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) betamfx object — glance.betamfx","text":"glance method wraps glance.betareg() mfx::betamfx() objects.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) betamfx object — glance.betamfx","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. pseudo.r.squared Like R squared statistic, situations R squared statistic defined.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) betamfx object — glance.betamfx","text":"","code":"library(mfx) # Simulate some data set.seed(12345) n <- 1000 x <- rnorm(n) # Beta outcome y <- rbeta(n, shape1 = plogis(1 + 0.5 * x), shape2 = (abs(0.2 * x))) # Use Smithson and Verkuilen correction y <- (y * (n - 1) + 0.5) / n d <- data.frame(y, x) mod_betamfx <- betamfx(y ~ x | x, data = d) tidy(mod_betamfx, conf.int = TRUE) #> # A tibble: 1 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 x TRUE 0.0226 0.00801 2.82 0.00483 0.00686 0.0383 # Compare with the naive model coefficients of the equivalent betareg call (not run) # tidy(betamfx(y ~ x | x, data = d), conf.int = TRUE) augment(mod_betamfx) #> # A tibble: 1,000 × 4 #> y x .fitted .cooksd #> #> 1 0.951 0.586 0.809 0.000189 #> 2 0.714 0.709 0.811 0.0000993 #> 3 0.999 -0.109 0.793 0.000273 #> 4 0.998 -0.453 0.785 0.000334 #> 5 0.999 0.606 0.809 0.000342 #> 6 0.562 -1.82 0.751 0.000878 #> 7 0.999 0.630 0.810 0.000348 #> 8 0.999 -0.276 0.789 0.000294 #> 9 0.744 -0.284 0.789 0.0000134 #> 10 0.999 -0.919 0.774 0.000551 #> # ℹ 990 more rows glance(mod_betamfx) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.00726 998 1897. -3787. -3767. 996 1000"},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) betareg object — glance.betareg","title":"Glance at a(n) betareg object — glance.betareg","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) betareg object — glance.betareg","text":"","code":"# S3 method for class 'betareg' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) betareg object — glance.betareg","text":"x betareg object produced call betareg::betareg(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) betareg object — glance.betareg","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. pseudo.r.squared Like R squared statistic, situations R squared statistic defined.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) betareg object — glance.betareg","text":"","code":"# load libraries for models and data library(betareg) # load dats data(\"GasolineYield\", package = \"betareg\") # fit model mod <- betareg(yield ~ batch + temp, data = GasolineYield) mod #> #> Call: #> betareg(formula = yield ~ batch + temp, data = GasolineYield) #> #> Coefficients (mean model with logit link): #> (Intercept) batch1 batch2 batch3 batch4 #> -6.15957 1.72773 1.32260 1.57231 1.05971 #> batch5 batch6 batch7 batch8 batch9 #> 1.13375 1.04016 0.54369 0.49590 0.38579 #> temp #> 0.01097 #> #> Phi coefficients (precision model with identity link): #> (phi) #> 440.3 #> # summarize model fit with tidiers tidy(mod) #> # A tibble: 12 × 6 #> component term estimate std.error statistic p.value #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 tidy(mod, conf.int = TRUE) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.52 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.53 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.09 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.34 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.859 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.931 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.832 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.330 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.282 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.153 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.0102 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 225. #> # ℹ 1 more variable: conf.high tidy(mod, conf.int = TRUE, conf.level = .99) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.63 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.47 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.02 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.27 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.796 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.867 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.767 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.263 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.215 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.0803 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.00990 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 157. #> # ℹ 1 more variable: conf.high augment(mod) #> # A tibble: 32 × 6 #> yield batch temp .fitted .resid .cooksd #> #> 1 0.122 1 205 0.101 1.41 0.0791 #> 2 0.223 1 275 0.195 1.44 0.0917 #> 3 0.347 1 345 0.343 0.170 0.00155 #> 4 0.457 1 407 0.508 -2.14 0.606 #> 5 0.08 2 218 0.0797 0.0712 0.0000168 #> 6 0.131 2 273 0.137 -0.318 0.00731 #> 7 0.266 2 347 0.263 0.169 0.00523 #> 8 0.074 3 212 0.0943 -1.52 0.0805 #> 9 0.182 3 272 0.167 0.831 0.0441 #> 10 0.304 3 340 0.298 0.304 0.0170 #> # ℹ 22 more rows glance(mod) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.962 30 84.8 -146. -128. 20 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) biglm object — glance.biglm","title":"Glance at a(n) biglm object — glance.biglm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) biglm object — glance.biglm","text":"","code":"# S3 method for class 'biglm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) biglm object — glance.biglm","text":"x biglm object created call biglm::biglm() biglm::bigglm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) biglm object — glance.biglm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. deviance Deviance model. df.residual Residual degrees freedom. nobs Number observations used. r.squared R squared statistic, percent variation explained model. Also known coefficient determination.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) biglm object — glance.biglm","text":"","code":"# load modeling library library(biglm) # fit model -- linear regression bfit <- biglm(mpg ~ wt + disp, mtcars) # summarize model fit with tidiers tidy(bfit) #> # A tibble: 3 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) 35.0 2.16 1.11e-58 #> 2 wt -3.35 1.16 4.00e- 3 #> 3 disp -0.0177 0.00919 5.38e- 2 tidy(bfit, conf.int = TRUE) #> # A tibble: 3 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 35.0 2.16 1.11e-58 30.7 39.2 #> 2 wt -3.35 1.16 4.00e- 3 -5.63 -1.07 #> 3 disp -0.0177 0.00919 5.38e- 2 -0.0357 0.000288 tidy(bfit, conf.int = TRUE, conf.level = .9) #> # A tibble: 3 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 35.0 2.16 1.11e-58 31.4 38.5 #> 2 wt -3.35 1.16 4.00e- 3 -5.27 -1.44 #> 3 disp -0.0177 0.00919 5.38e- 2 -0.0328 -0.00261 glance(bfit) #> # A tibble: 1 × 5 #> r.squared AIC deviance df.residual nobs #> #> 1 0.781 253. 247. 29 32 # fit model -- logistic regression bgfit <- bigglm(am ~ mpg, mtcars, family = binomial()) # summarize model fit with tidiers tidy(bgfit) #> # A tibble: 2 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) -6.60 2.35 0.00498 #> 2 mpg 0.307 0.115 0.00751 tidy(bgfit, exponentiate = TRUE) #> # A tibble: 2 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) 0.00136 2.35 0.00498 #> 2 mpg 1.36 0.115 0.00751 tidy(bgfit, conf.int = TRUE) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) -6.60 2.35 0.00498 -11.2 -1.99 #> 2 mpg 0.307 0.115 0.00751 0.0819 0.532 tidy(bgfit, conf.int = TRUE, conf.level = .9) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) -6.60 2.35 0.00498 -10.5 -2.74 #> 2 mpg 0.307 0.115 0.00751 0.118 0.496 tidy(bgfit, conf.int = TRUE, conf.level = .9, exponentiate = TRUE) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 0.00136 2.35 0.00498 0.0000283 0.0648 #> 2 mpg 1.36 0.115 0.00751 1.13 1.64 glance(bgfit) #> # A tibble: 1 × 5 #> r.squared AIC deviance df.residual nobs #> #> 1 0.175 33.7 29.7 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) binDesign object — glance.binDesign","title":"Glance at a(n) binDesign object — glance.binDesign","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) binDesign object — glance.binDesign","text":"","code":"# S3 method for class 'binDesign' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) binDesign object — glance.binDesign","text":"x binGroup::binDesign object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) binDesign object — glance.binDesign","text":"tibble::tibble() exactly one row columns: power Power achieved analysis. n Sample size used achieve power. power.reached Whether desired power reached. maxit Number iterations performed.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) binDesign object — glance.binDesign","text":"","code":"# load libraries for models and data library(binGroup) des <- binDesign( nmax = 300, delta = 0.06, p.hyp = 0.1, power = .8 ) glance(des) #> # A tibble: 1 × 4 #> power n power.reached maxit #> #> 1 0.805 240 TRUE 238 tidy(des) #> # A tibble: 238 × 2 #> n power #> #> 1 3 0.0000640 #> 2 4 0.000248 #> 3 5 0.000602 #> 4 6 0.00117 #> 5 7 0.0000813 #> 6 8 0.000157 #> 7 9 0.000274 #> 8 10 0.000443 #> 9 11 0.000673 #> 10 12 0.0000640 #> # ℹ 228 more rows library(ggplot2) ggplot(tidy(des), aes(n, power)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) cch object — glance.cch","title":"Glance at a(n) cch object — glance.cch","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) cch object — glance.cch","text":"","code":"# S3 method for class 'cch' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) cch object — glance.cch","text":"x cch object returned survival::cch(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) cch object — glance.cch","text":"tibble::tibble() exactly one row columns: iter Iterations algorithm/fitting procedure completed. p.value P-value corresponding test statistic. rscore Robust log-rank statistic score Score. n number predictions nevent number events","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) cch object — glance.cch","text":"","code":"# load libraries for models and data library(survival) # examples come from cch documentation subcoh <- nwtco$in.subcohort selccoh <- with(nwtco, rel == 1 | subcoh == 1) ccoh.data <- nwtco[selccoh, ] ccoh.data$subcohort <- subcoh[selccoh] # central-lab histology ccoh.data$histol <- factor(ccoh.data$histol, labels = c(\"FH\", \"UH\")) # tumour stage ccoh.data$stage <- factor(ccoh.data$stage, labels = c(\"I\", \"II\", \"III\", \"IV\")) ccoh.data$age <- ccoh.data$age / 12 # age in years # fit model fit.ccP <- cch(Surv(edrel, rel) ~ stage + histol + age, data = ccoh.data, subcoh = ~subcohort, id = ~seqno, cohort.size = 4028 ) # summarize model fit with tidiers + visualization tidy(fit.ccP) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 stageII 0.735 0.168 4.36 1.30e- 5 0.404 1.06 #> 2 stageIII 0.597 0.173 3.44 5.77e- 4 0.257 0.937 #> 3 stageIV 1.38 0.205 6.76 1.40e-11 0.983 1.79 #> 4 histolUH 1.50 0.160 9.38 0 1.19 1.81 #> 5 age 0.0433 0.0237 1.82 6.83e- 2 -0.00324 0.0898 # coefficient plot library(ggplot2) ggplot(tidy(fit.ccP), aes(x = estimate, y = term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) clm object — glance.clm","title":"Glance at a(n) clm object — glance.clm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) clm object — glance.clm","text":"","code":"# S3 method for class 'clm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) clm object — glance.clm","text":"x clm object returned ordinal::clm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) clm object — glance.clm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.residual Residual degrees freedom. edf effective degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) clm object — glance.clm","text":"","code":"# load libraries for models and data library(ordinal) # fit model fit <- clm(rating ~ temp * contact, data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 7 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 intercept #> 5 tempwarm 2.32 0.701 3.31 9.28e- 4 location #> 6 contactyes 1.35 0.660 2.04 4.13e- 2 location #> 7 tempwarm:contactyes 0.360 0.924 0.389 6.97e- 1 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 NA NA intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 NA NA intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 NA NA intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 NA NA intercept #> 5 temp… 2.32 0.701 3.31 9.28e- 4 1.20 3.52 location #> 6 cont… 1.35 0.660 2.04 4.13e- 2 0.284 2.47 location #> 7 temp… 0.360 0.924 0.389 6.97e- 1 -1.17 1.89 location tidy(fit, conf.int = TRUE, conf.type = \"Wald\", exponentiate = TRUE) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.244 0.545 -2.59 9.66e- 3 0.0837 0.710 intercept #> 2 2|3 3.14 0.510 2.24 2.48e- 2 1.16 8.52 intercept #> 3 3|4 29.3 0.638 5.29 1.21e- 7 8.38 102. intercept #> 4 4|5 140. 0.751 6.58 4.66e-11 32.1 610. intercept #> 5 temp… 10.2 0.701 3.31 9.28e- 4 2.58 40.2 location #> 6 cont… 3.85 0.660 2.04 4.13e- 2 1.05 14.0 location #> 7 temp… 1.43 0.924 0.389 6.97e- 1 0.234 8.76 location glance(fit) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 7 187. 203. -86.4162 65 72 augment(fit, type.predict = \"prob\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 0.562 #> 2 3 cold no 0.209 #> 3 3 cold yes 0.435 #> 4 4 cold yes 0.0894 #> 5 4 warm no 0.190 #> 6 4 warm no 0.190 #> 7 5 warm yes 0.286 #> 8 5 warm yes 0.286 #> 9 1 cold no 0.196 #> 10 2 cold no 0.562 #> # ℹ 62 more rows augment(fit, type.predict = \"class\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 2 #> 2 3 cold no 2 #> 3 3 cold yes 3 #> 4 4 cold yes 3 #> 5 4 warm no 3 #> 6 4 warm no 3 #> 7 5 warm yes 4 #> 8 5 warm yes 4 #> 9 1 cold no 2 #> 10 2 cold no 2 #> # ℹ 62 more rows # ...and again with another model specification fit2 <- clm(rating ~ temp, nominal = ~contact, data = wine) tidy(fit2) #> # A tibble: 9 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2.(Intercept) -1.32 0.562 -2.35 0.0186 intercept #> 2 2|3.(Intercept) 1.25 0.475 2.63 0.00866 intercept #> 3 3|4.(Intercept) 3.55 0.656 5.41 0.0000000625 intercept #> 4 4|5.(Intercept) 4.66 0.860 5.42 0.0000000608 intercept #> 5 1|2.contactyes -1.62 1.16 -1.39 0.164 intercept #> 6 2|3.contactyes -1.51 0.591 -2.56 0.0105 intercept #> 7 3|4.contactyes -1.67 0.649 -2.58 0.00985 intercept #> 8 4|5.contactyes -1.05 0.897 -1.17 0.241 intercept #> 9 tempwarm 2.52 0.535 4.71 0.00000250 location glance(fit2) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 9 190. 211. -86.20855 63 72"},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) clmm object — glance.clmm","title":"Glance at a(n) clmm object — glance.clmm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) clmm object — glance.clmm","text":"","code":"# S3 method for class 'clmm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) clmm object — glance.clmm","text":"x clmm object returned ordinal::clmm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) clmm object — glance.clmm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. edf effective degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) clmm object — glance.clmm","text":"","code":"# load libraries for models and data library(ordinal) # fit model fit <- clmm(rating ~ temp + contact + (1 | judge), data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 6 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.62 0.682 -2.38 1.74e- 2 intercept #> 2 2|3 1.51 0.604 2.51 1.22e- 2 intercept #> 3 3|4 4.23 0.809 5.23 1.72e- 7 intercept #> 4 4|5 6.09 0.972 6.26 3.82e-10 intercept #> 5 tempwarm 3.06 0.595 5.14 2.68e- 7 location #> 6 contactyes 1.83 0.513 3.58 3.44e- 4 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 6 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.62 0.682 -2.38 1.74e- 2 -2.75 -0.501 intercept #> 2 2|3 1.51 0.604 2.51 1.22e- 2 0.520 2.51 intercept #> 3 3|4 4.23 0.809 5.23 1.72e- 7 2.90 5.56 intercept #> 4 4|5 6.09 0.972 6.26 3.82e-10 4.49 7.69 intercept #> 5 temp… 3.06 0.595 5.14 2.68e- 7 2.08 4.04 location #> 6 cont… 1.83 0.513 3.58 3.44e- 4 0.992 2.68 location tidy(fit, conf.int = TRUE, exponentiate = TRUE) #> # A tibble: 6 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.197 0.682 -2.38 1.74e- 2 0.0518 0.751 intercept #> 2 2|3 4.54 0.604 2.51 1.22e- 2 1.39 14.8 intercept #> 3 3|4 68.6 0.809 5.23 1.72e- 7 14.1 335. intercept #> 4 4|5 441. 0.972 6.26 3.82e-10 65.5 2965. intercept #> 5 temp… 21.4 0.595 5.14 2.68e- 7 6.66 68.7 location #> 6 cont… 6.26 0.513 3.58 3.44e- 4 2.29 17.1 location glance(fit) #> # A tibble: 1 × 5 #> edf AIC BIC logLik nobs #> #> 1 7 177. 193. -81.56541 72 # ...and again with another model specification fit2 <- clmm(rating ~ temp + (1 | judge), nominal = ~contact, data = wine) #> Warning: unrecognized control elements named ‘nominal’ ignored tidy(fit2) #> # A tibble: 5 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -2.20 0.613 -3.59 0.000333 intercept #> 2 2|3 0.545 0.476 1.15 0.252 intercept #> 3 3|4 2.84 0.607 4.68 0.00000291 intercept #> 4 4|5 4.48 0.751 5.96 0.00000000256 intercept #> 5 tempwarm 2.67 0.554 4.81 0.00000147 location glance(fit2) #> # A tibble: 1 × 5 #> edf AIC BIC logLik nobs #> #> 1 6 189. 203. -88.73882 72"},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) coeftest object — glance.coeftest","title":"Glance at a(n) coeftest object — glance.coeftest","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) coeftest object — glance.coeftest","text":"","code":"# S3 method for class 'coeftest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) coeftest object — glance.coeftest","text":"x coeftest object returned lmtest::coeftest(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) coeftest object — glance.coeftest","text":"way lmtest::coeftest() retains information underlying model object, returned columns glance.coeftest() vary depending arguments. Specifically, four columns returned regardless: \"Loglik\", \"AIC\", \"BIC\", \"nobs\". Users can obtain additional columns (e.g. \"r.squared\", \"df\") invoking \"save = TRUE\" argument part lmtest::coeftest(). See examples. aside, goodness--fit measures R-squared unaffected presence heteroskedasticity. discussion see, e.g. chapter 8.1 Wooldridge (2016).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Glance at a(n) coeftest object — glance.coeftest","text":"Wooldridge, Jeffrey M. (2016) Introductory econometrics: modern approach. (6th edition). Nelson Education.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) coeftest object — glance.coeftest","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) coeftest object — glance.coeftest","text":"","code":"# load libraries for models and data library(lmtest) m <- lm(dist ~ speed, data = cars) coeftest(m) #> #> t test of coefficients: #> #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) -17.57909 6.75844 -2.6011 0.01232 * #> speed 3.93241 0.41551 9.4640 1.49e-12 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> tidy(coeftest(m)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 #> 2 speed 3.93 0.416 9.46 1.49e-12 tidy(coeftest(m, conf.int = TRUE)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 #> 2 speed 3.93 0.416 9.46 1.49e-12 # a very common workflow is to combine lmtest::coeftest with alternate # variance-covariance matrices via the sandwich package. The lmtest # tidiers support this workflow too, enabling you to adjust the standard # errors of your tidied models on the fly. library(sandwich) # \"HC3\" (default) robust SEs tidy(coeftest(m, vcov = vcovHC)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 5.93 -2.96 4.72e- 3 #> 2 speed 3.93 0.428 9.20 3.64e-12 # \"HC2\" robust SEs tidy(coeftest(m, vcov = vcovHC, type = \"HC2\")) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 5.73 -3.07 3.55e- 3 #> 2 speed 3.93 0.413 9.53 1.21e-12 # N-W HAC robust SEs tidy(coeftest(m, vcov = NeweyWest)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 7.02 -2.50 0.0157 #> 2 speed 3.93 0.551 7.14 0.00000000453 # the columns of the returned tibble for glance.coeftest() will vary # depending on whether the coeftest object retains the underlying model. # Users can control this with the \"save = TRUE\" argument of coeftest(). glance(coeftest(m)) #> Original model not retained as part of coeftest object. #> ℹ For additional model summary information (r.squared, df, etc.), #> consider passing `glance.coeftest()` an object where the underlying #> model has been saved, i.e. `lmtest::coeftest(..., save = TRUE)`. #> This message is displayed once per session. #> # A tibble: 1 × 4 #> logLik AIC BIC nobs #> #> 1 -206.578 419. 425. 50 glance(coeftest(m, save = TRUE)) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.651 0.644 15.4 89.6 1.49e-12 1 -207. 419. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs "},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) coxph object — glance.coxph","title":"Glance at a(n) coxph object — glance.coxph","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) coxph object — glance.coxph","text":"","code":"# S3 method for class 'coxph' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) coxph object — glance.coxph","text":"x coxph object returned survival::coxph(). ... tidy(), additional arguments passed summary(x, ...). Otherwise ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) coxph object — glance.coxph","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. n total number observations. nevent Number events. nobs Number observations used. See survival::coxph.object additional column descriptions.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) coxph object — glance.coxph","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) # summarize model fit with tidiers tidy(cfit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 0.0170 0.00922 1.85 0.0646 #> 2 sex -0.513 0.167 -3.06 0.00218 tidy(cfit, exponentiate = TRUE) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 1.02 0.00922 1.85 0.0646 #> 2 sex 0.599 0.167 -3.06 0.00218 lp <- augment(cfit, lung) risks <- augment(cfit, lung, type.predict = \"risk\") expected <- augment(cfit, lung, type.predict = \"expected\") glance(cfit) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 228 165 14.1 0.000857 13.7 0.00105 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs # also works on clogit models resp <- levels(logan$occupation) n <- nrow(logan) indx <- rep(1:n, length(resp)) logan2 <- data.frame( logan[indx, ], id = indx, tocc = factor(rep(resp, each = n)) ) logan2$case <- (logan2$occupation == logan2$tocc) cl <- clogit(case ~ tocc + tocc:education + strata(id), logan2) tidy(cl) #> # A tibble: 9 × 5 #> term estimate std.error statistic p.value #> #> 1 toccfarm -1.90 1.38 -1.37 1.70e- 1 #> 2 toccoperatives 1.17 0.566 2.06 3.91e- 2 #> 3 toccprofessional -8.10 0.699 -11.6 4.45e-31 #> 4 toccsales -5.03 0.770 -6.53 6.54e-11 #> 5 tocccraftsmen:education -0.332 0.0569 -5.84 5.13e- 9 #> 6 toccfarm:education -0.370 0.116 -3.18 1.47e- 3 #> 7 toccoperatives:education -0.422 0.0584 -7.23 4.98e-13 #> 8 toccprofessional:education 0.278 0.0510 5.45 4.94e- 8 #> 9 toccsales:education NA 0 NA NA glance(cl) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 4190 838 666. 1.90e-138 682. 5.01e-142 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs library(ggplot2) ggplot(lp, aes(age, .fitted, color = sex)) + geom_point() ggplot(risks, aes(age, .fitted, color = sex)) + geom_point() ggplot(expected, aes(time, .fitted, color = sex)) + geom_point()"},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) crr object — glance.crr","title":"Glance at a(n) crr object — glance.crr","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) crr object — glance.crr","text":"","code":"# S3 method for class 'crr' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) crr object — glance.crr","text":"x crr object returned cmprsk::crr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) crr object — glance.crr","text":"tibble::tibble() exactly one row columns: converged Logical indicating model fitting procedure succesful converged. df Degrees freedom used model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) crr object — glance.crr","text":"","code":"library(cmprsk) # time to loco-regional failure (lrf) lrf_time <- rexp(100) lrf_event <- sample(0:2, 100, replace = TRUE) trt <- sample(0:1, 100, replace = TRUE) strt <- sample(1:2, 100, replace = TRUE) # fit model x <- crr(lrf_time, lrf_event, cbind(trt, strt)) # summarize model fit with tidiers tidy(x, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 trt -0.338 0.344 -0.983 0.33 -1.01 0.336 #> 2 strt 0.374 0.354 1.06 0.29 -0.320 1.07 glance(x) #> # A tibble: 1 × 5 #> converged logLik nobs df statistic #> #> 1 TRUE -132. 100 2 2.12"},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"","code":"# S3 method for class 'cv.glmnet' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"x cv.glmnet object returned glmnet::cv.glmnet(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"tibble::tibble() exactly one row columns: lambda.1se value penalization parameter lambda results sparsest model remaining within one standard error minimum loss. lambda.min value penalization parameter lambda achieved minimum loss estimated cross validation. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"","code":"# load libraries for models and data library(glmnet) #> Loaded glmnet 4.1-8 set.seed(27) nobs <- 100 nvar <- 50 real <- 5 x <- matrix(rnorm(nobs * nvar), nobs, nvar) beta <- c(rnorm(real, 0, 1), rep(0, nvar - real)) y <- c(t(beta) %*% t(x)) + rnorm(nvar, sd = 3) cvfit1 <- cv.glmnet(x, y) tidy(cvfit1) #> # A tibble: 74 × 6 #> lambda estimate std.error conf.low conf.high nzero #> #> 1 1.45 17.4 2.28 15.1 19.7 0 #> 2 1.32 17.4 2.28 15.1 19.7 1 #> 3 1.20 17.2 2.22 15.0 19.5 1 #> 4 1.09 17.0 2.15 14.8 19.1 1 #> 5 0.997 16.8 2.09 14.7 18.9 1 #> 6 0.909 16.7 2.03 14.7 18.7 2 #> 7 0.828 16.7 1.99 14.7 18.6 3 #> 8 0.754 16.7 1.95 14.7 18.6 5 #> 9 0.687 16.8 1.93 14.8 18.7 7 #> 10 0.626 16.9 1.91 15.0 18.8 7 #> # ℹ 64 more rows glance(cvfit1) #> # A tibble: 1 × 3 #> lambda.min lambda.1se nobs #> #> 1 0.828 1.45 100 library(ggplot2) tidied_cv <- tidy(cvfit1) glance_cv <- glance(cvfit1) # plot of MSE as a function of lambda g <- ggplot(tidied_cv, aes(lambda, estimate)) + geom_line() + scale_x_log10() g # plot of MSE as a function of lambda with confidence ribbon g <- g + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25) g # plot of MSE as a function of lambda with confidence ribbon and choices # of minimum lambda marked g <- g + geom_vline(xintercept = glance_cv$lambda.min) + geom_vline(xintercept = glance_cv$lambda.1se, lty = 2) g # plot of number of zeros for each choice of lambda ggplot(tidied_cv, aes(lambda, nzero)) + geom_line() + scale_x_log10() # coefficient plot with min lambda shown tidied <- tidy(cvfit1$glmnet.fit) ggplot(tidied, aes(lambda, estimate, group = term)) + scale_x_log10() + geom_line() + geom_vline(xintercept = glance_cv$lambda.min) + geom_vline(xintercept = glance_cv$lambda.1se, lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) drc object — glance.drc","title":"Glance at a(n) drc object — glance.drc","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) drc object — glance.drc","text":"","code":"# S3 method for class 'drc' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) drc object — glance.drc","text":"x drc object produced call drc::drm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) drc object — glance.drc","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. AICc AIC corrected small samples","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) drc object — glance.drc","text":"","code":"# load libraries for models and data library(drc) # fit model mod <- drm(dead / total ~ conc, type, weights = total, data = selenium, fct = LL.2(), type = \"binomial\" ) # summarize model fit with tidiers tidy(mod) #> # A tibble: 8 × 6 #> term curve estimate std.error statistic p.value #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 #> 5 e 1 252. 13.8 18.2 1.16e-74 #> 6 e 2 378. 39.4 9.61 3.53e-22 #> 7 e 3 120. 5.91 20.3 1.14e-91 #> 8 e 4 88.8 8.62 10.3 3.28e-25 tidy(mod, conf.int = TRUE) #> # A tibble: 8 × 8 #> term curve estimate std.error statistic p.value conf.low conf.high #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 -1.81 -1.20 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 -1.12 -0.571 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 -2.43 -1.89 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 -1.78 -1.12 #> 5 e 1 252. 13.8 18.2 1.16e-74 225. 279. #> 6 e 2 378. 39.4 9.61 3.53e-22 301. 456. #> 7 e 3 120. 5.91 20.3 1.14e-91 108. 131. #> 8 e 4 88.8 8.62 10.3 3.28e-25 71.9 106. glance(mod) #> # A tibble: 1 × 4 #> AIC BIC logLik df.residual #> #> 1 768. 778. -376.2099 17 augment(mod, selenium) #> # A tibble: 25 × 7 #> type conc total dead .fitted .resid .cooksd #> #> 1 1 0 151 3 0 0.0199 0 #> 2 1 100 146 40 0.199 0.0748 0.0000909 #> 3 1 200 116 31 0.414 -0.146 0.000104 #> 4 1 300 159 85 0.565 -0.0302 0.00000516 #> 5 1 400 150 102 0.667 0.0133 0.00000220 #> 6 1 500 140 112 0.737 0.0633 0.0000720 #> 7 2 0 141 2 0 0.0142 0 #> 8 2 100 153 30 0.246 -0.0495 0.000168 #> 9 2 200 142 59 0.369 0.0468 0.0000347 #> 10 2 300 139 82 0.451 0.139 0.0000430 #> # ℹ 15 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ergm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) ergm object — glance.ergm","title":"Glance at a(n) ergm object — glance.ergm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ergm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) ergm object — glance.ergm","text":"","code":"# S3 method for class 'ergm' glance(x, deviance = FALSE, mcmc = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ergm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) ergm object — glance.ergm","text":"x ergm object returned call ergm::ergm(). deviance Logical indicating whether report null residual deviance model, well degrees freedom. Defaults FALSE. mcmc Logical indicating whether report MCMC interval, burn-sample size used estimate model. Defaults FALSE. ... Additional arguments pass ergm::summary(). Cautionary note: Misspecified arguments may silently ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ergm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) ergm object — glance.ergm","text":"glance.ergm returns one-row tibble columns independence Whether model assumed dyadic independence iterations number MCMLE iterations performed convergence logLik applicable, log-likelihood associated model AIC Akaike Information Criterion BIC Bayesian Information Criterion deviance = TRUE, model supports , tibble also contain columns null.deviance null deviance model df.null degrees freedom null deviance residual.deviance residual deviance model df.residual degrees freedom residual deviance","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) factanal object — glance.factanal","title":"Glance at a(n) factanal object — glance.factanal","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) factanal object — glance.factanal","text":"","code":"# S3 method for class 'factanal' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) factanal object — glance.factanal","text":"x factanal object created stats::factanal(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) factanal object — glance.factanal","text":"tibble::tibble() exactly one row columns: converged Logical indicating model fitting procedure succesful converged. df Degrees freedom used model. method method used. n total number observations. n.factors number fitted factors. nobs Number observations used. p.value P-value corresponding test statistic. statistic Test statistic. total.variance Total cumulative proportion variance accounted factors.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) factanal object — glance.factanal","text":"","code":"set.seed(123) # generate data library(dplyr) library(purrr) m1 <- tibble( v1 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 4, 5, 6), v2 = c(1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 3, 4, 3, 3, 3, 4, 6, 5), v3 = c(3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 6), v4 = c(3, 3, 4, 3, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 5, 6, 4), v5 = c(1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 6, 4, 5), v6 = c(1, 1, 1, 2, 1, 3, 3, 3, 4, 3, 1, 1, 1, 2, 1, 6, 5, 4) ) # new data m2 <- map_dfr(m1, rev) # factor analysis objects fit1 <- factanal(m1, factors = 3, scores = \"Bartlett\") fit2 <- factanal(m1, factors = 3, scores = \"regression\") # tidying the object tidy(fit1) #> # A tibble: 6 × 5 #> variable uniqueness fl1 fl2 fl3 #> #> 1 v1 0.005 0.944 0.182 0.267 #> 2 v2 0.101 0.905 0.235 0.159 #> 3 v3 0.005 0.236 0.210 0.946 #> 4 v4 0.224 0.180 0.242 0.828 #> 5 v5 0.0843 0.242 0.881 0.286 #> 6 v6 0.005 0.193 0.959 0.196 tidy(fit2) #> # A tibble: 6 × 5 #> variable uniqueness fl1 fl2 fl3 #> #> 1 v1 0.005 0.944 0.182 0.267 #> 2 v2 0.101 0.905 0.235 0.159 #> 3 v3 0.005 0.236 0.210 0.946 #> 4 v4 0.224 0.180 0.242 0.828 #> 5 v5 0.0843 0.242 0.881 0.286 #> 6 v6 0.005 0.193 0.959 0.196 # augmented dataframe augment(fit1) #> # A tibble: 18 × 4 #> .rownames .fs1 .fs2 .fs3 #> #> 1 1 -0.904 -0.931 0.948 #> 2 2 -0.869 -0.933 0.935 #> 3 3 -0.908 -0.932 0.962 #> 4 4 -1.00 -0.253 0.818 #> 5 5 -0.904 -0.931 0.948 #> 6 6 -0.745 0.727 -0.788 #> 7 7 -0.710 0.725 -0.801 #> 8 8 -0.750 0.726 -0.774 #> 9 9 -0.808 1.40 -0.930 #> 10 10 -0.745 0.727 -0.788 #> 11 11 0.927 -0.931 -0.837 #> 12 12 0.963 -0.933 -0.849 #> 13 13 0.923 -0.932 -0.823 #> 14 14 0.829 -0.253 -0.967 #> 15 15 0.927 -0.931 -0.837 #> 16 16 0.422 2.05 1.29 #> 17 17 1.47 1.29 0.545 #> 18 18 1.88 0.309 1.95 augment(fit2) #> # A tibble: 18 × 4 #> .rownames .fs1 .fs2 .fs3 #> #> 1 1 -0.897 -0.925 0.936 #> 2 2 -0.861 -0.927 0.924 #> 3 3 -0.901 -0.926 0.950 #> 4 4 -0.993 -0.251 0.809 #> 5 5 -0.897 -0.925 0.936 #> 6 6 -0.741 0.720 -0.784 #> 7 7 -0.706 0.718 -0.796 #> 8 8 -0.745 0.719 -0.770 #> 9 9 -0.803 1.39 -0.923 #> 10 10 -0.741 0.720 -0.784 #> 11 11 0.917 -0.925 -0.830 #> 12 12 0.952 -0.927 -0.842 #> 13 13 0.913 -0.926 -0.816 #> 14 14 0.820 -0.252 -0.958 #> 15 15 0.917 -0.925 -0.830 #> 16 16 0.426 2.04 1.28 #> 17 17 1.46 1.29 0.548 #> 18 18 1.88 0.314 1.95 # augmented dataframe (with new data) augment(fit1, data = m2) #> # A tibble: 18 × 10 #> .rownames v1 v2 v3 v4 v5 v6 .fs1 .fs2 .fs3 #> #> 1 1 6 5 6 4 5 4 -0.904 -0.931 0.948 #> 2 2 5 6 4 6 4 5 -0.869 -0.933 0.935 #> 3 3 4 4 5 5 6 6 -0.908 -0.932 0.962 #> 4 4 3 3 1 1 1 1 -1.00 -0.253 0.818 #> 5 5 3 3 1 1 1 2 -0.904 -0.931 0.948 #> 6 6 3 3 1 2 1 1 -0.745 0.727 -0.788 #> 7 7 3 4 1 1 1 1 -0.710 0.725 -0.801 #> 8 8 3 3 1 1 1 1 -0.750 0.726 -0.774 #> 9 9 1 1 1 1 3 3 -0.808 1.40 -0.930 #> 10 10 1 2 1 1 3 4 -0.745 0.727 -0.788 #> 11 11 1 1 1 2 3 3 0.927 -0.931 -0.837 #> 12 12 1 2 1 1 3 3 0.963 -0.933 -0.849 #> 13 13 1 1 1 1 3 3 0.923 -0.932 -0.823 #> 14 14 1 1 3 3 1 1 0.829 -0.253 -0.967 #> 15 15 1 1 3 3 1 2 0.927 -0.931 -0.837 #> 16 16 1 1 3 4 1 1 0.422 2.05 1.29 #> 17 17 1 2 3 3 1 1 1.47 1.29 0.545 #> 18 18 1 1 3 3 1 1 1.88 0.309 1.95 augment(fit2, data = m2) #> # A tibble: 18 × 10 #> .rownames v1 v2 v3 v4 v5 v6 .fs1 .fs2 .fs3 #> #> 1 1 6 5 6 4 5 4 -0.897 -0.925 0.936 #> 2 2 5 6 4 6 4 5 -0.861 -0.927 0.924 #> 3 3 4 4 5 5 6 6 -0.901 -0.926 0.950 #> 4 4 3 3 1 1 1 1 -0.993 -0.251 0.809 #> 5 5 3 3 1 1 1 2 -0.897 -0.925 0.936 #> 6 6 3 3 1 2 1 1 -0.741 0.720 -0.784 #> 7 7 3 4 1 1 1 1 -0.706 0.718 -0.796 #> 8 8 3 3 1 1 1 1 -0.745 0.719 -0.770 #> 9 9 1 1 1 1 3 3 -0.803 1.39 -0.923 #> 10 10 1 2 1 1 3 4 -0.741 0.720 -0.784 #> 11 11 1 1 1 2 3 3 0.917 -0.925 -0.830 #> 12 12 1 2 1 1 3 3 0.952 -0.927 -0.842 #> 13 13 1 1 1 1 3 3 0.913 -0.926 -0.816 #> 14 14 1 1 3 3 1 1 0.820 -0.252 -0.958 #> 15 15 1 1 3 3 1 2 0.917 -0.925 -0.830 #> 16 16 1 1 3 4 1 1 0.426 2.04 1.28 #> 17 17 1 2 3 3 1 1 1.46 1.29 0.548 #> 18 18 1 1 3 3 1 1 1.88 0.314 1.95"},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) felm object — glance.felm","title":"Glance at a(n) felm object — glance.felm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) felm object — glance.felm","text":"","code":"# S3 method for class 'felm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) felm object — glance.felm","text":"x felm object returned lfe::felm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) felm object — glance.felm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. df Degrees freedom used model. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) felm object — glance.felm","text":"","code":"# load libraries for models and data library(lfe) # use built-in `airquality` dataset head(airquality) #> Ozone Solar.R Wind Temp Month Day #> 1 41 190 7.4 67 5 1 #> 2 36 118 8.0 72 5 2 #> 3 12 149 12.6 74 5 3 #> 4 18 313 11.5 62 5 4 #> 5 NA NA 14.3 56 5 5 #> 6 28 NA 14.9 66 5 6 # no FEs; same as lm() est0 <- felm(Ozone ~ Temp + Wind + Solar.R, airquality) # summarize model fit with tidiers tidy(est0) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -64.3 23.1 -2.79 0.00623 #> 2 Temp 1.65 0.254 6.52 0.00000000242 #> 3 Wind -3.33 0.654 -5.09 0.00000152 #> 4 Solar.R 0.0598 0.0232 2.58 0.0112 augment(est0) #> # A tibble: 111 × 7 #> .rownames Ozone Temp Wind Solar.R .fitted .resid #> #> 1 1 41 67 7.4 190 33.0 7.95 #> 2 2 36 72 8 118 35.0 1.00 #> 3 3 12 74 12.6 149 24.8 -12.8 #> 4 4 18 62 11.5 313 18.5 -0.475 #> 5 7 23 65 8.6 299 32.3 -9.26 #> 6 8 19 59 13.8 99 -6.95 25.9 #> 7 9 8 61 20.1 19 -29.4 37.4 #> 8 12 16 69 9.7 256 32.6 -16.6 #> 9 13 11 66 9.2 290 31.4 -20.4 #> 10 14 14 68 10.9 274 28.1 -14.1 #> # ℹ 101 more rows # add month fixed effects est1 <- felm(Ozone ~ Temp + Wind + Solar.R | Month, airquality) # summarize model fit with tidiers tidy(est1) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, fe = TRUE) #> # A tibble: 8 × 7 #> term estimate std.error statistic p.value N comp #> #> 1 Temp 1.88 0.341 5.50 0.000000274 NA NA #> 2 Wind -3.11 0.660 -4.71 0.00000778 NA NA #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 NA NA #> 4 Month.5 -74.2 4.23 -17.5 2.00 24 1 #> 5 Month.6 -89.0 6.91 -12.9 2.00 9 1 #> 6 Month.7 -83.0 4.06 -20.4 2 26 1 #> 7 Month.8 -78.4 4.32 -18.2 2.00 23 1 #> 8 Month.9 -90.2 3.85 -23.4 2 29 1 augment(est1) #> # A tibble: 111 × 8 #> .rownames Ozone Temp Wind Solar.R Month .fitted .resid #> #> 1 1 41 67 7.4 190 5 38.3 2.69 #> 2 2 36 72 8 118 5 42.1 -6.07 #> 3 3 12 74 12.6 149 5 33.1 -21.1 #> 4 4 18 62 11.5 313 5 22.6 -4.62 #> 5 7 23 65 8.6 299 5 36.5 -13.5 #> 6 8 19 59 13.8 99 5 -1.33 20.3 #> 7 9 8 61 20.1 19 5 -21.3 29.3 #> 8 12 16 69 9.7 256 5 38.4 -22.4 #> 9 13 11 66 9.2 290 5 36.1 -25.1 #> 10 14 14 68 10.9 274 5 33.7 -19.7 #> # ℹ 101 more rows glance(est1) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.637 0.612 20.7 25.8 4.57e-20 103 103 111 # the \"se.type\" argument can be used to switch out different standard errors # types on the fly. In turn, this can be useful exploring the effect of # different error structures on model inference. tidy(est1, se.type = \"iid\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, se.type = \"robust\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.344 5.45 0.000000344 #> 2 Wind -3.11 0.903 -3.44 0.000834 #> 3 Solar.R 0.0522 0.0226 2.31 0.0227 # add clustered SEs (also by month) est2 <- felm(Ozone ~ Temp + Wind + Solar.R | Month | 0 | Month, airquality) # summarize model fit with tidiers tidy(est2, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"cluster\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"robust\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.344 5.45 0.00550 0.920 2.83 #> 2 Wind -3.11 0.903 -3.44 0.0262 -5.62 -0.602 #> 3 Solar.R 0.0522 0.0226 2.31 0.0817 -0.0104 0.115 tidy(est2, conf.int = TRUE, se.type = \"iid\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.341 5.50 0.00532 0.929 2.82 #> 2 Wind -3.11 0.660 -4.71 0.00924 -4.94 -1.28 #> 3 Solar.R 0.0522 0.0237 2.21 0.0920 -0.0135 0.118"},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) fitdistr object — glance.fitdistr","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"","code":"# S3 method for class 'fitdistr' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"x fitdistr object returned MASS::fitdistr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"","code":"# load libraries for models and data library(MASS) # generate data set.seed(2015) x <- rnorm(100, 5, 2) # fit models fit <- fitdistr(x, dnorm, list(mean = 3, sd = 1)) #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 3 #> term estimate std.error #> #> 1 mean 4.90 0.201 #> 2 sd 2.01 0.142 glance(fit) #> # A tibble: 1 × 4 #> logLik AIC BIC nobs #> #> 1 -211.6533 427. 433. 100"},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) fixest object — glance.fixest","title":"Glance at a(n) fixest object — glance.fixest","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) fixest object — glance.fixest","text":"","code":"# S3 method for class 'fixest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) fixest object — glance.fixest","text":"x fixest object returned fixest estimators ... Additional arguments passed summary confint. Important arguments se cluster. arguments dof, exact_dof, forceCovariance, keepBounded. See summary.fixest.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) fixest object — glance.fixest","text":"columns listed returned, NA, depending type model estimated. sigma, r.squared, adj.r.squared, within.r.squared NA model feols. pseudo.r.squared NA feols.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) fixest object — glance.fixest","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. pseudo.r.squared Like R squared statistic, situations R squared statistic defined. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. within.r.squared R squared within fixed-effect groups.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) fixest object — glance.fixest","text":"","code":"# load libraries for models and data library(fixest) gravity <- feols( log(Euros) ~ log(dist_km) | Origin + Destination + Product + Year, trade ) tidy(gravity) #> # A tibble: 1 × 5 #> term estimate std.error statistic p.value #> #> 1 log(dist_km) -2.17 0.154 -14.1 0.00000000119 glance(gravity) #> # A tibble: 1 × 9 #> r.squared adj.r.squared within.r.squared pseudo.r.squared sigma nobs #> #> 1 0.706 0.705 0.219 NA 1.74 38325 #> # ℹ 3 more variables: AIC , BIC , logLik augment(gravity, trade) #> # A tibble: 38,325 × 9 #> .rownames Destination Origin Product Year dist_km Euros .fitted #> #> 1 1 LU BE 1 2007 140. 2966697 14.1 #> 2 2 BE LU 1 2007 140. 6755030 13.0 #> 3 3 LU BE 2 2007 140. 57078782 16.9 #> 4 4 BE LU 2 2007 140. 7117406 15.8 #> 5 5 LU BE 3 2007 140. 17379821 16.3 #> 6 6 BE LU 3 2007 140. 2622254 15.2 #> 7 7 LU BE 4 2007 140. 64867588 17.4 #> 8 8 BE LU 4 2007 140. 10731757 16.3 #> 9 9 LU BE 5 2007 140. 330702 14.1 #> 10 10 BE LU 5 2007 140. 7706 13.0 #> # ℹ 38,315 more rows #> # ℹ 1 more variable: .resid # to get robust or clustered SEs, users can either: # 1) specify the arguments directly in the `tidy()` call tidy(gravity, conf.int = TRUE, cluster = c(\"Product\", \"Year\")) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 tidy(gravity, conf.int = TRUE, se = \"threeway\") #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.175 -12.4 6.08e-9 -2.54 -1.79 # 2) or, feed tidy() a summary.fixest object that has already accepted # these arguments gravity_summ <- summary(gravity, cluster = c(\"Product\", \"Year\")) tidy(gravity_summ, conf.int = TRUE) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 # approach (1) is preferred."},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) gam object — glance.gam","title":"Glance at a(n) gam object — glance.gam","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) gam object — glance.gam","text":"","code":"# S3 method for class 'gam' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) gam object — glance.gam","text":"x gam object returned call mgcv::gam(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) gam object — glance.gam","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. npar Number parameters model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) gam object — glance.gam","text":"","code":"# load libraries for models and data library(mgcv) # fit model g <- gam(mpg ~ s(hp) + am + qsec, data = mtcars) # summarize model fit with tidiers tidy(g) #> # A tibble: 1 × 5 #> term edf ref.df statistic p.value #> #> 1 s(hp) 2.36 3.02 6.34 0.00218 tidy(g, parametric = TRUE) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 16.7 9.83 1.70 0.101 #> 2 am 4.37 1.56 2.81 0.00918 #> 3 qsec 0.0904 0.525 0.172 0.865 glance(g) #> # A tibble: 1 × 9 #> df logLik AIC BIC deviance df.residual nobs adj.r.squared npar #> #> 1 5.36 -74.4 162. 171. 196. 26.6 32 0.797 12 augment(g) #> # A tibble: 32 × 11 #> .rownames mpg am qsec hp .fitted .se.fit .resid .hat .sigma #> #> 1 Mazda RX4 21 1 16.5 110 24.3 1.03 -3.25 0.145 NA #> 2 Mazda RX4… 21 1 17.0 110 24.3 0.925 -3.30 0.116 NA #> 3 Datsun 710 22.8 1 18.6 93 26.0 0.894 -3.22 0.109 NA #> 4 Hornet 4 … 21.4 0 19.4 110 20.2 0.827 1.25 0.0930 NA #> 5 Hornet Sp… 18.7 0 17.0 175 15.7 0.815 3.02 0.0902 NA #> 6 Valiant 18.1 0 20.2 105 20.7 0.914 -2.56 0.113 NA #> 7 Duster 360 14.3 0 15.8 245 12.7 1.11 1.63 0.167 NA #> 8 Merc 240D 24.4 0 20 62 25.0 1.45 -0.618 0.287 NA #> 9 Merc 230 22.8 0 22.9 95 21.8 1.81 0.959 0.446 NA #> 10 Merc 280 19.2 0 18.3 123 19.0 0.864 0.211 0.102 NA #> # ℹ 22 more rows #> # ℹ 1 more variable: .cooksd "},{"path":"https://broom.tidymodels.org/dev/reference/glance.garch.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) garch object — glance.garch","title":"Tidy a(n) garch object — glance.garch","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.garch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) garch object — glance.garch","text":"","code":"# S3 method for class 'garch' glance(x, test = c(\"box-ljung-test\", \"jarque-bera-test\"), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.garch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) garch object — glance.garch","text":"x garch object returned tseries::garch(). test Character specification hypothesis test use. garch function reports 2 hypothesis tests: Jarque-Bera residuals Box-Ljung squared residuals. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.garch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) garch object — glance.garch","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. method method used. nobs Number observations used. p.value P-value corresponding test statistic. statistic Test statistic. parameter Parameter field htest, typically degrees freedom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) geeglm object — glance.geeglm","title":"Glance at a(n) geeglm object — glance.geeglm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) geeglm object — glance.geeglm","text":"","code":"# S3 method for class 'geeglm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) geeglm object — glance.geeglm","text":"x geeglm object returned call geepack::geeglm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) geeglm object — glance.geeglm","text":"tibble::tibble() exactly one row columns: alpha Estimated correlation parameter geepack::geeglm. df.residual Residual degrees freedom. gamma Estimated scale parameter geepack::geeglm. max.cluster.size Max number elements clusters. n.clusters Number clusters.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) geeglm object — glance.geeglm","text":"","code":"# load modeling library library(geepack) # load data data(state) ds <- data.frame(state.region, state.x77) # fit model geefit <- geeglm(Income ~ Frost + Murder, id = state.region, data = ds, corstr = \"exchangeable\" ) # summarize model fit with tidiers tidy(geefit) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4406. 407. 117. 0 #> 2 Frost 1.69 2.25 0.562 0.453 #> 3 Murder -22.7 31.4 0.522 0.470 tidy(geefit, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4406. 407. 117. 0 3608. 5205. #> 2 Frost 1.69 2.25 0.562 0.453 -2.72 6.10 #> 3 Murder -22.7 31.4 0.522 0.470 -84.2 38.8"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) glm object — glance.glm","title":"Glance at a(n) glm object — glance.glm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) glm object — glance.glm","text":"","code":"# S3 method for class 'glm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) glm object — glance.glm","text":"x glm object returned stats::glm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) glm object — glance.glm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) glm object — glance.glm","text":"","code":"g <- glm(am ~ mpg, mtcars, family = \"binomial\") glance(g) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -14.8 33.7 36.6 29.7 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) glmRob object — glance.glmRob","title":"Glance at a(n) glmRob object — glance.glmRob","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) glmRob object — glance.glmRob","text":"","code":"# S3 method for class 'glmRob' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) glmRob object — glance.glmRob","text":"x glmRob object returned robust::glmRob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) glmRob object — glance.glmRob","text":"tibble::tibble() exactly one row columns: deviance Deviance model. df.residual Residual degrees freedom. nobs Number observations used. null.deviance Deviance null model. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) glmRob object — glance.glmRob","text":"","code":"# load libraries for models and data library(robust) # fit model gm <- glmRob(am ~ wt, data = mtcars, family = \"binomial\") # summarize model fit with tidiers tidy(gm) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 12.0 4.51 2.67 0.00759 #> 2 wt -4.02 1.44 -2.80 0.00509 glance(gm) #> # A tibble: 1 × 5 #> deviance sigma null.deviance df.residual nobs #> #> 1 19.2 0.800 44.4 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) glmnet object — glance.glmnet","title":"Glance at a(n) glmnet object — glance.glmnet","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) glmnet object — glance.glmnet","text":"","code":"# S3 method for class 'glmnet' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) glmnet object — glance.glmnet","text":"x glmnet object returned glmnet::glmnet(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) glmnet object — glance.glmnet","text":"tibble::tibble() exactly one row columns: nobs Number observations used. npasses Total passes data across lambda values. nulldev Null deviance.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) glmnet object — glance.glmnet","text":"","code":"# load libraries for models and data library(glmnet) set.seed(2014) x <- matrix(rnorm(100 * 20), 100, 20) y <- rnorm(100) fit1 <- glmnet(x, y) # summarize model fit with tidiers + visualization tidy(fit1) #> # A tibble: 1,086 × 5 #> term step estimate lambda dev.ratio #> #> 1 (Intercept) 1 -0.207 0.152 0 #> 2 (Intercept) 2 -0.208 0.139 0.00464 #> 3 (Intercept) 3 -0.209 0.127 0.0111 #> 4 (Intercept) 4 -0.210 0.115 0.0165 #> 5 (Intercept) 5 -0.210 0.105 0.0240 #> 6 (Intercept) 6 -0.210 0.0957 0.0321 #> 7 (Intercept) 7 -0.210 0.0872 0.0412 #> 8 (Intercept) 8 -0.210 0.0795 0.0497 #> 9 (Intercept) 9 -0.209 0.0724 0.0593 #> 10 (Intercept) 10 -0.208 0.0660 0.0682 #> # ℹ 1,076 more rows glance(fit1) #> # A tibble: 1 × 3 #> nulldev npasses nobs #> #> 1 104. 255 100 library(dplyr) library(ggplot2) tidied <- tidy(fit1) %>% filter(term != \"(Intercept)\") ggplot(tidied, aes(step, estimate, group = term)) + geom_line() ggplot(tidied, aes(lambda, estimate, group = term)) + geom_line() + scale_x_log10() ggplot(tidied, aes(lambda, dev.ratio)) + geom_line() # works for other types of regressions as well, such as logistic g2 <- sample(1:2, 100, replace = TRUE) fit2 <- glmnet(x, g2, family = \"binomial\") tidy(fit2) #> # A tibble: 947 × 5 #> term step estimate lambda dev.ratio #> #> 1 (Intercept) 1 0.282 0.0906 -1.62e-15 #> 2 (Intercept) 2 0.281 0.0826 6.28e- 3 #> 3 (Intercept) 3 0.279 0.0753 1.55e- 2 #> 4 (Intercept) 4 0.277 0.0686 2.48e- 2 #> 5 (Intercept) 5 0.284 0.0625 4.17e- 2 #> 6 (Intercept) 6 0.293 0.0569 5.79e- 2 #> 7 (Intercept) 7 0.303 0.0519 7.39e- 2 #> 8 (Intercept) 8 0.314 0.0473 8.94e- 2 #> 9 (Intercept) 9 0.325 0.0431 1.03e- 1 #> 10 (Intercept) 10 0.336 0.0392 1.14e- 1 #> # ℹ 937 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) gmm object — glance.gmm","title":"Glance at a(n) gmm object — glance.gmm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) gmm object — glance.gmm","text":"","code":"# S3 method for class 'gmm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) gmm object — glance.gmm","text":"x gmm object returned gmm::gmm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) gmm object — glance.gmm","text":"tibble::tibble() exactly one row columns: df Degrees freedom used model. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) gmm object — glance.gmm","text":"","code":"# load libraries for models and data library(gmm) # examples come from the \"gmm\" package # CAPM test with GMM data(Finance) r <- Finance[1:300, 1:10] rm <- Finance[1:300, \"rm\"] rf <- Finance[1:300, \"rf\"] z <- as.matrix(r - rf) t <- nrow(z) zm <- rm - rf h <- matrix(zm, t, 1) res <- gmm(z ~ zm, x = h) # tidy result tidy(res) #> # A tibble: 20 × 5 #> term estimate std.error statistic p.value #> #> 1 WMK_(Intercept) -0.00467 0.0566 -0.0824 9.34e- 1 #> 2 UIS_(Intercept) 0.102 0.126 0.816 4.15e- 1 #> 3 ORB_(Intercept) 0.146 0.203 0.718 4.73e- 1 #> 4 MAT_(Intercept) 0.0359 0.110 0.326 7.45e- 1 #> 5 ABAX_(Intercept) 0.0917 0.288 0.318 7.50e- 1 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 #> 7 EMR_(Intercept) 0.0299 0.0552 0.542 5.88e- 1 #> 8 JCS_(Intercept) 0.117 0.155 0.756 4.50e- 1 #> 9 VOXX_(Intercept) 0.0209 0.182 0.115 9.09e- 1 #> 10 ZOOM_(Intercept) -0.219 0.202 -1.08 2.79e- 1 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 tidy(res, conf.int = TRUE) #> # A tibble: 20 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercep… -0.00467 0.0566 -0.0824 9.34e- 1 -0.116 0.106 #> 2 UIS_(Intercep… 0.102 0.126 0.816 4.15e- 1 -0.144 0.348 #> 3 ORB_(Intercep… 0.146 0.203 0.718 4.73e- 1 -0.252 0.544 #> 4 MAT_(Intercep… 0.0359 0.110 0.326 7.45e- 1 -0.180 0.252 #> 5 ABAX_(Interce… 0.0917 0.288 0.318 7.50e- 1 -0.473 0.656 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 -0.129 0.175 #> 7 EMR_(Intercep… 0.0299 0.0552 0.542 5.88e- 1 -0.0782 0.138 #> 8 JCS_(Intercep… 0.117 0.155 0.756 4.50e- 1 -0.186 0.420 #> 9 VOXX_(Interce… 0.0209 0.182 0.115 9.09e- 1 -0.335 0.377 #> 10 ZOOM_(Interce… -0.219 0.202 -1.08 2.79e- 1 -0.616 0.177 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 0.0708 0.564 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 0.812 1.71 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 0.654 2.33 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 0.588 1.44 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 -0.0451 2.22 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 0.547 1.15 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 0.545 0.936 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 0.277 1.64 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 0.758 2.21 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 1.45 2.71 tidy(res, conf.int = TRUE, conf.level = .99) #> # A tibble: 20 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercep… -0.00467 0.0566 -0.0824 9.34e- 1 -0.151 0.141 #> 2 UIS_(Intercep… 0.102 0.126 0.816 4.15e- 1 -0.221 0.426 #> 3 ORB_(Intercep… 0.146 0.203 0.718 4.73e- 1 -0.377 0.669 #> 4 MAT_(Intercep… 0.0359 0.110 0.326 7.45e- 1 -0.248 0.320 #> 5 ABAX_(Interce… 0.0917 0.288 0.318 7.50e- 1 -0.650 0.834 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 -0.176 0.223 #> 7 EMR_(Intercep… 0.0299 0.0552 0.542 5.88e- 1 -0.112 0.172 #> 8 JCS_(Intercep… 0.117 0.155 0.756 4.50e- 1 -0.281 0.515 #> 9 VOXX_(Interce… 0.0209 0.182 0.115 9.09e- 1 -0.447 0.489 #> 10 ZOOM_(Interce… -0.219 0.202 -1.08 2.79e- 1 -0.740 0.302 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 -0.00656 0.641 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 0.671 1.85 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 0.391 2.60 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 0.454 1.58 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 -0.401 2.58 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 0.453 1.25 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 0.484 0.998 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 0.0627 1.85 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 0.530 2.43 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 1.25 2.91 # coefficient plot library(ggplot2) library(dplyr) tidy(res, conf.int = TRUE) %>% mutate(variable = reorder(term, estimate)) %>% ggplot(aes(estimate, variable)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_vline(xintercept = 0, color = \"red\", lty = 2) # from a function instead of a matrix g <- function(theta, x) { e <- x[, 2:11] - theta[1] - (x[, 1] - theta[1]) %*% matrix(theta[2:11], 1, 10) gmat <- cbind(e, e * c(x[, 1])) return(gmat) } x <- as.matrix(cbind(rm, r)) res_black <- gmm(g, x = x, t0 = rep(0, 11)) tidy(res_black) #> # A tibble: 11 × 5 #> term estimate std.error statistic p.value #> #> 1 Theta[1] 0.516 0.172 3.00 2.72e- 3 #> 2 Theta[2] 1.12 0.116 9.65 5.02e-22 #> 3 Theta[3] 0.680 0.197 3.45 5.65e- 4 #> 4 Theta[4] -0.0322 0.424 -0.0761 9.39e- 1 #> 5 Theta[5] 0.850 0.155 5.49 4.05e- 8 #> 6 Theta[6] -0.205 0.479 -0.429 6.68e- 1 #> 7 Theta[7] 0.625 0.122 5.14 2.73e- 7 #> 8 Theta[8] 1.05 0.0687 15.3 5.03e-53 #> 9 Theta[9] 0.640 0.233 2.75 5.92e- 3 #> 10 Theta[10] 0.596 0.295 2.02 4.36e- 2 #> 11 Theta[11] 1.16 0.240 4.82 1.45e- 6 tidy(res_black, conf.int = TRUE) #> # A tibble: 11 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Theta[1] 0.516 0.172 3.00 2.72e- 3 0.178 0.853 #> 2 Theta[2] 1.12 0.116 9.65 5.02e-22 0.889 1.34 #> 3 Theta[3] 0.680 0.197 3.45 5.65e- 4 0.293 1.07 #> 4 Theta[4] -0.0322 0.424 -0.0761 9.39e- 1 -0.862 0.798 #> 5 Theta[5] 0.850 0.155 5.49 4.05e- 8 0.546 1.15 #> 6 Theta[6] -0.205 0.479 -0.429 6.68e- 1 -1.14 0.733 #> 7 Theta[7] 0.625 0.122 5.14 2.73e- 7 0.387 0.864 #> 8 Theta[8] 1.05 0.0687 15.3 5.03e-53 0.919 1.19 #> 9 Theta[9] 0.640 0.233 2.75 5.92e- 3 0.184 1.10 #> 10 Theta[10] 0.596 0.295 2.02 4.36e- 2 0.0171 1.17 #> 11 Theta[11] 1.16 0.240 4.82 1.45e- 6 0.686 1.63 # APT test with Fama-French factors and GMM f1 <- zm f2 <- Finance[1:300, \"hml\"] - rf f3 <- Finance[1:300, \"smb\"] - rf h <- cbind(f1, f2, f3) res2 <- gmm(z ~ f1 + f2 + f3, x = h) td2 <- tidy(res2, conf.int = TRUE) td2 #> # A tibble: 40 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercept) -0.0240 0.0548 -0.438 0.662 -0.131 0.0834 #> 2 UIS_(Intercept) 0.0723 0.127 0.567 0.570 -0.177 0.322 #> 3 ORB_(Intercept) 0.114 0.212 0.534 0.593 -0.303 0.530 #> 4 MAT_(Intercept) 0.0694 0.0979 0.709 0.478 -0.122 0.261 #> 5 ABAX_(Intercep… 0.0668 0.275 0.242 0.808 -0.473 0.606 #> 6 T_(Intercept) 0.0195 0.0745 0.262 0.793 -0.126 0.165 #> 7 EMR_(Intercept) 0.0217 0.0538 0.404 0.687 -0.0837 0.127 #> 8 JCS_(Intercept) 0.0904 0.154 0.586 0.558 -0.212 0.393 #> 9 VOXX_(Intercep… -0.00706 0.179 -0.0394 0.969 -0.359 0.344 #> 10 ZOOM_(Intercep… -0.189 0.215 -0.878 0.380 -0.610 0.233 #> # ℹ 30 more rows # coefficient plot td2 %>% mutate(variable = reorder(term, estimate)) %>% ggplot(aes(estimate, variable)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_vline(xintercept = 0, color = \"red\", lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) ivreg object — glance.ivreg","title":"Glance at a(n) ivreg object — glance.ivreg","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) ivreg object — glance.ivreg","text":"","code":"# S3 method for class 'ivreg' glance(x, diagnostics = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) ivreg object — glance.ivreg","text":"x ivreg object created call AER::ivreg(). diagnostics Logical indicating whether return Wu-Hausman Sargan diagnostic information. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) ivreg object — glance.ivreg","text":"tidier currently supports ivreg-classed objects outputted AER package. ivreg package also outputs objects class ivreg, supported later release.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) ivreg object — glance.ivreg","text":"Beginning 0.7.0, glance.ivreg returns statistics Wu-Hausman test endogeneity Sargan test overidentifying restrictions. Sargan test values returned NA number instruments greater number endogenous regressors.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) ivreg object — glance.ivreg","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. df Degrees freedom used model. df.residual Residual degrees freedom. nobs Number observations used. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Wald test statistic. p.value P-value Wald test.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) ivreg object — glance.ivreg","text":"","code":"# load libraries for models and data library(AER) # load data data(\"CigarettesSW\", package = \"AER\") # fit model ivr <- ivreg( log(packs) ~ income | population, data = CigarettesSW, subset = year == \"1995\" ) # summarize model fit with tidiers tidy(ivr) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 tidy(ivr, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 4.52e+0 4.70e+ 0 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 -1.03e-9 -1.13e-10 tidy(ivr, conf.int = TRUE, instruments = TRUE) #> # A tibble: 1 × 5 #> term num.df den.df statistic p.value #> #> 1 income 1 46 3329. 1.46e-44 augment(ivr) #> # A tibble: 48 × 6 #> .rownames `log(packs)` income population .fitted .resid #> #> 1 49 4.62 83903280 4262731 4.56 0.0522 #> 2 50 4.71 45995496 2480121 4.59 0.124 #> 3 51 4.28 88870496 4306908 4.56 -0.285 #> 4 52 4.04 771470144 31493524 4.17 -0.131 #> 5 53 4.41 92946544 3738061 4.56 -0.145 #> 6 54 4.38 104315120 3265293 4.55 -0.177 #> 7 55 4.82 18237436 718265 4.60 0.223 #> 8 56 4.53 333525344 14185403 4.42 0.112 #> 9 57 4.58 159800448 7188538 4.52 0.0591 #> 10 58 4.53 60170928 2840860 4.58 -0.0512 #> # ℹ 38 more rows augment(ivr, data = CigarettesSW) #> # A tibble: 96 × 11 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.56 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.59 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.56 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.17 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.56 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.55 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.60 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.42 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.52 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.58 #> # ℹ 86 more rows #> # ℹ 1 more variable: .resid augment(ivr, newdata = CigarettesSW) #> # A tibble: 96 × 10 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.59 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.60 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.59 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.36 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.58 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.58 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.61 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.52 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.57 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.59 #> # ℹ 86 more rows glance(ivr) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.131 0.112 0.229 5.98 0.0184 2 46 48"},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) kmeans object — glance.kmeans","title":"Glance at a(n) kmeans object — glance.kmeans","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) kmeans object — glance.kmeans","text":"","code":"# S3 method for class 'kmeans' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) kmeans object — glance.kmeans","text":"x kmeans object created stats::kmeans(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) kmeans object — glance.kmeans","text":"tibble::tibble() exactly one row columns: betweenss total -cluster sum squares. iter Iterations algorithm/fitting procedure completed. tot.withinss total within-cluster sum squares. totss total sum squares.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) kmeans object — glance.kmeans","text":"","code":"library(cluster) library(modeldata) library(dplyr) data(hpc_data) x <- hpc_data[, 2:5] fit <- pam(x, k = 4) tidy(fit) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(fit) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(fit, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lavaan object — glance.lavaan","title":"Glance at a(n) lavaan object — glance.lavaan","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lavaan object — glance.lavaan","text":"","code":"# S3 method for class 'lavaan' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lavaan object — glance.lavaan","text":"x lavaan object, returned lavaan::cfa(), lavaan::sem(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lavaan object — glance.lavaan","text":"one-row tibble::tibble columns: chisq Model chi squared npar Number parameters model rmsea Root mean square error approximation rmsea.conf.high 95 percent upper bound RMSEA srmr Standardised root mean residual agfi Adjusted goodness fit cfi Comparative fit index tli Tucker Lewis index AIC Akaike information criterion BIC Bayesian information criterion ngroups Number groups model nobs Number observations included norig Number observation original dataset nexcluded Number excluded observations converged Logical - model converge estimator Estimator used missing_method Method eliminating missing data recommendations reporting SEM CFA models see Schreiber, J. B. (2017). Update core reporting practices structural equation modeling. Research Social Administrative Pharmacy, 13(3), 634-643. https://doi.org/10.1016/j.sapharm.2016.06.006","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lavaan object — glance.lavaan","text":"","code":"library(lavaan) #> This is lavaan 0.6-19 #> lavaan is FREE software! Please report any bugs. # fit model cfa.fit <- cfa( \"F =~ x1 + x2 + x3 + x4 + x5\", data = HolzingerSwineford1939, group = \"school\" ) # summarize model fit with tidiers glance(cfa.fit) #> # A tibble: 1 × 17 #> agfi AIC BIC cfi chisq npar rmsea rmsea.conf.high srmr tli #> #> 1 0.971 4473. 4584. 0.766 99.3 30 0.244 0.288 0.115 0.533 #> # ℹ 7 more variables: converged , estimator , ngroups , #> # missing_method , nobs , norig , nexcluded "},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lm object — glance.lm","title":"Glance at a(n) lm object — glance.lm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lm object — glance.lm","text":"","code":"# S3 method for class 'lm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lm object — glance.lm","text":"x lm object created stats::lm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lm object — glance.lm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic. df degrees freedom numerator overall F-statistic. new broom 0.7.0. Previously, reported rank design matrix, one numerator degrees freedom overall F-statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lm object — glance.lm","text":"","code":"library(ggplot2) library(dplyr) mod <- lm(mpg ~ wt + qsec, data = mtcars) tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # coefficient plot d <- tidy(mod, conf.int = TRUE) ggplot(d, aes(estimate, term, xmin = conf.low, xmax = conf.high, height = 0)) + geom_point() + geom_vline(xintercept = 0, lty = 4) + geom_errorbarh() # aside: There are tidy() and glance() methods for lm.summary objects too. # this can be useful when you want to conserve memory by converting large lm # objects into their leaner summary.lm equivalents. s <- summary(mod) tidy(s, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(s) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32 augment(mod) #> # A tibble: 32 × 10 #> .rownames mpg wt qsec .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 0.0693 2.64 2.63e-3 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 0.0444 2.64 5.59e-6 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 0.0607 2.60 2.17e-2 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 0.0576 2.64 1.05e-4 #> 5 Hornet Sportab… 18.7 3.44 17.0 18.2 0.504 0.0389 2.64 5.29e-4 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 0.0957 2.58 5.10e-2 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 0.0729 2.61 1.93e-2 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 0.0791 2.61 2.18e-2 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 0.295 2.59 1.59e-1 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 0.0358 2.64 6.55e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid augment(mod, mtcars, interval = \"confidence\") #> # A tibble: 32 × 20 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 9 more variables: carb , .fitted , .lower , #> # .upper , .resid , .hat , .sigma , .cooksd , #> # .std.resid # predict on new data newdata <- mtcars %>% head(6) %>% mutate(wt = wt + 1) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid # ggplot2 example where we also construct 95% prediction interval # simpler bivariate model since we're plotting in 2D mod2 <- lm(mpg ~ wt, data = mtcars) au <- augment(mod2, newdata = newdata, interval = \"prediction\") ggplot(au, aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) + geom_ribbon(aes(ymin = .lower, ymax = .upper), col = NA, alpha = 0.3) # predict on new data without outcome variable. Output does not include .resid newdata <- newdata %>% select(-mpg) augment(mod, newdata = newdata) #> # A tibble: 6 × 12 #> .rownames cyl disp hp drat wt qsec vs am gear carb #> #> 1 Mazda RX4 6 160 110 3.9 3.62 16.5 0 1 4 4 #> 2 Mazda RX4 W… 6 160 110 3.9 3.88 17.0 0 1 4 4 #> 3 Datsun 710 4 108 93 3.85 3.32 18.6 1 1 4 1 #> 4 Hornet 4 Dr… 6 258 110 3.08 4.22 19.4 1 0 3 1 #> 5 Hornet Spor… 8 360 175 3.15 4.44 17.0 0 0 3 2 #> 6 Valiant 6 225 105 2.76 4.46 20.2 1 0 3 1 #> # ℹ 1 more variable: .fitted au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + geom_vline(size = 2, colour = \"white\", xintercept = 0) + geom_hline(size = 2, colour = \"white\", yintercept = 0) + geom_point() + geom_smooth(se = FALSE) #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' plot(mod, which = 6) ggplot(au, aes(.hat, .cooksd)) + geom_vline(xintercept = 0, colour = NA) + geom_abline(slope = seq(0, 3, by = 0.5), colour = \"white\") + geom_smooth(se = FALSE) + geom_point() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # column-wise models a <- matrix(rnorm(20), nrow = 10) b <- a + rnorm(length(a)) result <- lm(b ~ a) tidy(result) #> # A tibble: 6 × 6 #> response term estimate std.error statistic p.value #> #> 1 Y1 (Intercept) 0.591 0.359 1.64 0.144 #> 2 Y1 a1 0.971 0.284 3.42 0.0111 #> 3 Y1 a2 -0.0905 0.414 -0.219 0.833 #> 4 Y2 (Intercept) 0.0105 0.350 0.0299 0.977 #> 5 Y2 a1 0.00789 0.277 0.0285 0.978 #> 6 Y2 a2 1.90 0.403 4.72 0.00216"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lmRob object — glance.lmRob","title":"Glance at a(n) lmRob object — glance.lmRob","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lmRob object — glance.lmRob","text":"","code":"# S3 method for class 'lmRob' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lmRob object — glance.lmRob","text":"x lmRob object returned robust::lmRob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lmRob object — glance.lmRob","text":"tibble::tibble() exactly one row columns: deviance Deviance model. df.residual Residual degrees freedom. nobs Number observations used. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lmRob object — glance.lmRob","text":"","code":"# load modeling library library(robust) # fit model m <- lmRob(mpg ~ wt, data = mtcars) # summarize model fit with tidiers tidy(m) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 35.6 3.58 9.93 5.37e-11 #> 2 wt -4.91 1.09 -4.49 9.67e- 5 augment(m) #> # A tibble: 32 × 4 #> .rownames mpg wt .fitted #> #> 1 Mazda RX4 21 2.62 22.7 #> 2 Mazda RX4 Wag 21 2.88 21.4 #> 3 Datsun 710 22.8 2.32 24.2 #> 4 Hornet 4 Drive 21.4 3.22 19.8 #> 5 Hornet Sportabout 18.7 3.44 18.7 #> 6 Valiant 18.1 3.46 18.6 #> 7 Duster 360 14.3 3.57 18.0 #> 8 Merc 240D 24.4 3.19 19.9 #> 9 Merc 230 22.8 3.15 20.1 #> 10 Merc 280 19.2 3.44 18.7 #> # ℹ 22 more rows glance(m) #> # A tibble: 1 × 5 #> r.squared deviance sigma df.residual nobs #> #> 1 0.567 136. 2.95 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lmodel2 object — glance.lmodel2","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"","code":"# S3 method for class 'lmodel2' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"x lmodel2 object returned lmodel2::lmodel2(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"tibble::tibble() exactly one row columns: nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. theta Angle OLS lines `lm(y ~ x)` `lm(x ~ y)` H H statistic computing confidence interval major axis slope","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"","code":"# load libraries for models and data library(lmodel2) data(mod2ex2) Ex2.res <- lmodel2(Prey ~ Predators, data = mod2ex2, \"relative\", \"relative\", 99) Ex2.res #> #> Model II regression #> #> Call: lmodel2(formula = Prey ~ Predators, data = mod2ex2, range.y #> = \"relative\", range.x = \"relative\", nperm = 99) #> #> n = 20 r = 0.8600787 r-square = 0.7397354 #> Parametric P-values: 2-tailed = 1.161748e-06 1-tailed = 5.808741e-07 #> Angle between the two OLS regression lines = 5.106227 degrees #> #> Permutation tests of OLS, MA, RMA slopes: 1-tailed, tail corresponding to sign #> A permutation test of r is equivalent to a permutation test of the OLS slope #> P-perm for SMA = NA because the SMA slope cannot be tested #> #> Regression results #> Method Intercept Slope Angle (degrees) P-perm (1-tailed) #> 1 OLS 20.02675 2.631527 69.19283 0.01 #> 2 MA 13.05968 3.465907 73.90584 0.01 #> 3 SMA 16.45205 3.059635 71.90073 NA #> 4 RMA 17.25651 2.963292 71.35239 0.01 #> #> Confidence intervals #> Method 2.5%-Intercept 97.5%-Intercept 2.5%-Slope 97.5%-Slope #> 1 OLS 12.490993 27.56251 1.858578 3.404476 #> 2 MA 1.347422 19.76310 2.663101 4.868572 #> 3 SMA 9.195287 22.10353 2.382810 3.928708 #> 4 RMA 8.962997 23.84493 2.174260 3.956527 #> #> Eigenvalues: 269.8212 6.418234 #> #> H statistic used for computing C.I. of MA: 0.006120651 #> # summarize model fit with tidiers + visualization tidy(Ex2.res) #> # A tibble: 8 × 6 #> method term estimate conf.low conf.high p.value #> #> 1 MA Intercept 13.1 1.35 19.8 0.01 #> 2 MA Slope 3.47 2.66 4.87 0.01 #> 3 OLS Intercept 20.0 12.5 27.6 0.01 #> 4 OLS Slope 2.63 1.86 3.40 0.01 #> 5 RMA Intercept 17.3 8.96 23.8 0.01 #> 6 RMA Slope 2.96 2.17 3.96 0.01 #> 7 SMA Intercept 16.5 9.20 22.1 NA #> 8 SMA Slope 3.06 2.38 3.93 NA glance(Ex2.res) #> # A tibble: 1 × 5 #> r.squared theta p.value H nobs #> #> 1 0.740 5.11 0.00000116 0.00612 20 # this allows coefficient plots with ggplot2 library(ggplot2) ggplot(tidy(Ex2.res), aes(estimate, term, color = method)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))"},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) margins object — glance.margins","title":"Glance at a(n) margins object — glance.margins","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) margins object — glance.margins","text":"","code":"# S3 method for class 'margins' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) margins object — glance.margins","text":"x margins object returned margins::margins(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) margins object — glance.margins","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. df Degrees freedom used model. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) margins object — glance.margins","text":"","code":"# load libraries for models and data library(margins) # example 1: logit model mod_log <- glm(am ~ cyl + hp + wt, data = mtcars, family = binomial) # get tidied \"naive\" model coefficients tidy(mod_log) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 #> 2 cyl 0.488 1.07 0.455 0.649 #> 3 hp 0.0326 0.0189 1.73 0.0840 #> 4 wt -9.15 4.15 -2.20 0.0276 # convert to marginal effects with margins() marg_log <- margins(mod_log) # get tidied marginal effects tidy(marg_log) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 cyl 0.0215 0.0470 0.457 0.648 #> 2 hp 0.00143 0.000618 2.32 0.0204 #> 3 wt -0.403 0.115 -3.49 0.000487 tidy(marg_log, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl 0.0215 0.0470 0.457 0.648 -0.0706 0.114 #> 2 hp 0.00143 0.000618 2.32 0.0204 0.000222 0.00265 #> 3 wt -0.403 0.115 -3.49 0.000487 -0.629 -0.176 # requires running the underlying model again. quick for this example glance(marg_log) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # augmenting `margins` outputs isn't supported, but # you can get the same info by running on the underlying model augment(mod_log) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid # example 2: threeway interaction terms mod_ie <- lm(mpg ~ wt * cyl * disp, data = mtcars) # get tidied \"naive\" model coefficients tidy(mod_ie) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 108. 23.3 4.62 0.000109 #> 2 wt -24.8 8.47 -2.92 0.00744 #> 3 cyl -10.8 4.34 -2.49 0.0201 #> 4 disp -0.593 0.213 -2.79 0.0102 #> 5 wt:cyl 2.91 1.42 2.05 0.0514 #> 6 wt:disp 0.184 0.0685 2.69 0.0127 #> 7 cyl:disp 0.0752 0.0268 2.81 0.00979 #> 8 wt:cyl:disp -0.0233 0.00861 -2.71 0.0123 # convert to marginal effects with margins() marg_ie0 <- margins(mod_ie) # get tidied marginal effects tidy(marg_ie0) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 cyl -3.85 1.46 -2.65 0.00812 #> 2 disp -0.0295 0.0174 -1.70 0.0900 #> 3 wt -2.01 1.17 -1.72 0.0860 glance(marg_ie0) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.896 0.865 2.21 29.4 2.75e-10 7 -66.2 150. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # marginal effects evaluated at specific values of a variable (here: cyl) marg_ie1 <- margins(mod_ie, at = list(cyl = c(4,6,8))) # summarize model fit with tidiers tidy(marg_ie1) #> # A tibble: 9 × 7 #> term at.variable at.value estimate std.error statistic p.value #> #> 1 cyl cyl 4 -3.85 1.46 -2.65 0.00808 #> 2 cyl cyl 6 -3.85 1.46 -2.65 0.00814 #> 3 cyl cyl 8 -3.85 1.46 -2.65 0.00812 #> 4 disp cyl 4 0.000978 0.0314 0.0312 0.975 #> 5 disp cyl 6 0.00134 0.0182 0.0737 0.941 #> 6 disp cyl 8 0.00170 0.0120 0.141 0.888 #> 7 wt cyl 4 7.91 5.06 1.56 0.118 #> 8 wt cyl 6 2.96 2.52 1.18 0.239 #> 9 wt cyl 8 -1.98 2.40 -0.825 0.409 # marginal effects of one interaction variable (here: wt), modulated at # specific values of the two other interaction variables (here: cyl and drat) marg_ie2 <- margins(mod_ie, variables = \"wt\", at = list(cyl = c(4,6,8), drat = c(3, 3.5, 4))) # summarize model fit with tidiers tidy(marg_ie2) #> # A tibble: 18 × 7 #> term at.variable at.value estimate std.error statistic p.value #> #> 1 wt cyl 4 7.91 5.06 1.56 0.118 #> 2 wt drat 3 7.91 5.06 1.56 0.118 #> 3 wt cyl 4 7.91 5.06 1.56 0.118 #> 4 wt drat 3.5 7.91 5.06 1.56 0.118 #> 5 wt cyl 4 7.91 5.06 1.56 0.118 #> 6 wt drat 4 7.91 5.06 1.56 0.118 #> 7 wt cyl 6 2.96 2.52 1.18 0.239 #> 8 wt drat 3 2.96 2.52 1.18 0.239 #> 9 wt cyl 6 2.96 2.52 1.18 0.239 #> 10 wt drat 3.5 2.96 2.52 1.18 0.239 #> 11 wt cyl 6 2.96 2.52 1.18 0.239 #> 12 wt drat 4 2.96 2.52 1.18 0.239 #> 13 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 14 wt drat 3 -1.98 2.40 -0.825 0.409 #> 15 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 16 wt drat 3.5 -1.98 2.40 -0.825 0.409 #> 17 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 18 wt drat 4 -1.98 2.40 -0.825 0.409"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) mfx object — glance.mfx","title":"Glance at a(n) mfx object — glance.mfx","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) mfx object — glance.mfx","text":"","code":"# S3 method for class 'mfx' glance(x, ...) # S3 method for class 'logitmfx' glance(x, ...) # S3 method for class 'negbinmfx' glance(x, ...) # S3 method for class 'poissonmfx' glance(x, ...) # S3 method for class 'probitmfx' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) mfx object — glance.mfx","text":"x logitmfx, negbinmfx, poissonmfx, probitmfx object. (Note betamfx objects receive set tidiers.) ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) mfx object — glance.mfx","text":"generic glance method wraps glance.glm() applicable objects mfx package.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) mfx object — glance.mfx","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) mfx object — glance.mfx","text":"","code":"# load libraries for models and data library(mfx) # get the marginal effects from a logit regression mod_logmfx <- logitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) tidy(mod_logmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0538 0.113 0.475 0.635 -0.178 0.286 #> 2 hp TRUE 0.00359 0.00290 1.24 0.216 -0.00236 0.00954 #> 3 wt TRUE -1.01 0.668 -1.51 0.131 -2.38 0.359 # compare with the naive model coefficients of the same logit call tidy( glm(am ~ cyl + hp + wt, family = binomial, data = mtcars), conf.int = TRUE ) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 8.56 44.3 #> 2 cyl 0.488 1.07 0.455 0.649 -1.53 3.12 #> 3 hp 0.0326 0.0189 1.73 0.0840 0.00332 0.0884 #> 4 wt -9.15 4.15 -2.20 0.0276 -21.4 -3.48 augment(mod_logmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_logmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # another example, this time using probit regression mod_probmfx <- probitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred tidy(mod_probmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0616 0.112 0.548 0.583 -0.169 0.292 #> 2 hp TRUE 0.00383 0.00282 1.36 0.174 -0.00194 0.00960 #> 3 wt TRUE -1.06 0.594 -1.78 0.0753 -2.27 0.160 augment(mod_probmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 1.21 0.490 0.308 0.585 2.05e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.129 1.27 0.249 0.526 1.36e-1 #> 3 Datsun 7… 1 4 93 2.32 1.85 0.256 0.134 0.594 1.48e-3 #> 4 Hornet 4… 0 6 110 3.22 -1.92 -0.237 0.116 0.594 1.05e-3 #> 5 Hornet S… 0 8 175 3.44 -1.25 -0.474 0.236 0.587 1.20e-2 #> 6 Valiant 0 6 105 3.46 -3.30 -0.0312 0.0111 0.596 1.39e-6 #> 7 Duster 3… 0 8 245 3.57 -0.595 -0.804 0.285 0.567 5.32e-2 #> 8 Merc 240D 0 4 62 3.19 -3.31 -0.0304 0.0179 0.596 2.15e-6 #> 9 Merc 230 0 4 95 3.15 -2.47 -0.116 0.130 0.596 2.89e-4 #> 10 Merc 280 0 6 123 3.44 -2.85 -0.0662 0.0315 0.596 1.84e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_probmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.80 17.6 23.5 9.59 28 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) mjoint object — glance.mjoint","title":"Glance at a(n) mjoint object — glance.mjoint","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) mjoint object — glance.mjoint","text":"","code":"# S3 method for class 'mjoint' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) mjoint object — glance.mjoint","text":"x mjoint object returned joineRML::mjoint(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) mjoint object — glance.mjoint","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. sigma2_j square root estimated residual variance j-th longitudinal process","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) mjoint object — glance.mjoint","text":"","code":"# broom only skips running these examples because the example models take a # while to generate—they should run just fine, though! if (FALSE) { # \\dontrun{ # load libraries for models and data library(joineRML) # fit a joint model with bivariate longitudinal outcomes data(heart.valve) hvd <- heart.valve[!is.na(heart.valve$log.grad) & !is.na(heart.valve$log.lvmi) & heart.valve$num <= 50, ] fit <- mjoint( formLongFixed = list( \"grad\" = log.grad ~ time + sex + hs, \"lvmi\" = log.lvmi ~ time + sex ), formLongRandom = list( \"grad\" = ~ 1 | num, \"lvmi\" = ~ time | num ), formSurv = Surv(fuyrs, status) ~ age, data = hvd, inits = list(\"gamma\" = c(0.11, 1.51, 0.80)), timeVar = \"time\" ) # extract the survival fixed effects tidy(fit) # extract the longitudinal fixed effects tidy(fit, component = \"longitudinal\") # extract the survival fixed effects with confidence intervals tidy(fit, ci = TRUE) # extract the survival fixed effects with confidence intervals based # on bootstrapped standard errors bSE <- bootSE(fit, nboot = 5, safe.boot = TRUE) tidy(fit, boot_se = bSE, ci = TRUE) # augment original data with fitted longitudinal values and residuals hvd2 <- augment(fit) # extract model statistics glance(fit) } # }"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) mlogit object — glance.mlogit","title":"Glance at a(n) mlogit object — glance.mlogit","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) mlogit object — glance.mlogit","text":"","code":"# S3 method for class 'mlogit' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) mlogit object — glance.mlogit","text":"x object returned mlogit::mlogit(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) mlogit object — glance.mlogit","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. rho2 McFadden's rho squared respect market shares (constants-) model. rho20 McFadden's rho squared respect equal shares (information) model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) mlogit object — glance.mlogit","text":"","code":"# load libraries for models and data library(mlogit) data(\"Fishing\", package = \"mlogit\") Fish <- dfidx(Fishing, varying = 2:9, shape = \"wide\", choice = \"mode\") # fit model m <- mlogit(mode ~ price + catch | income, data = Fish) # summarize model fit with tidiers tidy(m) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept):boat 0.527 0.223 2.37 1.79e- 2 #> 2 (Intercept):charter 1.69 0.224 7.56 3.95e-14 #> 3 (Intercept):pier 0.778 0.220 3.53 4.18e- 4 #> 4 price -0.0251 0.00173 -14.5 0 #> 5 catch 0.358 0.110 3.26 1.12e- 3 #> 6 income:boat 0.0000894 0.0000501 1.79 7.40e- 2 #> 7 income:charter -0.0000333 0.0000503 -0.661 5.08e- 1 #> 8 income:pier -0.000128 0.0000506 -2.52 1.18e- 2 augment(m) #> # A tibble: 4,728 × 9 #> id alternative chosen price catch income .probability .fitted #> #> 1 1 beach FALSE 158. 0.0678 7083. 0.125 -3.94 #> 2 1 boat FALSE 158. 0.260 7083. 0.427 -2.71 #> 3 1 charter TRUE 183. 0.539 7083. 0.339 -2.94 #> 4 1 pier FALSE 158. 0.0503 7083. 0.109 -4.07 #> 5 2 beach FALSE 15.1 0.105 1250. 0.116 -0.342 #> 6 2 boat FALSE 10.5 0.157 1250. 0.251 0.431 #> 7 2 charter TRUE 34.5 0.467 1250. 0.423 0.952 #> 8 2 pier FALSE 15.1 0.0451 1250. 0.210 0.255 #> 9 3 beach FALSE 162. 0.533 3750. 0.00689 -3.87 #> 10 3 boat TRUE 24.3 0.241 3750. 0.465 0.338 #> # ℹ 4,718 more rows #> # ℹ 1 more variable: .resid glance(m) #> # A tibble: 1 × 6 #> logLik rho2 rho20 AIC BIC nobs #> #> 1 -1215. 0.189 0.258 2446. NA 1182"},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) muhaz object — glance.muhaz","title":"Glance at a(n) muhaz object — glance.muhaz","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) muhaz object — glance.muhaz","text":"","code":"# S3 method for class 'muhaz' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) muhaz object — glance.muhaz","text":"x muhaz object returned muhaz::muhaz(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) muhaz object — glance.muhaz","text":"tibble::tibble() exactly one row columns: max.hazard Maximal estimated hazard. max.time maximum observed event censoring time. min.hazard Minimal estimated hazard. min.time minimum observed event censoring time. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) muhaz object — glance.muhaz","text":"","code":"# load libraries for models and data library(muhaz) library(survival) # fit model x <- muhaz(ovarian$futime, ovarian$fustat) # summarize model fit with tidiers tidy(x) #> # A tibble: 101 × 2 #> time estimate #> #> 1 0 0.000255 #> 2 7.44 0.000274 #> 3 14.9 0.000293 #> 4 22.3 0.000312 #> 5 29.8 0.000332 #> 6 37.2 0.000352 #> 7 44.6 0.000372 #> 8 52.1 0.000392 #> 9 59.5 0.000411 #> 10 67.0 0.000431 #> # ℹ 91 more rows glance(x) #> # A tibble: 1 × 5 #> nobs min.time max.time min.hazard max.hazard #> #> 1 26 0 744 0.000212 0.00111"},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) multinom object — glance.multinom","title":"Glance at a(n) multinom object — glance.multinom","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) multinom object — glance.multinom","text":"","code":"# S3 method for class 'multinom' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) multinom object — glance.multinom","text":"x multinom object returned nnet::multinom(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) multinom object — glance.multinom","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. deviance Deviance model. edf effective degrees freedom. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) multinom object — glance.multinom","text":"","code":"# load libraries for models and data library(nnet) #> #> Attaching package: ‘nnet’ #> The following object is masked from ‘package:mgcv’: #> #> multinom library(MASS) example(birthwt) #> #> brthwt> bwt <- with(birthwt, { #> brthwt+ race <- factor(race, labels = c(\"white\", \"black\", \"other\")) #> brthwt+ ptd <- factor(ptl > 0) #> brthwt+ ftv <- factor(ftv) #> brthwt+ levels(ftv)[-(1:2)] <- \"2+\" #> brthwt+ data.frame(low = factor(low), age, lwt, race, smoke = (smoke > 0), #> brthwt+ ptd, ht = (ht > 0), ui = (ui > 0), ftv) #> brthwt+ }) #> #> brthwt> options(contrasts = c(\"contr.treatment\", \"contr.poly\")) #> #> brthwt> glm(low ~ ., binomial, bwt) #> #> Call: glm(formula = low ~ ., family = binomial, data = bwt) #> #> Coefficients: #> (Intercept) age lwt raceblack raceother #> 0.82302 -0.03723 -0.01565 1.19241 0.74068 #> smokeTRUE ptdTRUE htTRUE uiTRUE ftv1 #> 0.75553 1.34376 1.91317 0.68020 -0.43638 #> ftv2+ #> 0.17901 #> #> Degrees of Freedom: 188 Total (i.e. Null); 178 Residual #> Null Deviance:\t 234.7 #> Residual Deviance: 195.5 \tAIC: 217.5 bwt.mu <- multinom(low ~ ., bwt) #> # weights: 12 (11 variable) #> initial value 131.004817 #> iter 10 value 98.029803 #> final value 97.737759 #> converged tidy(bwt.mu) #> # A tibble: 11 × 6 #> y.level term estimate std.error statistic p.value #> #> 1 1 (Intercept) 0.823 1.24 0.661 0.508 #> 2 1 age -0.0372 0.0387 -0.962 0.336 #> 3 1 lwt -0.0157 0.00708 -2.21 0.0271 #> 4 1 raceblack 1.19 0.536 2.22 0.0261 #> 5 1 raceother 0.741 0.462 1.60 0.109 #> 6 1 smokeTRUE 0.756 0.425 1.78 0.0755 #> 7 1 ptdTRUE 1.34 0.481 2.80 0.00518 #> 8 1 htTRUE 1.91 0.721 2.65 0.00794 #> 9 1 uiTRUE 0.680 0.464 1.46 0.143 #> 10 1 ftv1 -0.436 0.479 -0.910 0.363 #> 11 1 ftv2+ 0.179 0.456 0.392 0.695 glance(bwt.mu) #> # A tibble: 1 × 4 #> edf deviance AIC nobs #> #> 1 11 195. 217. 189 # or, for output from a multinomial logistic regression fit.gear <- multinom(gear ~ mpg + factor(am), data = mtcars) #> # weights: 12 (6 variable) #> initial value 35.155593 #> iter 10 value 14.156582 #> iter 20 value 14.031881 #> iter 30 value 14.025659 #> iter 40 value 14.021414 #> iter 50 value 14.019824 #> iter 60 value 14.019278 #> iter 70 value 14.018601 #> iter 80 value 14.018282 #> iter 80 value 14.018282 #> iter 90 value 14.017126 #> final value 14.015374 #> converged tidy(fit.gear) #> # A tibble: 6 × 6 #> y.level term estimate std.error statistic p.value #> #> 1 4 (Intercept) -11.2 5.32 -2.10 3.60e- 2 #> 2 4 mpg 0.525 0.268 1.96 5.02e- 2 #> 3 4 factor(am)1 11.9 66.9 0.178 8.59e- 1 #> 4 5 (Intercept) -18.4 67.9 -0.271 7.87e- 1 #> 5 5 mpg 0.366 0.292 1.25 2.10e- 1 #> 6 5 factor(am)1 22.4 2.17 10.3 4.54e-25 glance(fit.gear) #> # A tibble: 1 × 4 #> edf deviance AIC nobs #> #> 1 6 28.0 40.0 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) negbin object — glance.negbin","title":"Glance at a(n) negbin object — glance.negbin","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) negbin object — glance.negbin","text":"","code":"# S3 method for class 'negbin' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) negbin object — glance.negbin","text":"x negbin object returned MASS::glm.nb(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) negbin object — glance.negbin","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) negbin object — glance.negbin","text":"","code":"# load libraries for models and data library(MASS) # fit model r <- glm.nb(Days ~ Sex / (Age + Eth * Lrn), data = quine) # summarize model fit with tidiers tidy(r) #> # A tibble: 14 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 3.02 0.297 10.2 2.89e-24 #> 2 SexM -0.475 0.396 -1.20 2.29e- 1 #> 3 SexF:AgeF1 -0.709 0.323 -2.19 2.83e- 2 #> 4 SexM:AgeF1 -0.724 0.330 -2.19 2.85e- 2 #> 5 SexF:AgeF2 -0.615 0.371 -1.66 9.78e- 2 #> 6 SexM:AgeF2 0.628 0.274 2.30 2.17e- 2 #> 7 SexF:AgeF3 -0.342 0.327 -1.05 2.95e- 1 #> 8 SexM:AgeF3 1.15 0.314 3.67 2.46e- 4 #> 9 SexF:EthN -0.0731 0.265 -0.276 7.83e- 1 #> 10 SexM:EthN -0.679 0.256 -2.65 8.07e- 3 #> 11 SexF:LrnSL 0.944 0.322 2.93 3.43e- 3 #> 12 SexM:LrnSL 0.239 0.336 0.712 4.76e- 1 #> 13 SexF:EthN:LrnSL -1.36 0.377 -3.60 3.16e- 4 #> 14 SexM:EthN:LrnSL 0.761 0.441 1.73 8.45e- 2 glance(r) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 235. 145 -531.5125 1093. 1138. 168. 132 146"},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) nlrq object — glance.nlrq","title":"Glance at a(n) nlrq object — glance.nlrq","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) nlrq object — glance.nlrq","text":"","code":"# S3 method for class 'nlrq' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) nlrq object — glance.nlrq","text":"x nlrq object returned quantreg::nlrq(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) nlrq object — glance.nlrq","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. tau Quantile.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) nlrq object — glance.nlrq","text":"","code":"# load modeling library library(quantreg) # build artificial data with multiplicative error set.seed(1) dat <- NULL dat$x <- rep(1:25, 20) dat$y <- SSlogis(dat$x, 10, 12, 2) * rnorm(500, 1, 0.1) # fit the median using nlrq mod <- nlrq(y ~ SSlogis(x, Asym, mid, scal), data = dat, tau = 0.5, trace = TRUE ) #> 109.059 : 9.968027 11.947208 1.962113 #> final value 108.942725 #> converged #> lambda = 1 #> 108.9427 : 9.958648 11.943273 1.967144 #> final value 108.490939 #> stopped after 2 iterations #> lambda = 0.9750984 #> 108.4909 : 9.949430 11.987472 1.998607 #> final value 108.471416 #> converged #> lambda = 0.9999299 #> 108.4714 : 9.94163 11.99077 1.99344 #> final value 108.471243 #> converged #> lambda = 1 #> 108.4712 : 9.941008 11.990550 1.992921 #> final value 108.470935 #> converged #> lambda = 0.8621249 #> 108.4709 : 9.942734 11.992773 1.993209 #> final value 108.470923 #> converged #> lambda = 0.9999613 #> 108.4709 : 9.942629 11.992728 1.993136 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Asym 9.94 0.0841 118. 0 #> 2 mid 12.0 0.0673 178. 0 #> 3 scal 1.99 0.0248 80.3 0 glance(mod) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -429.0842 864. 877. 497 augment(mod) #> # A tibble: 500 × 4 #> x y .fitted .resid #> #> 1 1 0.0382 0.0399 -0.00171 #> 2 2 0.0682 0.0657 0.00250 #> 3 3 0.101 0.108 -0.00728 #> 4 4 0.209 0.177 0.0315 #> 5 5 0.303 0.289 0.0137 #> 6 6 0.435 0.469 -0.0332 #> 7 7 0.796 0.751 0.0448 #> 8 8 1.28 1.18 0.0982 #> 9 9 1.93 1.81 0.118 #> 10 10 2.61 2.67 -0.0671 #> # ℹ 490 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) nls object — glance.nls","title":"Glance at a(n) nls object — glance.nls","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) nls object — glance.nls","text":"","code":"# S3 method for class 'nls' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) nls object — glance.nls","text":"x nls object returned stats::nls(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) nls object — glance.nls","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.residual Residual degrees freedom. finTol achieved convergence tolerance. isConv Whether fit successfully converged. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) nls object — glance.nls","text":"","code":"# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 k 49.7 3.79 13.1 5.96e-14 #> 2 e 0.746 0.0199 37.5 8.86e-27 augment(n) #> # A tibble: 32 × 4 #> mpg wt .fitted .resid #> #> 1 21 2.62 23.0 -2.01 #> 2 21 2.88 21.4 -0.352 #> 3 22.8 2.32 25.1 -2.33 #> 4 21.4 3.22 19.3 2.08 #> 5 18.7 3.44 18.1 0.611 #> 6 18.1 3.46 18.0 0.117 #> 7 14.3 3.57 17.4 -3.11 #> 8 24.4 3.19 19.5 4.93 #> 9 22.8 3.15 19.7 3.10 #> 10 19.2 3.44 18.1 1.11 #> # ℹ 22 more rows glance(n) #> # A tibble: 1 × 9 #> sigma isConv finTol logLik AIC BIC deviance df.residual nobs #> #> 1 2.67 TRUE 0.00000204 -75.8 158. 162. 214. 30 32 library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata) #> # A tibble: 6 × 13 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 2 more variables: carb , .fitted "},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) orcutt object — glance.orcutt","title":"Glance at a(n) orcutt object — glance.orcutt","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) orcutt object — glance.orcutt","text":"","code":"# S3 method for class 'orcutt' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) orcutt object — glance.orcutt","text":"x orcutt object returned orcutt::cochrane.orcutt(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) orcutt object — glance.orcutt","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. dw.original Durbin-Watson statistic original fit. dw.transformed Durbin-Watson statistic transformed fit. nobs Number observations used. number.interaction Number interactions. p.value.original P-value original Durbin-Watson statistic. p.value.transformed P-value autocorrelation transformation. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. rho Spearman's rho autocorrelation","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) orcutt object — glance.orcutt","text":"","code":"# load libraries for models and data library(orcutt) # fit model and summarize results reg <- lm(mpg ~ wt + qsec + disp, mtcars) tidy(reg) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.8 5.94 3.33 0.00244 #> 2 wt -5.03 1.22 -4.11 0.000310 #> 3 qsec 0.927 0.342 2.71 0.0114 #> 4 disp -0.000128 0.0106 -0.0121 0.990 co <- cochrane.orcutt(reg) tidy(co) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 21.8 6.63 3.29 0.00279 #> 2 wt -4.85 1.33 -3.65 0.00112 #> 3 qsec 0.797 0.370 2.15 0.0402 #> 4 disp -0.00136 0.0110 -0.123 0.903 glance(co) #> # A tibble: 1 × 9 #> r.squared adj.r.squared rho number.interaction dw.original #> #> 1 0.799 0.777 0.268 7 1.50 #> # ℹ 4 more variables: p.value.original , dw.transformed , #> # p.value.transformed , nobs "},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) pam object — glance.pam","title":"Glance at a(n) pam object — glance.pam","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) pam object — glance.pam","text":"","code":"# S3 method for class 'pam' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) pam object — glance.pam","text":"x pam object returned cluster::pam() ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) pam object — glance.pam","text":"tibble::tibble() exactly one row columns: avg.silhouette.width average silhouette width dataset.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) pam object — glance.pam","text":"","code":"# load libraries for models and data library(dplyr) library(ggplot2) library(cluster) library(modeldata) data(hpc_data) x <- hpc_data[, 2:5] p <- pam(x, k = 4) # summarize model fit with tidiers + visualization tidy(p) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(p) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(p, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows augment(p, x) %>% ggplot(aes(compounds, input_fields)) + geom_point(aes(color = .cluster)) + geom_text(aes(label = cluster), data = tidy(p), size = 10)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) plm object — glance.plm","title":"Glance at a(n) plm object — glance.plm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) plm object — glance.plm","text":"","code":"# S3 method for class 'plm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) plm object — glance.plm","text":"x plm objected returned plm::plm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) plm object — glance.plm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. deviance Deviance model. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. statistic F-statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) plm object — glance.plm","text":"","code":"# load libraries for models and data library(plm) # load data data(\"Produc\", package = \"plm\") # fit model zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, index = c(\"state\", \"year\") ) # summarize model fit with tidiers summary(zz) #> Oneway (individual) effect Within Model #> #> Call: #> plm(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, #> data = Produc, index = c(\"state\", \"year\")) #> #> Balanced Panel: n = 48, T = 17, N = 816 #> #> Residuals: #> Min. 1st Qu. Median 3rd Qu. Max. #> -0.120456 -0.023741 -0.002041 0.018144 0.174718 #> #> Coefficients: #> Estimate Std. Error t-value Pr(>|t|) #> log(pcap) -0.02614965 0.02900158 -0.9017 0.3675 #> log(pc) 0.29200693 0.02511967 11.6246 < 2.2e-16 *** #> log(emp) 0.76815947 0.03009174 25.5273 < 2.2e-16 *** #> unemp -0.00529774 0.00098873 -5.3582 1.114e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Total Sum of Squares: 18.941 #> Residual Sum of Squares: 1.1112 #> R-Squared: 0.94134 #> Adj. R-Squared: 0.93742 #> F-statistic: 3064.81 on 4 and 764 DF, p-value: < 2.22e-16 tidy(zz) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 tidy(zz, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0830 0.0307 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.243 0.341 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.709 0.827 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00724 -0.00336 tidy(zz, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0739 0.0216 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.251 0.333 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.719 0.818 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00692 -0.00367 augment(zz) #> # A tibble: 816 × 7 #> `log(gsp)` `log(pcap)` `log(pc)` `log(emp)` unemp .fitted .resid #> #> 1 10.25478 9.617981 10.48553 6.918201 4.7 10.3 -0.046561413 #> 2 10.28790 9.648720 10.52675 6.929419 5.2 10.3 -0.030640422 #> 3 10.35147 9.678618 10.56283 6.977561 4.7 10.4 -0.016454312 #> 4 10.41721 9.705418 10.59873 7.034828 3.9 10.4 -0.008726974 #> 5 10.42671 9.726910 10.64679 7.064588 5.5 10.5 -0.027084312 #> 6 10.42240 9.759401 10.69130 7.052202 7.7 10.4 -0.022368930 #> 7 10.48470 9.783175 10.82420 7.095893 6.8 10.5 -0.036587629 #> 8 10.53111 9.804326 10.84125 7.146142 7.4 10.6 -0.030020604 #> 9 10.59573 9.824430 10.87055 7.197810 6.3 10.6 -0.018942497 #> 10 10.62082 9.845937 10.90643 7.216709 7.1 10.6 -0.014057170 #> # ℹ 806 more rows glance(zz) #> # A tibble: 1 × 7 #> r.squared adj.r.squared statistic p.value deviance df.residual nobs #> #> 1 0.941 0.937 3065. 0 1.11 764 816"},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) poLCA object — glance.poLCA","title":"Glance at a(n) poLCA object — glance.poLCA","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) poLCA object — glance.poLCA","text":"","code":"# S3 method for class 'poLCA' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) poLCA object — glance.poLCA","text":"x poLCA object returned poLCA::poLCA(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) poLCA object — glance.poLCA","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. chi.squared Pearson Chi-Square goodness fit statistic multiway tables. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. g.squared likelihood ratio/deviance statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) poLCA object — glance.poLCA","text":"","code":"# load libraries for models and data library(poLCA) library(dplyr) # generate data data(values) f <- cbind(A, B, C, D) ~ 1 # fit model M1 <- poLCA(f, values, nclass = 2, verbose = FALSE) M1 #> Conditional item response (column) probabilities, #> by outcome variable, for each class (row) #> #> $A #> Pr(1) Pr(2) #> class 1: 0.2864 0.7136 #> class 2: 0.0068 0.9932 #> #> $B #> Pr(1) Pr(2) #> class 1: 0.6704 0.3296 #> class 2: 0.0602 0.9398 #> #> $C #> Pr(1) Pr(2) #> class 1: 0.6460 0.3540 #> class 2: 0.0735 0.9265 #> #> $D #> Pr(1) Pr(2) #> class 1: 0.8676 0.1324 #> class 2: 0.2309 0.7691 #> #> Estimated class population shares #> 0.7208 0.2792 #> #> Predicted class memberships (by modal posterior prob.) #> 0.6713 0.3287 #> #> ========================================================= #> Fit for 2 latent classes: #> ========================================================= #> number of observations: 216 #> number of estimated parameters: 9 #> residual degrees of freedom: 6 #> maximum log-likelihood: -504.4677 #> #> AIC(2): 1026.935 #> BIC(2): 1057.313 #> G^2(2): 2.719922 (Likelihood ratio/deviance statistic) #> X^2(2): 2.719764 (Chi-square goodness of fit) #> # summarize model fit with tidiers + visualization tidy(M1) #> # A tibble: 16 × 5 #> variable class outcome estimate std.error #> #> 1 A 1 1 0.286 0.0393 #> 2 A 2 1 0.00681 0.0254 #> 3 A 1 2 0.714 0.0393 #> 4 A 2 2 0.993 0.0254 #> 5 B 1 1 0.670 0.0489 #> 6 B 2 1 0.0602 0.0649 #> 7 B 1 2 0.330 0.0489 #> 8 B 2 2 0.940 0.0649 #> 9 C 1 1 0.646 0.0482 #> 10 C 2 1 0.0735 0.0642 #> 11 C 1 2 0.354 0.0482 #> 12 C 2 2 0.927 0.0642 #> 13 D 1 1 0.868 0.0379 #> 14 D 2 1 0.231 0.0929 #> 15 D 1 2 0.132 0.0379 #> 16 D 2 2 0.769 0.0929 augment(M1) #> # A tibble: 216 × 7 #> A B C D X.Intercept. .class .probability #> #> 1 2 2 2 2 1 2 0.959 #> 2 2 2 2 2 1 2 0.959 #> 3 2 2 2 2 1 2 0.959 #> 4 2 2 2 2 1 2 0.959 #> 5 2 2 2 2 1 2 0.959 #> 6 2 2 2 2 1 2 0.959 #> 7 2 2 2 2 1 2 0.959 #> 8 2 2 2 2 1 2 0.959 #> 9 2 2 2 2 1 2 0.959 #> 10 2 2 2 2 1 2 0.959 #> # ℹ 206 more rows glance(M1) #> # A tibble: 1 × 8 #> logLik AIC BIC g.squared chi.squared df df.residual nobs #> #> 1 -504. 1027. 1057. 2.72 2.72 9 6 216 library(ggplot2) ggplot(tidy(M1), aes(factor(class), estimate, fill = factor(outcome))) + geom_bar(stat = \"identity\", width = 1) + facet_wrap(~variable) # three-class model with a single covariate. data(election) f2a <- cbind( MORALG, CARESG, KNOWG, LEADG, DISHONG, INTELG, MORALB, CARESB, KNOWB, LEADB, DISHONB, INTELB ) ~ PARTY nes2a <- poLCA(f2a, election, nclass = 3, nrep = 5, verbose = FALSE) td <- tidy(nes2a) td #> # A tibble: 144 × 5 #> variable class outcome estimate std.error #> #> 1 MORALG 1 1 Extremely well 0.108 0.0175 #> 2 MORALG 2 1 Extremely well 0.137 0.0182 #> 3 MORALG 3 1 Extremely well 0.622 0.0309 #> 4 MORALG 1 2 Quite well 0.383 0.0274 #> 5 MORALG 2 2 Quite well 0.668 0.0247 #> 6 MORALG 3 2 Quite well 0.335 0.0293 #> 7 MORALG 1 3 Not too well 0.304 0.0253 #> 8 MORALG 2 3 Not too well 0.180 0.0208 #> 9 MORALG 3 3 Not too well 0.0172 0.00841 #> 10 MORALG 1 4 Not well at all 0.205 0.0243 #> # ℹ 134 more rows ggplot(td, aes(outcome, estimate, color = factor(class), group = class)) + geom_line() + facet_wrap(~variable, nrow = 2) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) au <- augment(nes2a) au #> # A tibble: 1,300 × 16 #> MORALG CARESG KNOWG LEADG DISHONG INTELG MORALB CARESB KNOWB LEADB #> #> 1 3 Not too … 1 Ext… 2 Qu… 2 Qu… 3 Not … 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 2 1 Extremel… 2 Qui… 2 Qu… 1 Ex… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 3 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 2 Quit… 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 4 2 Quite we… 4 Not… 2 Qu… 3 No… 2 Quit… 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 5 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 4 Not… 4 No… 4 No… #> 6 2 Quite we… 2 Qui… 2 Qu… 3 No… 4 Not … 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 7 1 Extremel… 1 Ext… 1 Ex… 1 Ex… 4 Not … 1 Ext… 2 Qui… 4 Not… 2 Qu… 3 No… #> 8 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 2 Qui… 2 Qu… 2 Qu… #> 9 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 10 2 Quite we… 3 Not… 2 Qu… 2 Qu… 3 Not … 2 Qui… 2 Qui… 4 Not… 2 Qu… 4 No… #> # ℹ 1,290 more rows #> # ℹ 6 more variables: DISHONB , INTELB , X.Intercept. , #> # PARTY , .class , .probability count(au, .class) #> # A tibble: 3 × 2 #> .class n #> #> 1 1 444 #> 2 2 496 #> 3 3 360 # if the original data is provided, it leads to NAs in new columns # for rows that weren't predicted au2 <- augment(nes2a, data = election) au2 #> # A tibble: 1,785 × 20 #> MORALG CARESG KNOWG LEADG DISHONG INTELG MORALB CARESB KNOWB LEADB #> #> 1 3 Not too … 1 Ext… 2 Qu… 2 Qu… 3 Not … 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 2 4 Not well… 3 Not… 4 No… 3 No… 2 Quit… 2 Qui… NA NA 2 Qu… 3 No… #> 3 1 Extremel… 2 Qui… 2 Qu… 1 Ex… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 4 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 2 Quit… 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 5 2 Quite we… 4 Not… 2 Qu… 3 No… 2 Quit… 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 6 2 Quite we… 3 Not… 3 No… 2 Qu… 2 Quit… 2 Qui… 2 Qui… NA 3 No… 2 Qu… #> 7 2 Quite we… NA 2 Qu… 2 Qu… 4 Not … 2 Qui… NA 3 Not… 2 Qu… 2 Qu… #> 8 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 4 Not… 4 No… 4 No… #> 9 2 Quite we… 2 Qui… 2 Qu… 3 No… 4 Not … 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 10 1 Extremel… 1 Ext… 1 Ex… 1 Ex… 4 Not … 1 Ext… 2 Qui… 4 Not… 2 Qu… 3 No… #> # ℹ 1,775 more rows #> # ℹ 10 more variables: DISHONB , INTELB , VOTE3 , #> # AGE , EDUC , GENDER , PARTY , .class , #> # .probability , .rownames dim(au2) #> [1] 1785 20"},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) polr object — glance.polr","title":"Glance at a(n) polr object — glance.polr","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) polr object — glance.polr","text":"","code":"# S3 method for class 'polr' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) polr object — glance.polr","text":"x polr object returned MASS::polr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) polr object — glance.polr","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.residual Residual degrees freedom. edf effective degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) polr object — glance.polr","text":"","code":"# load libraries for models and data library(MASS) # fit model fit <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) # summarize model fit with tidiers tidy(fit, exponentiate = TRUE, conf.int = TRUE) #> #> Re-fitting to get Hessian #> # A tibble: 8 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 InflMedium 1.76 0.105 5.41 1.44 2.16 coefficie… #> 2 InflHigh 3.63 0.127 10.1 2.83 4.66 coefficie… #> 3 TypeApartment 0.564 0.119 -4.80 0.446 0.712 coefficie… #> 4 TypeAtrium 0.693 0.155 -2.36 0.511 0.940 coefficie… #> 5 TypeTerrace 0.336 0.151 -7.20 0.249 0.451 coefficie… #> 6 ContHigh 1.43 0.0955 3.77 1.19 1.73 coefficie… #> 7 Low|Medium 0.609 0.125 -3.97 NA NA scale #> 8 Medium|High 2.00 0.125 5.50 NA NA scale glance(fit) #> # A tibble: 1 × 7 #> edf logLik AIC BIC deviance df.residual nobs #> #> 1 8 -1740. 3495. 3539. 3479. 1673 1681 augment(fit, type.predict = \"class\") #> # A tibble: 72 × 6 #> Sat Infl Type Cont `(weights)` .fitted #> #> 1 Low Low Tower Low 21 Low #> 2 Medium Low Tower Low 21 Low #> 3 High Low Tower Low 28 Low #> 4 Low Medium Tower Low 34 High #> 5 Medium Medium Tower Low 22 High #> 6 High Medium Tower Low 36 High #> 7 Low High Tower Low 10 High #> 8 Medium High Tower Low 11 High #> 9 High High Tower Low 36 High #> 10 Low Low Apartment Low 61 Low #> # ℹ 62 more rows fit2 <- polr(factor(gear) ~ am + mpg + qsec, data = mtcars) tidy(fit, p.values = TRUE) #> #> Re-fitting to get Hessian #> p-values can presently only be returned for models that contain no #> categorical variables with more than two levels. #> # A tibble: 8 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 InflMedium 0.566 0.105 5.41 NA coefficient #> 2 InflHigh 1.29 0.127 10.1 NA coefficient #> 3 TypeApartment -0.572 0.119 -4.80 NA coefficient #> 4 TypeAtrium -0.366 0.155 -2.36 NA coefficient #> 5 TypeTerrace -1.09 0.151 -7.20 NA coefficient #> 6 ContHigh 0.360 0.0955 3.77 NA coefficient #> 7 Low|Medium -0.496 0.125 -3.97 NA scale #> 8 Medium|High 0.691 0.125 5.50 NA scale"},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) pyears object — glance.pyears","title":"Glance at a(n) pyears object — glance.pyears","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) pyears object — glance.pyears","text":"","code":"# S3 method for class 'pyears' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) pyears object — glance.pyears","text":"x pyears object returned survival::pyears(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) pyears object — glance.pyears","text":"tibble::tibble() exactly one row columns: nobs Number observations used. total total number person-years tabulated offtable total number person-years table","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) pyears object — glance.pyears","text":"","code":"# load libraries for models and data library(survival) # generate and format data temp.yr <- tcut(mgus$dxyr, 55:92, labels = as.character(55:91)) temp.age <- tcut(mgus$age, 34:101, labels = as.character(34:100)) ptime <- ifelse(is.na(mgus$pctime), mgus$futime, mgus$pctime) pstat <- ifelse(is.na(mgus$pctime), 0, 1) pfit <- pyears(Surv(ptime / 365.25, pstat) ~ temp.yr + temp.age + sex, mgus, data.frame = TRUE ) # summarize model fit with tidiers tidy(pfit) #> # A tibble: 1,752 × 6 #> temp.yr temp.age sex pyears n event #> #> 1 71 34 female 0.00274 1 0 #> 2 68 35 female 0.00274 1 0 #> 3 72 35 female 0.00274 1 0 #> 4 69 36 female 0.00274 1 0 #> 5 73 36 female 0.00274 1 0 #> 6 69 37 female 0.00274 1 0 #> 7 70 37 female 0.00274 1 0 #> 8 74 37 female 0.00274 1 0 #> 9 70 38 female 0.00274 1 0 #> 10 71 38 female 0.00274 1 0 #> # ℹ 1,742 more rows glance(pfit) #> # A tibble: 1 × 3 #> total offtable nobs #> #> 1 8.32 0.727 241 # if data.frame argument is not given, different information is present in # output pfit2 <- pyears(Surv(ptime / 365.25, pstat) ~ temp.yr + temp.age + sex, mgus) tidy(pfit2) #> # A tibble: 37 × 402 #> pyears.34.female pyears.35.female pyears.36.female pyears.37.female #> #> 1 0 0 0 0 #> 2 0 0 0 0 #> 3 0 0 0 0 #> 4 0 0 0 0 #> 5 0 0 0 0 #> 6 0 0 0 0 #> 7 0 0 0 0 #> 8 0 0 0 0 #> 9 0 0 0 0 #> 10 0 0 0 0 #> # ℹ 27 more rows #> # ℹ 398 more variables: pyears.38.female , pyears.39.female , #> # pyears.40.female , pyears.41.female , #> # pyears.42.female , pyears.43.female , #> # pyears.44.female , pyears.45.female , #> # pyears.46.female , pyears.47.female , #> # pyears.48.female , pyears.49.female , … glance(pfit2) #> # A tibble: 1 × 3 #> total offtable nobs #> #> 1 8.32 0.727 241"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) ridgelm object — glance.ridgelm","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"","code":"# S3 method for class 'ridgelm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"x ridgelm object returned MASS::lm.ridge(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"similar output select.ridgelm, returned rather printed.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"tibble::tibble() exactly one row columns: kHKB modified HKB estimate ridge constant kLW modified L-W estimate ridge constant lambdaGCV choice lambda minimizes GCV","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"","code":"# load libraries for models and data library(MASS) names(longley)[1] <- \"y\" # fit model and summarizd results fit1 <- lm.ridge(y ~ ., longley) tidy(fit1) #> # A tibble: 6 × 5 #> lambda GCV term estimate scale #> #> 1 0 0.128 GNP 25.4 96.2 #> 2 0 0.128 Unemployed 3.30 90.5 #> 3 0 0.128 Armed.Forces 0.752 67.4 #> 4 0 0.128 Population -11.7 6.74 #> 5 0 0.128 Year -6.54 4.61 #> 6 0 0.128 Employed 0.786 3.40 fit2 <- lm.ridge(y ~ ., longley, lambda = seq(0.001, .05, .001)) td2 <- tidy(fit2) g2 <- glance(fit2) # coefficient plot library(ggplot2) ggplot(td2, aes(lambda, estimate, color = term)) + geom_line() # GCV plot ggplot(td2, aes(lambda, GCV)) + geom_line() # add line for the GCV minimizing estimate ggplot(td2, aes(lambda, GCV)) + geom_line() + geom_vline(xintercept = g2$lambdaGCV, col = \"red\", lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) rlm object — glance.rlm","title":"Glance at a(n) rlm object — glance.rlm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) rlm object — glance.rlm","text":"","code":"# S3 method for class 'rlm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) rlm object — glance.rlm","text":"x rlm object returned MASS::rlm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) rlm object — glance.rlm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. converged Logical indicating model fitting procedure succesful converged. deviance Deviance model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) rlm object — glance.rlm","text":"","code":"# load libraries for models and data library(MASS) # fit model r <- rlm(stack.loss ~ ., stackloss) # summarize model fit with tidiers tidy(r) #> # A tibble: 4 × 4 #> term estimate std.error statistic #> #> 1 (Intercept) -41.0 9.81 -4.18 #> 2 Air.Flow 0.829 0.111 7.46 #> 3 Water.Temp 0.926 0.303 3.05 #> 4 Acid.Conc. -0.128 0.129 -0.992 augment(r) #> # A tibble: 21 × 10 #> stack.loss Air.Flow Water.Temp Acid.Conc. .fitted .resid .hat .sigma #> #> 1 42 80 27 89 38.9 3.05 0.327 3.32 #> 2 37 80 27 88 39.1 -2.08 0.343 3.39 #> 3 37 75 25 90 32.8 4.18 0.155 3.26 #> 4 28 62 24 87 21.5 6.50 0.0713 3.01 #> 5 18 62 22 87 19.6 -1.65 0.0562 3.42 #> 6 18 62 23 87 20.6 -2.57 0.0835 3.38 #> 7 19 62 24 93 20.7 -1.73 0.230 3.42 #> 8 20 62 24 93 20.7 -0.731 0.230 3.44 #> 9 15 58 23 87 17.3 -2.25 0.155 3.40 #> 10 14 58 18 80 13.5 0.481 0.213 3.45 #> # ℹ 11 more rows #> # ℹ 2 more variables: .cooksd , .std.resid glance(r) #> # A tibble: 1 × 7 #> sigma converged logLik AIC BIC deviance nobs #> #> 1 2.44 TRUE -52.954 116. 121. 191. 21"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) rma object — glance.rma","title":"Glance at a(n) rma object — glance.rma","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) rma object — glance.rma","text":"","code":"# S3 method for class 'rma' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) rma object — glance.rma","text":"x rma object created metafor::rma(), metafor::rma.uni(), metafor::rma.glmm(), metafor::rma.mh(), metafor::rma.mv(), metafor::rma.peto(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) rma object — glance.rma","text":"tibble::tibble() exactly one row columns: cochran.qe meta-analysis, test statistic Cochran's Q_e test residual heterogeneity. cochran.qm meta-analysis, test statistic Cochran's Q_m omnibus test coefficients. df.residual Residual degrees freedom. h.squared Value H-Squared statistic. .squared Value -Squared statistic. measure measure used meta-analysis. method method used. nobs Number observations used. p.value.cochran.qe meta-analysis, p-value Cochran's Q_e test residual heterogeneity. p.value.cochran.qm meta-analysis, p-value Cochran's Q_m omnibus test coefficients. tau.squared meta-analysis, estimated amount residual heterogeneity. tau.squared.se meta-analysis, standard error residual heterogeneity.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) rma object — glance.rma","text":"","code":"library(metafor) df <- escalc( measure = \"RR\", ai = tpos, bi = tneg, ci = cpos, di = cneg, data = dat.bcg ) meta_analysis <- rma(yi, vi, data = df, method = \"EB\") glance(meta_analysis) #> # A tibble: 1 × 15 #> i.squared h.squared tau.squared tau.squared.se cochran.qe #> #> 1 92.3 13.0 0.318 0.174 152. #> # ℹ 10 more variables: p.value.cochran.qe , cochran.qm , #> # p.value.cochran.qm , df.residual , logLik , #> # deviance , AIC , BIC , AICc , nobs "},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lmrob object — glance.lmrob","title":"Glance at a(n) lmrob object — glance.lmrob","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lmrob object — glance.lmrob","text":"","code":"# S3 method for class 'lmrob' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lmrob object — glance.lmrob","text":"x lmrob object returned robustbase::lmrob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) lmrob object — glance.lmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lmrob object — glance.lmrob","text":"tibble::tibble() exactly one row columns: df.residual Residual degrees freedom. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lmrob object — glance.lmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) rq object — glance.rq","title":"Glance at a(n) rq object — glance.rq","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) rq object — glance.rq","text":"","code":"# S3 method for class 'rq' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) rq object — glance.rq","text":"x rq object returned quantreg::rq(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) rq object — glance.rq","text":"models single tau value may passed. multiple values, please use purrr::map() workflow instead, e.g.","code":"taus %>% map(function(tau_val) rq(y ~ x, tau = tau_val)) %>% map_dfr(glance)"},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) rq object — glance.rq","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. tau Quantile.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) rq object — glance.rq","text":"","code":"# load modeling library and data library(quantreg) data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.124 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -78.76986 160. 161. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 0.393 0.696 0.269 0.124 0.5 #> 2 0.458 0.266 0.334 0.124 0.5 #> 3 -1.22 0.660 -1.34 0.124 0.5 #> 4 -1.12 0.212 -1.25 0.124 0.5 #> 5 0.993 0.00527 0.869 0.124 0.5 #> 6 -1.83 0.103 -1.96 0.124 0.5 #> 7 0.124 0.287 0 0.124 0.5 #> 8 0.591 0.444 0.467 0.124 0.5 #> 9 0.805 0.693 0.681 0.124 0.5 #> 10 0.00754 0.0209 -0.116 0.124 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) spatialreg object — glance.sarlm","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"","code":"# S3 method for class 'sarlm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"x object returned spatialreg::lagsarlm() spatialreg::errorsarlm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"","code":"# load libraries for models and data library(spatialreg) library(spdep) # load data data(oldcol, package = \"spdep\") listw <- nb2listw(COL.nb, style = \"W\") # fit model crime_sar <- lagsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw = listw, method = \"eigen\" ) # summarize model fit with tidiers tidy(crime_sar) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 tidy(crime_sar, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 0.200 0.662 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 31.0 59.1 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 -1.63 -0.434 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 -0.439 -0.0925 glance(crime_sar) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 375. 384. 4679. -182. 49 augment(crime_sar) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.6 -3.84 #> 2 1 4.48 33.2 32.4 46.6 -14.2 #> 3 1 11.3 37.1 38.4 41.4 -2.97 #> 4 1 8.44 75 0.178 37.9 -37.7 #> 5 1 19.5 80.5 15.7 14.2 1.54 #> 6 1 16.0 26.4 30.6 34.3 -3.66 #> 7 1 11.3 23.2 50.7 44.7 5.99 #> 8 1 16.0 28.8 26.1 38.4 -12.3 #> 9 1 9.87 18 48.6 51.7 -3.12 #> 10 1 13.6 96.4 34.0 16.3 17.7 #> # ℹ 39 more rows # fit another model crime_sem <- errorsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sem) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 59.9 5.37 11.2 0 #> 2 INC -0.941 0.331 -2.85 0.00441 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 #> 4 lambda 0.562 0.134 4.20 0.0000271 tidy(crime_sem, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 59.9 5.37 11.2 0 49.4 70.4 #> 2 INC -0.941 0.331 -2.85 0.00441 -1.59 -0.293 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 -0.480 -0.125 #> 4 lambda 0.562 0.134 4.20 0.0000271 0.299 0.824 glance(crime_sem) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.658 377. 386. 4683. -183. 49 augment(crime_sem) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.5 -3.70 #> 2 1 4.48 33.2 32.4 44.9 -12.5 #> 3 1 11.3 37.1 38.4 38.2 0.223 #> 4 1 8.44 75 0.178 35.0 -34.8 #> 5 1 19.5 80.5 15.7 13.3 2.45 #> 6 1 16.0 26.4 30.6 35.0 -4.33 #> 7 1 11.3 23.2 50.7 42.3 8.41 #> 8 1 16.0 28.8 26.1 39.4 -13.3 #> 9 1 9.87 18 48.6 49.3 -0.721 #> 10 1 13.6 96.4 34.0 16.6 17.4 #> # ℹ 39 more rows # fit another model crime_sac <- sacsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sac) #> # A tibble: 5 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.368 0.197 1.87 0.0613 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 #> 3 INC -1.03 0.326 -3.14 0.00167 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 #> 5 lambda 0.167 0.297 0.562 0.574 tidy(crime_sac, conf.int = TRUE) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.368 0.197 1.87 0.0613 -0.0174 0.754 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 28.4 67.2 #> 3 INC -1.03 0.326 -3.14 0.00167 -1.67 -0.386 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 -0.458 -0.105 #> 5 lambda 0.167 0.297 0.562 0.574 -0.415 0.748 glance(crime_sac) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 376. 388. 4685. -182. 49 augment(crime_sac) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.2 -3.37 #> 2 1 4.48 33.2 32.4 46.4 -14.0 #> 3 1 11.3 37.1 38.4 40.4 -2.00 #> 4 1 8.44 75 0.178 37.5 -37.3 #> 5 1 19.5 80.5 15.7 13.5 2.25 #> 6 1 16.0 26.4 30.6 34.4 -3.74 #> 7 1 11.3 23.2 50.7 44.1 6.60 #> 8 1 16.0 28.8 26.1 39.0 -12.9 #> 9 1 9.87 18 48.6 51.5 -2.93 #> 10 1 13.6 96.4 34.0 15.8 18.2 #> # ℹ 39 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) smooth.spine object — glance.smooth.spline","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"","code":"# S3 method for class 'smooth.spline' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"x smooth.spline object returned stats::smooth.spline(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"tibble::tibble() exactly one row columns: crit Minimized criterion cv.crit Cross-validation score df Degrees freedom used model. lambda Choice lambda corresponding `spar`. nobs Number observations used. pen.crit Penalized criterion. spar Smoothing parameter.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"","code":"# fit model spl <- smooth.spline(mtcars$wt, mtcars$mpg, df = 4) # summarize model fit with tidiers augment(spl, mtcars) #> # A tibble: 32 × 13 #> mpg cyl disp hp drat wt qsec vs am gear carb #> #> 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 #> 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 #> 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 #> 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 #> 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 #> 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 #> 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 #> 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 #> 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 #> 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 #> # ℹ 22 more rows #> # ℹ 2 more variables: .fitted , .resid # calls original columns x and y augment(spl) #> # A tibble: 32 × 5 #> x y w .fitted .resid #> #> 1 2.62 21 1 22.9 -1.87 #> 2 2.88 21 1 21.1 -0.117 #> 3 2.32 22.8 1 25.3 -2.48 #> 4 3.22 21.4 1 19.1 2.33 #> 5 3.44 18.7 1 17.8 0.928 #> 6 3.46 18.1 1 17.7 0.437 #> 7 3.57 14.3 1 17.1 -2.79 #> 8 3.19 24.4 1 19.2 5.19 #> 9 3.15 22.8 1 19.5 3.35 #> 10 3.44 19.2 1 17.8 1.43 #> # ℹ 22 more rows library(ggplot2) ggplot(augment(spl, mtcars), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted))"},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) speedglm object — glance.speedglm","title":"Glance at a(n) speedglm object — glance.speedglm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) speedglm object — glance.speedglm","text":"","code":"# S3 method for class 'speedglm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) speedglm object — glance.speedglm","text":"x speedglm object returned speedglm::speedglm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) speedglm object — glance.speedglm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) speedglm object — glance.speedglm","text":"","code":"# load libraries for models and data library(speedglm) # generate data clotting <- data.frame( u = c(5, 10, 15, 20, 30, 40, 60, 80, 100), lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18) ) # fit model fit <- speedglm(lot1 ~ log(u), data = clotting, family = Gamma(log)) # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 5.50 0.190 28.9 0.0000000152 #> 2 log(u) -0.602 0.0553 -10.9 0.0000122 glance(fit) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 3.51 8 -26.2 58.5 59.1 0.163 7 9"},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) speedlm object — glance.speedlm","title":"Glance at a(n) speedlm object — glance.speedlm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) speedlm object — glance.speedlm","text":"","code":"# S3 method for class 'speedlm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) speedlm object — glance.speedlm","text":"x speedlm object returned speedglm::speedlm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) speedlm object — glance.speedlm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. statistic F-statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) speedlm object — glance.speedlm","text":"","code":"# load modeling library library(speedglm) # fit model mod <- speedlm(mpg ~ wt + qsec, data = mtcars, fitted = TRUE) # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 11 #> r.squared adj.r.squared statistic p.value df logLik AIC BIC #> #> 1 0.826 0.814 69.0 9.39e-12 3 -74.4 157. 163. #> # ℹ 3 more variables: deviance , df.residual , nobs augment(mod) #> # A tibble: 32 × 6 #> .rownames mpg wt qsec .fitted .resid #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 #> 5 Hornet Sportabout 18.7 3.44 17.0 18.2 0.504 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 #> # ℹ 22 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) summary.lm object — glance.summary.lm","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"","code":"# S3 method for class 'summary.lm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"x lm object created stats::lm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"glance.summary.lm() method potentially useful alternative glance.lm(). instance, users already converted large lm objects leaner summary.lm equivalents conserve memory. Note, however, method return columns non-summary method (e.g. AIC BIC missing.)","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic. df degrees freedom numerator overall F-statistic. new broom 0.7.0. Previously, reported rank design matrix, one numerator degrees freedom overall F-statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"","code":"library(ggplot2) library(dplyr) mod <- lm(mpg ~ wt + qsec, data = mtcars) tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # coefficient plot d <- tidy(mod, conf.int = TRUE) ggplot(d, aes(estimate, term, xmin = conf.low, xmax = conf.high, height = 0)) + geom_point() + geom_vline(xintercept = 0, lty = 4) + geom_errorbarh() # aside: There are tidy() and glance() methods for lm.summary objects too. # this can be useful when you want to conserve memory by converting large lm # objects into their leaner summary.lm equivalents. s <- summary(mod) tidy(s, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(s) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32 augment(mod) #> # A tibble: 32 × 10 #> .rownames mpg wt qsec .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 0.0693 2.64 2.63e-3 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 0.0444 2.64 5.59e-6 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 0.0607 2.60 2.17e-2 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 0.0576 2.64 1.05e-4 #> 5 Hornet Sportab… 18.7 3.44 17.0 18.2 0.504 0.0389 2.64 5.29e-4 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 0.0957 2.58 5.10e-2 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 0.0729 2.61 1.93e-2 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 0.0791 2.61 2.18e-2 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 0.295 2.59 1.59e-1 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 0.0358 2.64 6.55e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid augment(mod, mtcars, interval = \"confidence\") #> # A tibble: 32 × 20 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 9 more variables: carb , .fitted , .lower , #> # .upper , .resid , .hat , .sigma , .cooksd , #> # .std.resid # predict on new data newdata <- mtcars %>% head(6) %>% mutate(wt = wt + 1) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid # ggplot2 example where we also construct 95% prediction interval # simpler bivariate model since we're plotting in 2D mod2 <- lm(mpg ~ wt, data = mtcars) au <- augment(mod2, newdata = newdata, interval = \"prediction\") ggplot(au, aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) + geom_ribbon(aes(ymin = .lower, ymax = .upper), col = NA, alpha = 0.3) # predict on new data without outcome variable. Output does not include .resid newdata <- newdata %>% select(-mpg) augment(mod, newdata = newdata) #> # A tibble: 6 × 12 #> .rownames cyl disp hp drat wt qsec vs am gear carb #> #> 1 Mazda RX4 6 160 110 3.9 3.62 16.5 0 1 4 4 #> 2 Mazda RX4 W… 6 160 110 3.9 3.88 17.0 0 1 4 4 #> 3 Datsun 710 4 108 93 3.85 3.32 18.6 1 1 4 1 #> 4 Hornet 4 Dr… 6 258 110 3.08 4.22 19.4 1 0 3 1 #> 5 Hornet Spor… 8 360 175 3.15 4.44 17.0 0 0 3 2 #> 6 Valiant 6 225 105 2.76 4.46 20.2 1 0 3 1 #> # ℹ 1 more variable: .fitted au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + geom_vline(size = 2, colour = \"white\", xintercept = 0) + geom_hline(size = 2, colour = \"white\", yintercept = 0) + geom_point() + geom_smooth(se = FALSE) #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' plot(mod, which = 6) ggplot(au, aes(.hat, .cooksd)) + geom_vline(xintercept = 0, colour = NA) + geom_abline(slope = seq(0, 3, by = 0.5), colour = \"white\") + geom_smooth(se = FALSE) + geom_point() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # column-wise models a <- matrix(rnorm(20), nrow = 10) b <- a + rnorm(length(a)) result <- lm(b ~ a) tidy(result) #> # A tibble: 6 × 6 #> response term estimate std.error statistic p.value #> #> 1 Y1 (Intercept) 0.419 0.295 1.42 0.199 #> 2 Y1 a1 0.786 0.307 2.55 0.0378 #> 3 Y1 a2 0.196 0.374 0.524 0.617 #> 4 Y2 (Intercept) 0.579 0.219 2.64 0.0335 #> 5 Y2 a1 0.738 0.228 3.23 0.0144 #> 6 Y2 a2 0.616 0.278 2.22 0.0622"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) survdiff object — glance.survdiff","title":"Glance at a(n) survdiff object — glance.survdiff","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) survdiff object — glance.survdiff","text":"","code":"# S3 method for class 'survdiff' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) survdiff object — glance.survdiff","text":"x survdiff object returned survival::survdiff(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) survdiff object — glance.survdiff","text":"tibble::tibble() exactly one row columns: df Degrees freedom used model. p.value P-value corresponding test statistic. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) survdiff object — glance.survdiff","text":"","code":"# load libraries for models and data library(survival) # fit model s <- survdiff( Surv(time, status) ~ pat.karno + strata(inst), data = lung ) # summarize model fit with tidiers tidy(s) #> # A tibble: 8 × 4 #> pat.karno N obs exp #> #> 1 30 2 1 0.692 #> 2 40 2 1 1.10 #> 3 50 4 4 1.17 #> 4 60 30 27 16.3 #> 5 70 41 31 26.4 #> 6 80 50 38 41.9 #> 7 90 60 38 47.2 #> 8 100 35 21 26.2 glance(s) #> # A tibble: 1 × 3 #> statistic df p.value #> #> 1 21.4 7 0.00326"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) survexp object — glance.survexp","title":"Glance at a(n) survexp object — glance.survexp","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) survexp object — glance.survexp","text":"","code":"# S3 method for class 'survexp' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) survexp object — glance.survexp","text":"x survexp object returned survival::survexp(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) survexp object — glance.survexp","text":"tibble::tibble() exactly one row columns: n.max Maximum number subjects risk. n.start Initial number subjects risk. timepoints Number timepoints.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) survexp object — glance.survexp","text":"","code":"# load libraries for models and data library(survival) # fit model sexpfit <- survexp( futime ~ 1, rmap = list( sex = \"male\", year = accept.dt, age = (accept.dt - birth.dt) ), method = \"conditional\", data = jasa ) # summarize model fit with tidiers tidy(sexpfit) #> # A tibble: 88 × 3 #> time estimate n.risk #> #> 1 0 1 102 #> 2 1 1.00 102 #> 3 2 1.00 99 #> 4 4 1.00 96 #> 5 5 1.00 94 #> 6 7 1.00 92 #> 7 8 1.00 91 #> 8 10 1.00 90 #> 9 11 1.00 89 #> 10 15 1.00 88 #> # ℹ 78 more rows glance(sexpfit) #> # A tibble: 1 × 3 #> n.max n.start timepoints #> #> 1 102 102 88"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) survfit object — glance.survfit","title":"Glance at a(n) survfit object — glance.survfit","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) survfit object — glance.survfit","text":"","code":"# S3 method for class 'survfit' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) survfit object — glance.survfit","text":"x survfit object returned survival::survfit(). ... Additional arguments passed survival::summary.survfit(). Important arguments include rmean.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) survfit object — glance.survfit","text":"tibble::tibble() exactly one row columns: events Number events. n.max Maximum number subjects risk. n.start Initial number subjects risk. nobs Number observations used. records Number observations rmean Restricted mean (see [survival::print.survfit()]). rmean.std.error Restricted mean standard error. conf.low lower end confidence interval median conf.high upper end confidence interval median median median survival","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) survfit object — glance.survfit","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) sfit <- survfit(cfit) # summarize model fit with tidiers + visualization tidy(sfit) #> # A tibble: 186 × 8 #> time n.risk n.event n.censor estimate std.error conf.high conf.low #> #> 1 5 228 1 0 0.996 0.00419 1 0.988 #> 2 11 227 3 0 0.983 0.00845 1.00 0.967 #> 3 12 224 1 0 0.979 0.00947 0.997 0.961 #> 4 13 223 2 0 0.971 0.0113 0.992 0.949 #> 5 15 221 1 0 0.966 0.0121 0.990 0.944 #> 6 26 220 1 0 0.962 0.0129 0.987 0.938 #> 7 30 219 1 0 0.958 0.0136 0.984 0.933 #> 8 31 218 1 0 0.954 0.0143 0.981 0.927 #> 9 53 217 2 0 0.945 0.0157 0.975 0.917 #> 10 54 215 1 0 0.941 0.0163 0.972 0.911 #> # ℹ 176 more rows glance(sfit) #> # A tibble: 1 × 10 #> records n.max n.start events rmean rmean.std.error median conf.low #> #> 1 228 228 228 165 381. 20.3 320 285 #> # ℹ 2 more variables: conf.high , nobs library(ggplot2) ggplot(tidy(sfit), aes(time, estimate)) + geom_line() + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25) # multi-state fitCI <- survfit(Surv(stop, status * as.numeric(event), type = \"mstate\") ~ 1, data = mgus1, subset = (start == 0) ) td_multi <- tidy(fitCI) td_multi #> # A tibble: 711 × 9 #> time n.risk n.event n.censor estimate std.error conf.high conf.low #> #> 1 6 241 0 0 0.996 0.00414 1 0.988 #> 2 7 240 0 0 0.992 0.00584 1 0.980 #> 3 31 239 0 0 0.988 0.00714 1 0.974 #> 4 32 238 0 0 0.983 0.00823 1.00 0.967 #> 5 39 237 0 0 0.979 0.00918 0.997 0.961 #> 6 60 236 0 0 0.975 0.0100 0.995 0.956 #> 7 61 235 0 0 0.967 0.0115 0.990 0.944 #> 8 152 233 0 0 0.963 0.0122 0.987 0.939 #> 9 153 232 0 0 0.959 0.0128 0.984 0.934 #> 10 174 231 0 0 0.954 0.0134 0.981 0.928 #> # ℹ 701 more rows #> # ℹ 1 more variable: state ggplot(td_multi, aes(time, estimate, group = state)) + geom_line(aes(color = state)) + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) survreg object — glance.survreg","title":"Glance at a(n) survreg object — glance.survreg","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) survreg object — glance.survreg","text":"","code":"# S3 method for class 'survreg' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) survreg object — glance.survreg","text":"x survreg object returned survival::survreg(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) survreg object — glance.survreg","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df Degrees freedom used model. df.residual Residual degrees freedom. iter Iterations algorithm/fitting procedure completed. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. p.value P-value corresponding test statistic. statistic Chi-squared statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) survreg object — glance.survreg","text":"","code":"# load libraries for models and data library(survival) # fit model sr <- survreg( Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = \"exponential\" ) # summarize model fit with tidiers + visualization tidy(sr) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 6.96 1.32 5.27 0.000000139 #> 2 ecog.ps -0.433 0.587 -0.738 0.461 #> 3 rx 0.582 0.587 0.991 0.322 augment(sr, ovarian) #> # A tibble: 26 × 9 #> futime fustat age resid.ds rx ecog.ps .fitted .se.fit .resid #> #> 1 59 1 72.3 2 1 1 1224. 639. -1165. #> 2 115 1 74.5 2 1 1 1224. 639. -1109. #> 3 156 1 66.5 2 1 2 794. 350. -638. #> 4 421 0 53.4 2 2 1 2190. 1202. -1769. #> 5 431 1 50.3 2 1 1 1224. 639. -793. #> 6 448 0 56.4 1 1 2 794. 350. -346. #> 7 464 1 56.9 2 2 2 1420. 741. -956. #> 8 475 1 59.9 2 2 2 1420. 741. -945. #> 9 477 0 64.2 2 1 1 1224. 639. -747. #> 10 563 1 55.2 1 2 2 1420. 741. -857. #> # ℹ 16 more rows glance(sr) #> # A tibble: 1 × 9 #> iter df statistic logLik AIC BIC df.residual nobs p.value #> #> 1 4 3 1.67 -97.2 200. 204. 23 26 0.434 # coefficient plot td <- tidy(sr, conf.int = TRUE) library(ggplot2) ggplot(td, aes(estimate, term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) svyglm object — glance.svyglm","title":"Glance at a(n) svyglm object — glance.svyglm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) svyglm object — glance.svyglm","text":"","code":"# S3 method for class 'svyglm' glance(x, maximal = x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) svyglm object — glance.svyglm","text":"x svyglm object returned survey::svyglm(). maximal svyglm object corresponding maximal model compute BIC. See Lumley Scott (2015) details. Defaults x, equivalent using maximal model. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Glance at a(n) svyglm object — glance.svyglm","text":"Lumley T, Scott (2015). AIC BIC modelling complex survey data. Journal Survey Statistics Methodology, 3(1).","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) svyglm object — glance.svyglm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) svyglm object — glance.svyglm","text":"","code":"# load libraries for models and data library(survey) #> Loading required package: grid #> #> Attaching package: ‘survey’ #> The following object is masked from ‘package:drc’: #> #> twophase #> The following object is masked from ‘package:graphics’: #> #> dotchart set.seed(123) data(api) # survey design dstrat <- svydesign( id = ~1, strata = ~stype, weights = ~pw, data = apistrat, fpc = ~fpc ) # model m <- svyglm( formula = sch.wide ~ ell + meals + mobility, design = dstrat, family = quasibinomial() ) glance(m) #> # A tibble: 1 × 7 #> null.deviance df.null AIC BIC deviance df.residual nobs #> #> 1 184. 199 184. 199. 178. 194 200"},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) svyolr object — glance.svyolr","title":"Glance at a(n) svyolr object — glance.svyolr","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) svyolr object — glance.svyolr","text":"","code":"# S3 method for class 'svyolr' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) svyolr object — glance.svyolr","text":"x svyolr object returned survey::svyolr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) svyolr object — glance.svyolr","text":"tibble::tibble() exactly one row columns: df.residual Residual degrees freedom. edf effective degrees freedom. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) svyolr object — glance.svyolr","text":"","code":"library(broom) library(survey) data(api) dclus1 <- svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) dclus1 <- update(dclus1, mealcat = cut(meals, c(0, 25, 50, 75, 100))) m <- svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1) m #> Call: #> svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1) #> #> Coefficients: #> avg.ed mobility stypeH stypeM #> -2.6999217 0.0325042 -1.7574715 -0.6191463 #> #> Intercepts: #> (0,25]|(25,50] (25,50]|(50,75] (50,75]|(75,100] #> -8.857919 -6.586464 -4.924938 tidy(m, conf.int = TRUE) #> # A tibble: 7 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 avg.ed -2.70 1.13 -2.38 -4.92e+0 -0.477 coeffici… #> 2 mobility 0.0325 0.0207 1.57 -7.98e-3 0.0730 coeffici… #> 3 stypeH -1.76 0.700 -2.51 -3.13e+0 -0.386 coeffici… #> 4 stypeM -0.619 0.310 -2.00 -1.23e+0 -0.0123 coeffici… #> 5 (0,25]|(25,50] -8.86 3.69 -2.40 -1.61e+1 -1.63 scale #> 6 (25,50]|(50,7… -6.59 3.11 -2.12 -1.27e+1 -0.493 scale #> 7 (50,75]|(75,1… -4.92 2.86 -1.72 -1.05e+1 0.687 scale"},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) varest object — glance.varest","title":"Glance at a(n) varest object — glance.varest","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) varest object — glance.varest","text":"","code":"# S3 method for class 'varest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) varest object — glance.varest","text":"x varest object produced call vars::VAR(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) varest object — glance.varest","text":"tibble::tibble() exactly one row columns: lag.order Lag order. logLik log-likelihood model. [stats::logLik()] may useful reference. n total number observations. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) varest object — glance.varest","text":"","code":"# load libraries for models and data library(vars) #> Loading required package: strucchange #> Loading required package: urca # load data data(\"Canada\", package = \"vars\") # fit models mod <- VAR(Canada, p = 1, type = \"both\") # summarize model fit with tidiers tidy(mod) #> # A tibble: 24 × 6 #> group term estimate std.error statistic p.value #> #> 1 e e.l1 1.24 0.0863 14.4 1.82e-23 #> 2 e prod.l1 0.195 0.0361 5.39 7.49e- 7 #> 3 e rw.l1 -0.0678 0.0283 -2.40 1.90e- 2 #> 4 e U.l1 0.623 0.169 3.68 4.30e- 4 #> 5 e const -279. 75.2 -3.71 3.92e- 4 #> 6 e trend -0.0407 0.0197 -2.06 4.24e- 2 #> 7 prod e.l1 0.0129 0.126 0.103 9.19e- 1 #> 8 prod prod.l1 0.963 0.0527 18.3 9.43e-30 #> 9 prod rw.l1 -0.0391 0.0412 -0.948 3.46e- 1 #> 10 prod U.l1 0.211 0.247 0.855 3.95e- 1 #> # ℹ 14 more rows glance(mod) #> # A tibble: 1 × 4 #> lag.order logLik nobs n #> #> 1 1 -208. 83 84"},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) Gam object — glance.Gam","title":"Glance at a(n) Gam object — glance.Gam","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) Gam object — glance.Gam","text":"","code":"# S3 method for class 'Gam' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) Gam object — glance.Gam","text":"x Gam object returned call gam::gam(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) Gam object — glance.Gam","text":"Glance gam objects created calls mgcv::gam() glance.gam().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) Gam object — glance.Gam","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) optim object masquerading as list — glance_optim","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"","code":"glance_optim(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"x list returned stats::optim(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"tibble::tibble() exactly one row columns: convergence Convergence code. function.count Number calls `fn`. gradient.count Number calls `gr`. value Minimized maximized output value.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"","code":"f <- function(x) (x[1] - 2)^2 + (x[2] - 3)^2 + (x[3] - 8)^2 o <- optim(c(1, 1, 1), f)"},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"models single component, tidy() glance() methods identical. Please see documentation methods.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"","code":"# S3 method for class 'leveneTest' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"x object class anova created call car::leveneTest(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"tibble::tibble() columns: df Degrees freedom used term model. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. df.residual Residual degrees freedom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"","code":"# load libraries for models and data library(car) data(Moore) lt <- with(Moore, leveneTest(conformity, fcategory)) tidy(lt) #> # A tibble: 1 × 4 #> statistic p.value df df.residual #> #> 1 0.0460 0.955 2 42 glance(lt) #> # A tibble: 0 × 0"},{"path":"https://broom.tidymodels.org/dev/reference/list_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","title":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), base::svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/list_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","text":"","code":"# S3 method for class 'list' tidy(x, ...) # S3 method for class 'list' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/list_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","text":"x list, potentially representing object can tidied. ... Additionally, arguments passed tidying function.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/list_tidiers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","text":"functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throws error.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rma object — tidy.rma","title":"Tidy a(n) rma object — tidy.rma","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rma object — tidy.rma","text":"","code":"# S3 method for class 'rma' tidy( x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, include_studies = FALSE, measure = \"GEN\", ... )"},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rma object — tidy.rma","text":"x rma object created metafor::rma(), metafor::rma.uni(), metafor::rma.glmm(), metafor::rma.mh(), metafor::rma.mv(), metafor::rma.peto(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. include_studies Logical. individual studies included output? Defaults FALSE. measure Measure type. See metafor::escalc() ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) rma object — tidy.rma","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name individual study type estimate type (summary vs individual study)","code":""},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) rma object — tidy.rma","text":"","code":"# load libraries for models and data library(metafor) df <- escalc( measure = \"RR\", ai = tpos, bi = tneg, ci = cpos, di = cneg, data = dat.bcg ) meta_analysis <- rma(yi, vi, data = df, method = \"EB\") tidy(meta_analysis) #> # A tibble: 1 × 6 #> term type estimate std.error statistic p.value #> #> 1 overall summary -0.715 0.181 -3.95 0.0000774"},{"path":"https://broom.tidymodels.org/dev/reference/null_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidiers for NULL inputs — null_tidiers","title":"Tidiers for NULL inputs — null_tidiers","text":"tidy(NULL), glance(NULL) augment(NULL) return empty tibble::tibble. empty tibble can treated tibble zero rows, making convenient combine tibbles using functions like purrr::map_df() lists potentially NULL objects.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/null_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidiers for NULL inputs — null_tidiers","text":"","code":"# S3 method for class '`NULL`' tidy(x, ...) # S3 method for class '`NULL`' glance(x, ...) # S3 method for class '`NULL`' augment(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/null_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidiers for NULL inputs — null_tidiers","text":"x value NULL. ... Additional arguments (used).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/null_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidiers for NULL inputs — null_tidiers","text":"empty tibble::tibble.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. generics augment, glance, tidy","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/sp_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) SpatialPolygonsDataFrame object — sp_tidiers","title":"Tidy a(n) SpatialPolygonsDataFrame object — sp_tidiers","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. Note sf package now defines tidy spatial objects recommended approach spatial data. sp tidiers now deprecated favor sf::st_as_sf() coercion methods found packages. See https://r-spatial.org/r/2023/05/15/evolution4.html migration retiring spatial packages.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/sp_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) SpatialPolygonsDataFrame object — sp_tidiers","text":"","code":"# S3 method for class 'SpatialPolygonsDataFrame' tidy(x, region = NULL, ...) # S3 method for class 'SpatialPolygons' tidy(x, ...) # S3 method for class 'Polygons' tidy(x, ...) # S3 method for class 'Polygon' tidy(x, ...) # S3 method for class 'SpatialLinesDataFrame' tidy(x, ...) # S3 method for class 'Lines' tidy(x, ...) # S3 method for class 'Line' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/sp_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) SpatialPolygonsDataFrame object — sp_tidiers","text":"x SpatialPolygonsDataFrame, SpatialPolygons, Polygons, Polygon, SpatialLinesDataFrame, Lines Line object. region name variable used split regions ... used method","code":""},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"Tidiers summaryDefault objects deprecated broom 0.7.0 favor skimr::skim().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"","code":"# S3 method for class 'summaryDefault' tidy(x, ...) # S3 method for class 'summaryDefault' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"x summaryDefault object, created calling summary() vector. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"one-row tibble::tibble columns: minimum Minimum value original vector. q1 First quartile original vector. median Median original vector. mean Mean original vector. q3 Third quartile original vector. maximum Maximum value original vector. na Number NA values original vector. Column present original vector least one NA entry.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"","code":"v <- rnorm(1000) s <- summary(v) s #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> -2.80978 -0.62832 0.00921 0.01613 0.66460 3.24104 tidy(s) #> Warning: `tidy.summaryDefault()` is deprecated. Please use `skimr::skim()` instead. #> # A tibble: 1 × 6 #> minimum q1 median mean q3 maximum #> #> 1 -2.81 -0.628 0.00921 0.0161 0.665 3.24 glance(s) #> Warning: `tidy.summaryDefault()` is deprecated. Please use `skimr::skim()` instead. #> # A tibble: 1 × 6 #> minimum q1 median mean q3 maximum #> #> 1 -2.81 -0.628 0.00921 0.0161 0.665 3.24 v2 <- c(v,NA) tidy(summary(v2)) #> Warning: `tidy.summaryDefault()` is deprecated. Please use `skimr::skim()` instead. #> # A tibble: 1 × 7 #> minimum q1 median mean q3 maximum na #> #> 1 -2.81 -0.628 0.00921 0.0161 0.665 3.24 1"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) Arima object — tidy.Arima","title":"Tidy a(n) Arima object — tidy.Arima","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) Arima object — tidy.Arima","text":"","code":"# S3 method for class 'Arima' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) Arima object — tidy.Arima","text":"x object class Arima created stats::arima(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) Arima object — tidy.Arima","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) Arima object — tidy.Arima","text":"","code":"# fit model fit <- arima(lh, order = c(1, 0, 0)) # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 3 #> term estimate std.error #> #> 1 ar1 0.574 0.116 #> 2 intercept 2.41 0.147 glance(fit) #> # A tibble: 1 × 5 #> sigma logLik AIC BIC nobs #> #> 1 0.444 -29.4 64.8 70.4 48"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) Kendall object — tidy.Kendall","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"","code":"# S3 method for class 'Kendall' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"x Kendall object returned call Kendall::Kendall(), Kendall::MannKendall(), Kendall::SeasonalMannKendall(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"tibble::tibble() columns: kendall_score Kendall score. p.value two-sided p-value associated observed statistic. var_kendall_score Variance kendall_score. statistic Kendall's tau statistic denominator denominator, tau=kendall_score/denominator.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"","code":"# load libraries for models and data library(Kendall) A <- c(2.5, 2.5, 2.5, 2.5, 5, 6.5, 6.5, 10, 10, 10, 10, 10, 14, 14, 14, 16, 17) B <- c(1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2) # fit models and summarize results f_res <- Kendall(A, B) tidy(f_res) #> # A tibble: 1 × 5 #> statistic p.value kendall_score denominator var_kendall_score #> #> 1 0.408 0.0754 34 83.4 345. s_res <- MannKendall(B) tidy(s_res) #> # A tibble: 1 × 5 #> statistic p.value kendall_score denominator var_kendall_score #> #> 1 0.354 0.102 32 90.3 360 t_res <- SeasonalMannKendall(ts(A)) tidy(t_res) #> # A tibble: 1 × 5 #> statistic p.value kendall_score denominator var_kendall_score #> #> 1 0.924 0.000000935 116 126. 559."},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) Mclust object — tidy.Mclust","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"","code":"# S3 method for class 'Mclust' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"x Mclust object return mclust::Mclust(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"tibble::tibble() columns: proportion mixing proportion component size Number points assigned cluster. mean mean component. case 2+ dimensional models, column mean added dimension. NA noise component variance case one-dimensional spherical models, variance component, omitted otherwise. NA noise component component Cluster id factor.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"","code":"# load library for models and data library(mclust) # load data manipulation libraries library(dplyr) library(tibble) library(purrr) library(tidyr) set.seed(27) centers <- tibble( cluster = factor(1:3), # number points in each cluster num_points = c(100, 150, 50), # x1 coordinate of cluster center x1 = c(5, 0, -3), # x2 coordinate of cluster center x2 = c(-1, 1, -2) ) points <- centers %>% mutate( x1 = map2(num_points, x1, rnorm), x2 = map2(num_points, x2, rnorm) ) %>% select(-num_points, -cluster) %>% unnest(c(x1, x2)) # fit model m <- Mclust(points) # summarize model fit with tidiers tidy(m) #> # A tibble: 3 × 6 #> component size proportion variance mean.x1 mean.x2 #> #> 1 1 101 0.335 1.12 5.01 -1.04 #> 2 2 150 0.503 1.12 0.0594 1.00 #> 3 3 49 0.161 1.12 -3.20 -2.06 augment(m, points) #> # A tibble: 300 × 4 #> x1 x2 .class .uncertainty #> #> 1 6.91 -2.74 1 3.98e-11 #> 2 6.14 -2.45 1 1.99e- 9 #> 3 4.24 -0.946 1 1.47e- 4 #> 4 3.54 0.287 1 2.94e- 2 #> 5 3.91 0.408 1 7.48e- 3 #> 6 5.30 -1.58 1 4.22e- 7 #> 7 5.01 -1.77 1 1.06e- 6 #> 8 6.16 -1.68 1 7.64e- 9 #> 9 7.13 -2.17 1 4.16e-11 #> 10 5.24 -2.42 1 1.16e- 7 #> # ℹ 290 more rows glance(m) #> # A tibble: 1 × 7 #> model G BIC logLik df hypvol nobs #> #> 1 EII 3 -2402. -1175. 9 NA 300"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"","code":"# S3 method for class 'TukeyHSD' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"x TukeyHSD object return stats::TukeyHSD(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"tibble::tibble() columns: adj.p.value P-value adjusted multiple comparisons. conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. contrast Levels compared. estimate estimated value regression term. null.value Value estimate compared. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"","code":"fm1 <- aov(breaks ~ wool + tension, data = warpbreaks) thsd <- TukeyHSD(fm1, \"tension\", ordered = TRUE) tidy(thsd) #> # A tibble: 3 × 7 #> term contrast null.value estimate conf.low conf.high adj.p.value #> #> 1 tension M-H 0 4.72 -4.63 14.1 0.447 #> 2 tension L-H 0 14.7 5.37 24.1 0.00112 #> 3 tension L-M 0 10.0 0.647 19.4 0.0336 # may include comparisons on multiple terms fm2 <- aov(mpg ~ as.factor(gear) * as.factor(cyl), data = mtcars) tidy(TukeyHSD(fm2)) #> # A tibble: 42 × 7 #> term contrast null.value estimate conf.low conf.high adj.p.value #> #> 1 as.factor(… 4-3 0 8.43 5.19 11.7 0.00000297 #> 2 as.factor(… 5-3 0 5.27 0.955 9.59 0.0147 #> 3 as.factor(… 5-4 0 -3.15 -7.60 1.30 0.201 #> 4 as.factor(… 6-4 0 -5.40 -9.45 -1.36 0.00748 #> 5 as.factor(… 8-4 0 -5.23 -8.60 -1.86 0.00201 #> 6 as.factor(… 8-6 0 0.172 -3.70 4.04 0.993 #> 7 as.factor(… 4:4-3:4 0 5.43 -6.65 17.5 0.832 #> 8 as.factor(… 5:4-3:4 0 6.70 -7.24 20.6 0.778 #> 9 as.factor(… 3:6-3:4 0 -1.75 -15.7 12.2 1.00 #> 10 as.factor(… 4:6-3:4 0 -1.75 -14.5 11.0 1.00 #> # ℹ 32 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) aareg object — tidy.aareg","title":"Tidy a(n) aareg object — tidy.aareg","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) aareg object — tidy.aareg","text":"","code":"# S3 method for class 'aareg' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) aareg object — tidy.aareg","text":"x aareg object returned survival::aareg(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) aareg object — tidy.aareg","text":"robust.se present x created dfbeta = TRUE.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) aareg object — tidy.aareg","text":"tibble::tibble() columns: estimate estimated value regression term. p.value two-sided p-value associated observed statistic. robust.se robust version standard error estimate. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. z z score.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) aareg object — tidy.aareg","text":"","code":"# load libraries for models and data library(survival) # fit model afit <- aareg( Surv(time, status) ~ age + sex + ph.ecog, data = lung, dfbeta = TRUE ) # summarize model fit with tidiers tidy(afit) #> # A tibble: 4 × 7 #> term estimate statistic std.error robust.se statistic.z p.value #> #> 1 Intercept 0.00505 0.00587 0.00474 0.00477 1.23 0.219 #> 2 age 0.0000401 0.0000715 0.0000723 0.0000700 1.02 0.307 #> 3 sex -0.00316 -0.00403 0.00122 0.00123 -3.28 0.00103 #> 4 ph.ecog 0.00301 0.00367 0.00102 0.00102 3.62 0.000299"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) acf object — tidy.acf","title":"Tidy a(n) acf object — tidy.acf","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) acf object — tidy.acf","text":"","code":"# S3 method for class 'acf' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) acf object — tidy.acf","text":"x acf object created stats::acf(), stats::pacf() stats::ccf(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) acf object — tidy.acf","text":"tibble::tibble() columns: acf Autocorrelation. lag Lag values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) acf object — tidy.acf","text":"","code":"tidy(acf(lh, plot = FALSE)) #> # A tibble: 17 × 2 #> lag acf #> #> 1 0 1 #> 2 1 0.576 #> 3 2 0.182 #> 4 3 -0.145 #> 5 4 -0.175 #> 6 5 -0.150 #> 7 6 -0.0210 #> 8 7 -0.0203 #> 9 8 -0.00420 #> 10 9 -0.136 #> 11 10 -0.154 #> 12 11 -0.0972 #> 13 12 0.0490 #> 14 13 0.120 #> 15 14 0.0867 #> 16 15 0.119 #> 17 16 0.151 tidy(ccf(mdeaths, fdeaths, plot = FALSE)) #> # A tibble: 31 × 2 #> lag acf #> #> 1 -1.25 0.0151 #> 2 -1.17 0.366 #> 3 -1.08 0.615 #> 4 -1 0.708 #> 5 -0.917 0.622 #> 6 -0.833 0.340 #> 7 -0.75 -0.0245 #> 8 -0.667 -0.382 #> 9 -0.583 -0.612 #> 10 -0.5 -0.678 #> # ℹ 21 more rows tidy(pacf(lh, plot = FALSE)) #> # A tibble: 16 × 2 #> lag acf #> #> 1 1 0.576 #> 2 2 -0.223 #> 3 3 -0.227 #> 4 4 0.103 #> 5 5 -0.0759 #> 6 6 0.0676 #> 7 7 -0.104 #> 8 8 0.0120 #> 9 9 -0.188 #> 10 10 0.00255 #> 11 11 0.0656 #> 12 12 0.0320 #> 13 13 0.0219 #> 14 14 -0.0931 #> 15 15 0.230 #> 16 16 0.0444"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) anova object — tidy.anova","title":"Tidy a(n) anova object — tidy.anova","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) anova object — tidy.anova","text":"","code":"# S3 method for class 'anova' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) anova object — tidy.anova","text":"x anova object, created stats::anova(), car::Anova(), car::leveneTest(), car::linearHypothesis(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) anova object — tidy.anova","text":"term column ANOVA table can come leading trailing whitespace, tidying method trims. documentation tidier car::leveneTest() output, see tidy.leveneTest()","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) anova object — tidy.anova","text":"tibble::tibble() columns: df Degrees freedom used term model. meansq Mean sum squares. Equal total sum squares divided degrees freedom. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. sumsq Sum squares explained term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) anova object — tidy.anova","text":"","code":"if (FALSE) { # fit models a <- lm(mpg ~ wt + qsec + disp, mtcars) b <- lm(mpg ~ wt + qsec, mtcars) mod <- anova(a, b) # summarize model fit with tidiers tidy(mod) glance(mod) # car::linearHypothesis() example library(car) mod_lht <- linearHypothesis(a, \"wt - disp\") tidy(mod_lht) glance(mod_lht) }"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) aov object — tidy.aov","title":"Tidy a(n) aov object — tidy.aov","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) aov object — tidy.aov","text":"","code":"# S3 method for class 'aov' tidy(x, intercept = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) aov object — tidy.aov","text":"x aov object, created stats::aov(). intercept logical indicating whether information intercept included. Passed stats::summary.aov(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) aov object — tidy.aov","text":"term column ANOVA table can come leading trailing whitespace, tidying method trims. documentation tidier car::leveneTest() output, see tidy.leveneTest()","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) aov object — tidy.aov","text":"","code":"a <- aov(mpg ~ wt + qsec + disp, mtcars) tidy(a) #> # A tibble: 4 × 6 #> term df sumsq meansq statistic p.value #> #> 1 wt 1 848. 848. 121. 1.08e-11 #> 2 qsec 1 82.9 82.9 11.9 1.82e- 3 #> 3 disp 1 0.00102 0.00102 0.000147 9.90e- 1 #> 4 Residuals 28 195. 6.98 NA NA"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) aovlist object — tidy.aovlist","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"","code":"# S3 method for class 'aovlist' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"x aovlist objects, created stats::aov(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"term column ANOVA table can come leading trailing whitespace, tidying method trims. documentation tidier car::leveneTest() output, see tidy.leveneTest()","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"tibble::tibble() columns: df Degrees freedom used term model. meansq Mean sum squares. Equal total sum squares divided degrees freedom. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. stratum error stratum. sumsq Sum squares explained term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"","code":"a <- aov(mpg ~ wt + qsec + Error(disp / am), mtcars) tidy(a) #> # A tibble: 5 × 7 #> stratum term df sumsq meansq statistic p.value #> #> 1 disp wt 1 809. 809. NA NA #> 2 disp:am wt 1 0.389 0.389 NA NA #> 3 Within wt 1 87.2 87.2 12.0 0.00176 #> 4 Within qsec 1 34.2 34.2 4.72 0.0387 #> 5 Within Residuals 27 195. 7.24 NA NA"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) betamfx object — tidy.betamfx","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"","code":"# S3 method for class 'betamfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"x betamfx object. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"mfx package provides methods calculating marginal effects various generalized linear models (GLMs). Unlike standard linear models, estimated model coefficients GLM directly interpreted marginal effects (.e., change response variable predicted one unit change one regressors). estimated coefficients multiplicative, dependent link function used estimation variables included model. calculating marginal effects, users must typically choose whether want use ) average observation data, ii) average sample marginal effects. See vignette(\"mfxarticle\") mfx package details.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. atmean TRUE marginal effects originally calculated partial effects average observation. FALSE, instead calculated average partial effects.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"","code":"library(mfx) # Simulate some data set.seed(12345) n <- 1000 x <- rnorm(n) # Beta outcome y <- rbeta(n, shape1 = plogis(1 + 0.5 * x), shape2 = (abs(0.2 * x))) # Use Smithson and Verkuilen correction y <- (y * (n - 1) + 0.5) / n d <- data.frame(y, x) mod_betamfx <- betamfx(y ~ x | x, data = d) tidy(mod_betamfx, conf.int = TRUE) #> # A tibble: 1 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 x TRUE 0.0226 0.00801 2.82 0.00483 0.00686 0.0383 # Compare with the naive model coefficients of the equivalent betareg call (not run) # tidy(betamfx(y ~ x | x, data = d), conf.int = TRUE) augment(mod_betamfx) #> # A tibble: 1,000 × 4 #> y x .fitted .cooksd #> #> 1 0.951 0.586 0.809 0.000189 #> 2 0.714 0.709 0.811 0.0000993 #> 3 0.999 -0.109 0.793 0.000273 #> 4 0.998 -0.453 0.785 0.000334 #> 5 0.999 0.606 0.809 0.000342 #> 6 0.562 -1.82 0.751 0.000878 #> 7 0.999 0.630 0.810 0.000348 #> 8 0.999 -0.276 0.789 0.000294 #> 9 0.744 -0.284 0.789 0.0000134 #> 10 0.999 -0.919 0.774 0.000551 #> # ℹ 990 more rows glance(mod_betamfx) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.00726 998 1897. -3787. -3767. 996 1000"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) betareg object — tidy.betareg","title":"Tidy a(n) betareg object — tidy.betareg","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) betareg object — tidy.betareg","text":"","code":"# S3 method for class 'betareg' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) betareg object — tidy.betareg","text":"x betareg object produced call betareg::betareg(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) betareg object — tidy.betareg","text":"tibble one row term regression. component column indicates whether particular term used model either \"mean\" \"precision\". precision inverse variance, often referred phi. least one term used model precision phi.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) betareg object — tidy.betareg","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. component Whether particular term used model mean precision regression. See details.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) betareg object — tidy.betareg","text":"","code":"# load libraries for models and data library(betareg) # load dats data(\"GasolineYield\", package = \"betareg\") # fit model mod <- betareg(yield ~ batch + temp, data = GasolineYield) mod #> #> Call: #> betareg(formula = yield ~ batch + temp, data = GasolineYield) #> #> Coefficients (mean model with logit link): #> (Intercept) batch1 batch2 batch3 batch4 #> -6.15957 1.72773 1.32260 1.57231 1.05971 #> batch5 batch6 batch7 batch8 batch9 #> 1.13375 1.04016 0.54369 0.49590 0.38579 #> temp #> 0.01097 #> #> Phi coefficients (precision model with identity link): #> (phi) #> 440.3 #> # summarize model fit with tidiers tidy(mod) #> # A tibble: 12 × 6 #> component term estimate std.error statistic p.value #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 tidy(mod, conf.int = TRUE) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.52 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.53 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.09 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.34 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.859 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.931 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.832 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.330 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.282 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.153 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.0102 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 225. #> # ℹ 1 more variable: conf.high tidy(mod, conf.int = TRUE, conf.level = .99) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.63 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.47 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.02 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.27 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.796 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.867 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.767 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.263 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.215 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.0803 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.00990 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 157. #> # ℹ 1 more variable: conf.high augment(mod) #> # A tibble: 32 × 6 #> yield batch temp .fitted .resid .cooksd #> #> 1 0.122 1 205 0.101 1.41 0.0791 #> 2 0.223 1 275 0.195 1.44 0.0917 #> 3 0.347 1 345 0.343 0.170 0.00155 #> 4 0.457 1 407 0.508 -2.14 0.606 #> 5 0.08 2 218 0.0797 0.0712 0.0000168 #> 6 0.131 2 273 0.137 -0.318 0.00731 #> 7 0.266 2 347 0.263 0.169 0.00523 #> 8 0.074 3 212 0.0943 -1.52 0.0805 #> 9 0.182 3 272 0.167 0.831 0.0441 #> 10 0.304 3 340 0.298 0.304 0.0170 #> # ℹ 22 more rows glance(mod) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.962 30 84.8 -146. -128. 20 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) biglm object — tidy.biglm","title":"Tidy a(n) biglm object — tidy.biglm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) biglm object — tidy.biglm","text":"","code":"# S3 method for class 'biglm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) biglm object — tidy.biglm","text":"x biglm object created call biglm::biglm() biglm::bigglm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) biglm object — tidy.biglm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) biglm object — tidy.biglm","text":"","code":"# load modeling library library(biglm) # fit model -- linear regression bfit <- biglm(mpg ~ wt + disp, mtcars) # summarize model fit with tidiers tidy(bfit) #> # A tibble: 3 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) 35.0 2.16 1.11e-58 #> 2 wt -3.35 1.16 4.00e- 3 #> 3 disp -0.0177 0.00919 5.38e- 2 tidy(bfit, conf.int = TRUE) #> # A tibble: 3 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 35.0 2.16 1.11e-58 30.7 39.2 #> 2 wt -3.35 1.16 4.00e- 3 -5.63 -1.07 #> 3 disp -0.0177 0.00919 5.38e- 2 -0.0357 0.000288 tidy(bfit, conf.int = TRUE, conf.level = .9) #> # A tibble: 3 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 35.0 2.16 1.11e-58 31.4 38.5 #> 2 wt -3.35 1.16 4.00e- 3 -5.27 -1.44 #> 3 disp -0.0177 0.00919 5.38e- 2 -0.0328 -0.00261 glance(bfit) #> # A tibble: 1 × 5 #> r.squared AIC deviance df.residual nobs #> #> 1 0.781 253. 247. 29 32 # fit model -- logistic regression bgfit <- bigglm(am ~ mpg, mtcars, family = binomial()) # summarize model fit with tidiers tidy(bgfit) #> # A tibble: 2 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) -6.60 2.35 0.00498 #> 2 mpg 0.307 0.115 0.00751 tidy(bgfit, exponentiate = TRUE) #> # A tibble: 2 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) 0.00136 2.35 0.00498 #> 2 mpg 1.36 0.115 0.00751 tidy(bgfit, conf.int = TRUE) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) -6.60 2.35 0.00498 -11.2 -1.99 #> 2 mpg 0.307 0.115 0.00751 0.0819 0.532 tidy(bgfit, conf.int = TRUE, conf.level = .9) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) -6.60 2.35 0.00498 -10.5 -2.74 #> 2 mpg 0.307 0.115 0.00751 0.118 0.496 tidy(bgfit, conf.int = TRUE, conf.level = .9, exponentiate = TRUE) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 0.00136 2.35 0.00498 0.0000283 0.0648 #> 2 mpg 1.36 0.115 0.00751 1.13 1.64 glance(bgfit) #> # A tibble: 1 × 5 #> r.squared AIC deviance df.residual nobs #> #> 1 0.175 33.7 29.7 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) binDesign object — tidy.binDesign","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"","code":"# S3 method for class 'binDesign' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"x binGroup::binDesign() object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"tibble::tibble() columns: n Number trials given iteration. power Power achieved given value n.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"","code":"library(binGroup) des <- binDesign( nmax = 300, delta = 0.06, p.hyp = 0.1, power = .8 ) glance(des) #> # A tibble: 1 × 4 #> power n power.reached maxit #> #> 1 0.805 240 TRUE 238 tidy(des) #> # A tibble: 238 × 2 #> n power #> #> 1 3 0.0000640 #> 2 4 0.000248 #> 3 5 0.000602 #> 4 6 0.00117 #> 5 7 0.0000813 #> 6 8 0.000157 #> 7 9 0.000274 #> 8 10 0.000443 #> 9 11 0.000673 #> 10 12 0.0000640 #> # ℹ 228 more rows # the ggplot2 equivalent of plot(des) library(ggplot2) ggplot(tidy(des), aes(n, power)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) binWidth object — tidy.binWidth","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"","code":"# S3 method for class 'binWidth' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"x binGroup::binWidth() object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"tibble::tibble() columns: alternative Alternative hypothesis (character). ci.width Expected width confidence interval. p True proportion. n Total sample size","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"","code":"# load libraries library(binGroup) # fit model bw <- binWidth(100, .1) bw #> $expCIWidth #> [1] 0.1256172 #> #> $alternative #> [1] \"two.sided\" #> #> $p #> [1] 0.1 #> #> $n #> [1] 100 #> #> attr(,\"class\") #> [1] \"binWidth\" # summarize model fit with tidiers tidy(bw) #> # A tibble: 1 × 4 #> ci.width alternative p n #> #> 1 0.126 two.sided 0.1 100"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) boot object — tidy.boot","title":"Tidy a(n) boot object — tidy.boot","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) boot object — tidy.boot","text":"","code":"# S3 method for class 'boot' tidy( x, conf.int = FALSE, conf.level = 0.95, conf.method = c(\"perc\", \"bca\", \"basic\", \"norm\"), exponentiate = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) boot object — tidy.boot","text":"x boot::boot() object. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. conf.method Passed type argument boot::boot.ci(). Defaults \"perc\". allowed types \"perc\", \"basic\", \"bca\", \"norm\". support \"stud\" \"\". exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) boot object — tidy.boot","text":"weights provided boot function, estimate column included showing weighted bootstrap estimate, standard error estimate. original statistics \"boot\" object, call tsboot orig.t = FALSE, original statistic columns omitted, estimate std.error columns shown.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) boot object — tidy.boot","text":"tibble::tibble() columns: bias Bias statistic. std.error standard error regression term. term name regression term. statistic Original value statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) boot object — tidy.boot","text":"","code":"# load modeling library library(boot) #> #> Attaching package: ‘boot’ #> The following object is masked from ‘package:speedglm’: #> #> control #> The following object is masked from ‘package:robustbase’: #> #> salinity #> The following object is masked from ‘package:car’: #> #> logit #> The following object is masked from ‘package:survival’: #> #> aml clotting <- data.frame( u = c(5, 10, 15, 20, 30, 40, 60, 80, 100), lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18), lot2 = c(69, 35, 26, 21, 18, 16, 13, 12, 12) ) # fit models g1 <- glm(lot2 ~ log(u), data = clotting, family = Gamma) bootfun <- function(d, i) { coef(update(g1, data = d[i, ])) } bootres <- boot(clotting, bootfun, R = 999) # summarize model fits with tidiers tidy(g1, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) -0.0239 0.00133 -18.0 4.00e-7 -0.0265 -0.0213 #> 2 log(u) 0.0236 0.000577 40.9 1.36e-9 0.0225 0.0247 tidy(bootres, conf.int = TRUE) #> # A tibble: 2 × 6 #> term statistic bias std.error conf.low conf.high #> #> 1 (Intercept) -0.0239 -0.00171 0.00336 -0.0328 -0.0222 #> 2 log(u) 0.0236 0.000504 0.00107 0.0227 0.0265"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) btergm object — tidy.btergm","title":"Tidy a(n) btergm object — tidy.btergm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. method tidies coefficients bootstrapped temporal exponential random graph model estimated xergm. simply returns coefficients confidence intervals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) btergm object — tidy.btergm","text":"","code":"# S3 method for class 'btergm' tidy(x, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) btergm object — tidy.btergm","text":"x btergm::btergm() object. conf.level Confidence level confidence intervals. Defaults 0.95. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) btergm object — tidy.btergm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) btergm object — tidy.btergm","text":"","code":"library(btergm) #> Package: btergm #> Version: 1.10.12 #> Date: 2024-03-31 #> Authors: Philip Leifeld (University of Manchester) #> Skyler J. Cranmer (The Ohio State University) #> Bruce A. Desmarais (Pennsylvania State University) library(network) #> #> ‘network’ 1.18.2 (2023-12-04), part of the Statnet Project #> * ‘news(package=\"network\")’ for changes since last version #> * ‘citation(\"network\")’ for citation information #> * ‘https://statnet.org’ for help, support, and other information set.seed(5) # create 10 random networks with 10 actors networks <- list() for (i in 1:10) { mat <- matrix(rbinom(100, 1, .25), nrow = 10, ncol = 10) diag(mat) <- 0 nw <- network(mat) networks[[i]] <- nw } # create 10 matrices as covariates covariates <- list() for (i in 1:10) { mat <- matrix(rnorm(100), nrow = 10, ncol = 10) covariates[[i]] <- mat } # fit the model mod <- btergm(networks ~ edges + istar(2) + edgecov(covariates), R = 100) #> #> Initial dimensions of the network and covariates: #> t=1 t=2 t=3 t=4 t=5 t=6 t=7 t=8 t=9 t=10 #> networks (row) 10 10 10 10 10 10 10 10 10 10 #> networks (col) 10 10 10 10 10 10 10 10 10 10 #> covariates (row) 10 10 10 10 10 10 10 10 10 10 #> covariates (col) 10 10 10 10 10 10 10 10 10 10 #> #> All networks are conformable. #> #> Dimensions of the network and covariates after adjustment: #> t=1 t=2 t=3 t=4 t=5 t=6 t=7 t=8 t=9 t=10 #> networks (row) 10 10 10 10 10 10 10 10 10 10 #> networks (col) 10 10 10 10 10 10 10 10 10 10 #> covariates (row) 10 10 10 10 10 10 10 10 10 10 #> covariates (col) 10 10 10 10 10 10 10 10 10 10 #> #> Starting pseudolikelihood estimation with 100 bootstrapping replications on a single computing core... #> Done. # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 4 #> term estimate conf.low conf.high #> #> 1 edges -1.23 -1.37 -1.01 #> 2 istar2 0.0837 -0.0571 0.165 #> 3 edgecov.covariates[[i]] -0.0345 -0.177 0.112"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) cch object — tidy.cch","title":"Tidy a(n) cch object — tidy.cch","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) cch object — tidy.cch","text":"","code":"# S3 method for class 'cch' tidy(x, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) cch object — tidy.cch","text":"x cch object returned survival::cch(). conf.level confidence level CI ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) cch object — tidy.cch","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) cch object — tidy.cch","text":"","code":"# load libraries for models and data library(survival) # examples come from cch documentation subcoh <- nwtco$in.subcohort selccoh <- with(nwtco, rel == 1 | subcoh == 1) ccoh.data <- nwtco[selccoh, ] ccoh.data$subcohort <- subcoh[selccoh] # central-lab histology ccoh.data$histol <- factor(ccoh.data$histol, labels = c(\"FH\", \"UH\")) # tumour stage ccoh.data$stage <- factor(ccoh.data$stage, labels = c(\"I\", \"II\", \"III\", \"IV\")) ccoh.data$age <- ccoh.data$age / 12 # age in years # fit model fit.ccP <- cch(Surv(edrel, rel) ~ stage + histol + age, data = ccoh.data, subcoh = ~subcohort, id = ~seqno, cohort.size = 4028 ) # summarize model fit with tidiers + visualization tidy(fit.ccP) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 stageII 0.735 0.168 4.36 1.30e- 5 0.404 1.06 #> 2 stageIII 0.597 0.173 3.44 5.77e- 4 0.257 0.937 #> 3 stageIV 1.38 0.205 6.76 1.40e-11 0.983 1.79 #> 4 histolUH 1.50 0.160 9.38 0 1.19 1.81 #> 5 age 0.0433 0.0237 1.82 6.83e- 2 -0.00324 0.0898 # coefficient plot library(ggplot2) ggplot(tidy(fit.ccP), aes(x = estimate, y = term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) cld object — tidy.cld","title":"Tidy a(n) cld object — tidy.cld","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) cld object — tidy.cld","text":"","code":"# S3 method for class 'cld' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) cld object — tidy.cld","text":"x cld object created calling multcomp::cld() glht, confint.glht() summary.glht() object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) cld object — tidy.cld","text":"tibble::tibble() columns: contrast Levels compared. letters Compact letter display denoting pair-wise comparisons.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) cld object — tidy.cld","text":"","code":"# load libraries for models and data library(multcomp) #> Loading required package: mvtnorm #> #> Attaching package: ‘mvtnorm’ #> The following object is masked from ‘package:mclust’: #> #> dmvnorm #> Loading required package: TH.data #> #> Attaching package: ‘TH.data’ #> The following object is masked from ‘package:MASS’: #> #> geyser library(ggplot2) amod <- aov(breaks ~ wool + tension, data = warpbreaks) wht <- glht(amod, linfct = mcp(tension = \"Tukey\")) tidy(wht) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0336 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00110 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(wht, aes(lhs, estimate)) + geom_point() CI <- confint(wht) tidy(CI) #> # A tibble: 3 × 5 #> term contrast estimate conf.low conf.high #> #> 1 tension M - L -10 -19.4 -0.644 #> 2 tension H - L -14.7 -24.1 -5.37 #> 3 tension H - M -4.72 -14.1 4.63 ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + geom_pointrange() tidy(summary(wht)) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0335 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00108 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(mapping = aes(lhs, estimate)) + geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + geom_point(aes(size = p), data = summary(wht)) + scale_size(trans = \"reverse\") cld <- cld(wht) tidy(cld) #> # A tibble: 3 × 2 #> tension letters #> #> 1 L a #> 2 M b #> 3 H b"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) clm object — tidy.clm","title":"Tidy a(n) clm object — tidy.clm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) clm object — tidy.clm","text":"","code":"# S3 method for class 'clm' tidy( x, conf.int = FALSE, conf.level = 0.95, conf.type = c(\"profile\", \"Wald\"), exponentiate = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) clm object — tidy.clm","text":"x clm object returned ordinal::clm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. conf.type Whether use \"profile\" \"Wald\" confidence intervals, passed type argument ordinal::confint.clm(). Defaults \"profile\". exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) clm object — tidy.clm","text":"broom 0.7.0 coefficient_type column renamed coef.type, contents changed well. Note intercept type coefficients correspond alpha parameters, location type coefficients correspond beta parameters, scale type coefficients correspond zeta parameters.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) clm object — tidy.clm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) clm object — tidy.clm","text":"","code":"# load libraries for models and data library(ordinal) # fit model fit <- clm(rating ~ temp * contact, data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 7 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 intercept #> 5 tempwarm 2.32 0.701 3.31 9.28e- 4 location #> 6 contactyes 1.35 0.660 2.04 4.13e- 2 location #> 7 tempwarm:contactyes 0.360 0.924 0.389 6.97e- 1 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 NA NA intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 NA NA intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 NA NA intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 NA NA intercept #> 5 temp… 2.32 0.701 3.31 9.28e- 4 1.20 3.52 location #> 6 cont… 1.35 0.660 2.04 4.13e- 2 0.284 2.47 location #> 7 temp… 0.360 0.924 0.389 6.97e- 1 -1.17 1.89 location tidy(fit, conf.int = TRUE, conf.type = \"Wald\", exponentiate = TRUE) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.244 0.545 -2.59 9.66e- 3 0.0837 0.710 intercept #> 2 2|3 3.14 0.510 2.24 2.48e- 2 1.16 8.52 intercept #> 3 3|4 29.3 0.638 5.29 1.21e- 7 8.38 102. intercept #> 4 4|5 140. 0.751 6.58 4.66e-11 32.1 610. intercept #> 5 temp… 10.2 0.701 3.31 9.28e- 4 2.58 40.2 location #> 6 cont… 3.85 0.660 2.04 4.13e- 2 1.05 14.0 location #> 7 temp… 1.43 0.924 0.389 6.97e- 1 0.234 8.76 location glance(fit) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 7 187. 203. -86.4162 65 72 augment(fit, type.predict = \"prob\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 0.562 #> 2 3 cold no 0.209 #> 3 3 cold yes 0.435 #> 4 4 cold yes 0.0894 #> 5 4 warm no 0.190 #> 6 4 warm no 0.190 #> 7 5 warm yes 0.286 #> 8 5 warm yes 0.286 #> 9 1 cold no 0.196 #> 10 2 cold no 0.562 #> # ℹ 62 more rows augment(fit, type.predict = \"class\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 2 #> 2 3 cold no 2 #> 3 3 cold yes 3 #> 4 4 cold yes 3 #> 5 4 warm no 3 #> 6 4 warm no 3 #> 7 5 warm yes 4 #> 8 5 warm yes 4 #> 9 1 cold no 2 #> 10 2 cold no 2 #> # ℹ 62 more rows # ...and again with another model specification fit2 <- clm(rating ~ temp, nominal = ~contact, data = wine) tidy(fit2) #> # A tibble: 9 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2.(Intercept) -1.32 0.562 -2.35 0.0186 intercept #> 2 2|3.(Intercept) 1.25 0.475 2.63 0.00866 intercept #> 3 3|4.(Intercept) 3.55 0.656 5.41 0.0000000625 intercept #> 4 4|5.(Intercept) 4.66 0.860 5.42 0.0000000608 intercept #> 5 1|2.contactyes -1.62 1.16 -1.39 0.164 intercept #> 6 2|3.contactyes -1.51 0.591 -2.56 0.0105 intercept #> 7 3|4.contactyes -1.67 0.649 -2.58 0.00985 intercept #> 8 4|5.contactyes -1.05 0.897 -1.17 0.241 intercept #> 9 tempwarm 2.52 0.535 4.71 0.00000250 location glance(fit2) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 9 190. 211. -86.20855 63 72"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) clmm object — tidy.clmm","title":"Tidy a(n) clmm object — tidy.clmm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) clmm object — tidy.clmm","text":"","code":"# S3 method for class 'clmm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) clmm object — tidy.clmm","text":"x clmm object returned ordinal::clmm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Tidy a(n) clmm object — tidy.clmm","text":"broom 0.7.0 coefficient_type column renamed coef.type, contents changed well. Note intercept type coefficients correspond alpha parameters, location type coefficients correspond beta parameters, scale type coefficients correspond zeta parameters.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) clmm object — tidy.clmm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) clmm object — tidy.clmm","text":"","code":"# load libraries for models and data library(ordinal) # fit model fit <- clmm(rating ~ temp + contact + (1 | judge), data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 6 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.62 0.682 -2.38 1.74e- 2 intercept #> 2 2|3 1.51 0.604 2.51 1.22e- 2 intercept #> 3 3|4 4.23 0.809 5.23 1.72e- 7 intercept #> 4 4|5 6.09 0.972 6.26 3.82e-10 intercept #> 5 tempwarm 3.06 0.595 5.14 2.68e- 7 location #> 6 contactyes 1.83 0.513 3.58 3.44e- 4 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 6 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.62 0.682 -2.38 1.74e- 2 -2.75 -0.501 intercept #> 2 2|3 1.51 0.604 2.51 1.22e- 2 0.520 2.51 intercept #> 3 3|4 4.23 0.809 5.23 1.72e- 7 2.90 5.56 intercept #> 4 4|5 6.09 0.972 6.26 3.82e-10 4.49 7.69 intercept #> 5 temp… 3.06 0.595 5.14 2.68e- 7 2.08 4.04 location #> 6 cont… 1.83 0.513 3.58 3.44e- 4 0.992 2.68 location tidy(fit, conf.int = TRUE, exponentiate = TRUE) #> # A tibble: 6 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.197 0.682 -2.38 1.74e- 2 0.0518 0.751 intercept #> 2 2|3 4.54 0.604 2.51 1.22e- 2 1.39 14.8 intercept #> 3 3|4 68.6 0.809 5.23 1.72e- 7 14.1 335. intercept #> 4 4|5 441. 0.972 6.26 3.82e-10 65.5 2965. intercept #> 5 temp… 21.4 0.595 5.14 2.68e- 7 6.66 68.7 location #> 6 cont… 6.26 0.513 3.58 3.44e- 4 2.29 17.1 location glance(fit) #> # A tibble: 1 × 5 #> edf AIC BIC logLik nobs #> #> 1 7 177. 193. -81.56541 72 # ...and again with another model specification fit2 <- clmm(rating ~ temp + (1 | judge), nominal = ~contact, data = wine) #> Warning: unrecognized control elements named ‘nominal’ ignored tidy(fit2) #> # A tibble: 5 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -2.20 0.613 -3.59 0.000333 intercept #> 2 2|3 0.545 0.476 1.15 0.252 intercept #> 3 3|4 2.84 0.607 4.68 0.00000291 intercept #> 4 4|5 4.48 0.751 5.96 0.00000000256 intercept #> 5 tempwarm 2.67 0.554 4.81 0.00000147 location glance(fit2) #> # A tibble: 1 × 5 #> edf AIC BIC logLik nobs #> #> 1 6 189. 203. -88.73882 72"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) coeftest object — tidy.coeftest","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"","code":"# S3 method for class 'coeftest' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"x coeftest object returned lmtest::coeftest(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"","code":"# load libraries for models and data library(lmtest) m <- lm(dist ~ speed, data = cars) coeftest(m) #> #> t test of coefficients: #> #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) -17.57909 6.75844 -2.6011 0.01232 * #> speed 3.93241 0.41551 9.4640 1.49e-12 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> tidy(coeftest(m)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 #> 2 speed 3.93 0.416 9.46 1.49e-12 tidy(coeftest(m, conf.int = TRUE)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 #> 2 speed 3.93 0.416 9.46 1.49e-12 # a very common workflow is to combine lmtest::coeftest with alternate # variance-covariance matrices via the sandwich package. The lmtest # tidiers support this workflow too, enabling you to adjust the standard # errors of your tidied models on the fly. library(sandwich) # \"HC3\" (default) robust SEs tidy(coeftest(m, vcov = vcovHC)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 5.93 -2.96 4.72e- 3 #> 2 speed 3.93 0.428 9.20 3.64e-12 # \"HC2\" robust SEs tidy(coeftest(m, vcov = vcovHC, type = \"HC2\")) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 5.73 -3.07 3.55e- 3 #> 2 speed 3.93 0.413 9.53 1.21e-12 # N-W HAC robust SEs tidy(coeftest(m, vcov = NeweyWest)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 7.02 -2.50 0.0157 #> 2 speed 3.93 0.551 7.14 0.00000000453 # the columns of the returned tibble for glance.coeftest() will vary # depending on whether the coeftest object retains the underlying model. # Users can control this with the \"save = TRUE\" argument of coeftest(). glance(coeftest(m)) #> # A tibble: 1 × 4 #> logLik AIC BIC nobs #> #> 1 -206.578 419. 425. 50 glance(coeftest(m, save = TRUE)) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.651 0.644 15.4 89.6 1.49e-12 1 -207. 419. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) confint.glht object — tidy.confint.glht","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"","code":"# S3 method for class 'confint.glht' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"x confint.glht object created calling multcomp::confint.glht() glht object created multcomp::glht(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. contrast Levels compared. estimate estimated value regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"","code":"# load libraries for models and data library(multcomp) library(ggplot2) amod <- aov(breaks ~ wool + tension, data = warpbreaks) wht <- glht(amod, linfct = mcp(tension = \"Tukey\")) tidy(wht) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0337 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00118 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(wht, aes(lhs, estimate)) + geom_point() CI <- confint(wht) tidy(CI) #> # A tibble: 3 × 5 #> term contrast estimate conf.low conf.high #> #> 1 tension M - L -10 -19.4 -0.647 #> 2 tension H - L -14.7 -24.1 -5.37 #> 3 tension H - M -4.72 -14.1 4.63 ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + geom_pointrange() tidy(summary(wht)) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0336 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00112 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(mapping = aes(lhs, estimate)) + geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + geom_point(aes(size = p), data = summary(wht)) + scale_size(trans = \"reverse\") cld <- cld(wht) tidy(cld) #> # A tibble: 3 × 2 #> tension letters #> #> 1 L a #> 2 M b #> 3 H b"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"","code":"# S3 method for class 'confusionMatrix' tidy(x, by_class = TRUE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"x object class confusionMatrix created call caret::confusionMatrix(). by_class Logical indicating whether show performance measures broken class. Defaults TRUE. by_class = FALSE returns tibble accuracy, kappa, McNemar statistics. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"tibble::tibble() columns: class class consideration. conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. term name regression term. p.value P-value accuracy kappa statistics.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"","code":"# load libraries for models and data library(caret) #> Loading required package: lattice #> #> Attaching package: ‘lattice’ #> The following object is masked from ‘package:boot’: #> #> melanoma #> #> Attaching package: ‘caret’ #> The following object is masked from ‘package:survival’: #> #> cluster #> The following object is masked from ‘package:purrr’: #> #> lift set.seed(27) # generate data two_class_sample1 <- as.factor(sample(letters[1:2], 100, TRUE)) two_class_sample2 <- as.factor(sample(letters[1:2], 100, TRUE)) two_class_cm <- confusionMatrix( two_class_sample1, two_class_sample2 ) # summarize model fit with tidiers tidy(two_class_cm) #> # A tibble: 14 × 6 #> term class estimate conf.low conf.high p.value #> #> 1 accuracy NA 0.52 0.418 0.621 0.619 #> 2 kappa NA 0.0295 NA NA NA #> 3 mcnemar NA NA NA NA 0.470 #> 4 sensitivity a 0.604 NA NA NA #> 5 specificity a 0.426 NA NA NA #> 6 pos_pred_value a 0.542 NA NA NA #> 7 neg_pred_value a 0.488 NA NA NA #> 8 precision a 0.542 NA NA NA #> 9 recall a 0.604 NA NA NA #> 10 f1 a 0.571 NA NA NA #> 11 prevalence a 0.53 NA NA NA #> 12 detection_rate a 0.32 NA NA NA #> 13 detection_prevalence a 0.59 NA NA NA #> 14 balanced_accuracy a 0.515 NA NA NA tidy(two_class_cm, by_class = FALSE) #> # A tibble: 3 × 5 #> term estimate conf.low conf.high p.value #> #> 1 accuracy 0.52 0.418 0.621 0.619 #> 2 kappa 0.0295 NA NA NA #> 3 mcnemar NA NA NA 0.470 # multiclass example six_class_sample1 <- as.factor(sample(letters[1:6], 100, TRUE)) six_class_sample2 <- as.factor(sample(letters[1:6], 100, TRUE)) six_class_cm <- confusionMatrix( six_class_sample1, six_class_sample2 ) # summarize model fit with tidiers tidy(six_class_cm) #> # A tibble: 69 × 6 #> term class estimate conf.low conf.high p.value #> #> 1 accuracy NA 0.2 0.127 0.292 0.795 #> 2 kappa NA 0.0351 NA NA NA #> 3 mcnemar NA NA NA NA 0.873 #> 4 sensitivity a 0.2 NA NA NA #> 5 specificity a 0.888 NA NA NA #> 6 pos_pred_value a 0.308 NA NA NA #> 7 neg_pred_value a 0.816 NA NA NA #> 8 precision a 0.308 NA NA NA #> 9 recall a 0.2 NA NA NA #> 10 f1 a 0.242 NA NA NA #> # ℹ 59 more rows tidy(six_class_cm, by_class = FALSE) #> # A tibble: 3 × 5 #> term estimate conf.low conf.high p.value #> #> 1 accuracy 0.2 0.127 0.292 0.795 #> 2 kappa 0.0351 NA NA NA #> 3 mcnemar NA NA NA 0.873"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) coxph object — tidy.coxph","title":"Tidy a(n) coxph object — tidy.coxph","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) coxph object — tidy.coxph","text":"","code":"# S3 method for class 'coxph' tidy(x, exponentiate = FALSE, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) coxph object — tidy.coxph","text":"x coxph object returned survival::coxph(). exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... tidy(), additional arguments passed summary(x, ...). Otherwise ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) coxph object — tidy.coxph","text":"tibble::tibble() columns: estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) coxph object — tidy.coxph","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) # summarize model fit with tidiers tidy(cfit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 0.0170 0.00922 1.85 0.0646 #> 2 sex -0.513 0.167 -3.06 0.00218 tidy(cfit, exponentiate = TRUE) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 1.02 0.00922 1.85 0.0646 #> 2 sex 0.599 0.167 -3.06 0.00218 lp <- augment(cfit, lung) risks <- augment(cfit, lung, type.predict = \"risk\") expected <- augment(cfit, lung, type.predict = \"expected\") glance(cfit) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 228 165 14.1 0.000857 13.7 0.00105 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs # also works on clogit models resp <- levels(logan$occupation) n <- nrow(logan) indx <- rep(1:n, length(resp)) logan2 <- data.frame( logan[indx, ], id = indx, tocc = factor(rep(resp, each = n)) ) logan2$case <- (logan2$occupation == logan2$tocc) cl <- clogit(case ~ tocc + tocc:education + strata(id), logan2) tidy(cl) #> # A tibble: 9 × 5 #> term estimate std.error statistic p.value #> #> 1 toccfarm -1.90 1.38 -1.37 1.70e- 1 #> 2 toccoperatives 1.17 0.566 2.06 3.91e- 2 #> 3 toccprofessional -8.10 0.699 -11.6 4.45e-31 #> 4 toccsales -5.03 0.770 -6.53 6.54e-11 #> 5 tocccraftsmen:education -0.332 0.0569 -5.84 5.13e- 9 #> 6 toccfarm:education -0.370 0.116 -3.18 1.47e- 3 #> 7 toccoperatives:education -0.422 0.0584 -7.23 4.98e-13 #> 8 toccprofessional:education 0.278 0.0510 5.45 4.94e- 8 #> 9 toccsales:education NA 0 NA NA glance(cl) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 4190 838 666. 1.90e-138 682. 5.01e-142 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs library(ggplot2) ggplot(lp, aes(age, .fitted, color = sex)) + geom_point() ggplot(risks, aes(age, .fitted, color = sex)) + geom_point() ggplot(expected, aes(time, .fitted, color = sex)) + geom_point()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) cmprsk object — tidy.crr","title":"Tidy a(n) cmprsk object — tidy.crr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) cmprsk object — tidy.crr","text":"","code":"# S3 method for class 'crr' tidy(x, exponentiate = FALSE, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) cmprsk object — tidy.crr","text":"x crr object returned cmprsk::crr(). exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) cmprsk object — tidy.crr","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) cmprsk object — tidy.crr","text":"","code":"library(cmprsk) # time to loco-regional failure (lrf) lrf_time <- rexp(100) lrf_event <- sample(0:2, 100, replace = TRUE) trt <- sample(0:1, 100, replace = TRUE) strt <- sample(1:2, 100, replace = TRUE) # fit model x <- crr(lrf_time, lrf_event, cbind(trt, strt)) # summarize model fit with tidiers tidy(x, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 trt -0.467 0.362 -1.29 0.2 -1.18 0.242 #> 2 strt 0.237 0.360 0.660 0.51 -0.468 0.943 glance(x) #> # A tibble: 1 × 5 #> converged logLik nobs df statistic #> #> 1 TRUE -125. 100 2 2.03"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"","code":"# S3 method for class 'cv.glmnet' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"x cv.glmnet object returned glmnet::cv.glmnet(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"tibble::tibble() columns: lambda Value penalty parameter lambda. nzero Number non-zero coefficients given lambda. std.error standard error regression term. conf.low lower bound confidence interval cross-validation estimated loss. conf.high upper bound confidence interval cross-validation estimated loss. estimate Median loss across cross-validation folds given lamdba","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"","code":"# load libraries for models and data library(glmnet) set.seed(27) nobs <- 100 nvar <- 50 real <- 5 x <- matrix(rnorm(nobs * nvar), nobs, nvar) beta <- c(rnorm(real, 0, 1), rep(0, nvar - real)) y <- c(t(beta) %*% t(x)) + rnorm(nvar, sd = 3) cvfit1 <- cv.glmnet(x, y) tidy(cvfit1) #> # A tibble: 74 × 6 #> lambda estimate std.error conf.low conf.high nzero #> #> 1 1.45 17.4 2.28 15.1 19.7 0 #> 2 1.32 17.4 2.28 15.1 19.7 1 #> 3 1.20 17.2 2.22 15.0 19.5 1 #> 4 1.09 17.0 2.15 14.8 19.1 1 #> 5 0.997 16.8 2.09 14.7 18.9 1 #> 6 0.909 16.7 2.03 14.7 18.7 2 #> 7 0.828 16.7 1.99 14.7 18.6 3 #> 8 0.754 16.7 1.95 14.7 18.6 5 #> 9 0.687 16.8 1.93 14.8 18.7 7 #> 10 0.626 16.9 1.91 15.0 18.8 7 #> # ℹ 64 more rows glance(cvfit1) #> # A tibble: 1 × 3 #> lambda.min lambda.1se nobs #> #> 1 0.828 1.45 100 library(ggplot2) tidied_cv <- tidy(cvfit1) glance_cv <- glance(cvfit1) # plot of MSE as a function of lambda g <- ggplot(tidied_cv, aes(lambda, estimate)) + geom_line() + scale_x_log10() g # plot of MSE as a function of lambda with confidence ribbon g <- g + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25) g # plot of MSE as a function of lambda with confidence ribbon and choices # of minimum lambda marked g <- g + geom_vline(xintercept = glance_cv$lambda.min) + geom_vline(xintercept = glance_cv$lambda.1se, lty = 2) g # plot of number of zeros for each choice of lambda ggplot(tidied_cv, aes(lambda, nzero)) + geom_line() + scale_x_log10() # coefficient plot with min lambda shown tidied <- tidy(cvfit1$glmnet.fit) ggplot(tidied, aes(lambda, estimate, group = term)) + scale_x_log10() + geom_line() + geom_vline(xintercept = glance_cv$lambda.min) + geom_vline(xintercept = glance_cv$lambda.1se, lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.density.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Tidy density objects — tidy.density","title":"(Deprecated) Tidy density objects — tidy.density","text":"(Deprecated) Tidy density objects","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.density.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Tidy density objects — tidy.density","text":"","code":"# S3 method for class 'density' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.density.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Tidy density objects — tidy.density","text":"x density object returned stats::density(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.density.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Tidy density objects — tidy.density","text":"tibble::tibble two columns: points x density estimated, estimated density y.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Tidy dist objects — tidy.dist","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"(Deprecated) Tidy dist objects","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"","code":"# S3 method for class 'dist' tidy(x, diagonal = attr(x, \"Diag\"), upper = attr(x, \"Upper\"), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"x dist object returned stats::dist(). diagonal Logical indicating whether tidy diagonal elements distance matrix. Defaults whatever based diag argument stats::dist(). upper Logical indicating whether tidy upper half distance matrix. Defaults whatever based upper argument stats::dist(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"tibble::tibble one row pair items distance matrix, columns: item1 First item item2 Second item distance Distance items","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"distance matrix include upper triangle /diagonal, tidied version either.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"","code":"cars_dist <- dist(t(mtcars[, 1:4])) cars_dist #> mpg cyl disp #> cyl 89.32586 #> disp 1391.49546 1441.25177 #> hp 824.37547 878.17652 656.64044 tidy(cars_dist) #> # A tibble: 6 × 3 #> item1 item2 distance #> #> 1 mpg cyl 89.3 #> 2 mpg disp 1391. #> 3 mpg hp 824. #> 4 cyl disp 1441. #> 5 cyl hp 878. #> 6 disp hp 657. tidy(cars_dist, upper = TRUE) #> # A tibble: 12 × 3 #> item1 item2 distance #> #> 1 mpg cyl 89.3 #> 2 mpg disp 1391. #> 3 mpg hp 824. #> 4 cyl mpg 89.3 #> 5 cyl disp 1441. #> 6 cyl hp 878. #> 7 disp mpg 1391. #> 8 disp cyl 1441. #> 9 disp hp 657. #> 10 hp mpg 824. #> 11 hp cyl 878. #> 12 hp disp 657. tidy(cars_dist, diagonal = TRUE) #> # A tibble: 10 × 3 #> item1 item2 distance #> #> 1 mpg mpg 0 #> 2 mpg cyl 89.3 #> 3 mpg disp 1391. #> 4 mpg hp 824. #> 5 cyl cyl 0 #> 6 cyl disp 1441. #> 7 cyl hp 878. #> 8 disp disp 0 #> 9 disp hp 657. #> 10 hp hp 0"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) drc object — tidy.drc","title":"Tidy a(n) drc object — tidy.drc","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) drc object — tidy.drc","text":"","code":"# S3 method for class 'drc' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) drc object — tidy.drc","text":"x drc object produced call drc::drm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) drc object — tidy.drc","text":"tibble one row curve term regression. curveid column indicates curve.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) drc object — tidy.drc","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. curve Index identifying curve.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) drc object — tidy.drc","text":"","code":"# load libraries for models and data library(drc) # fit model mod <- drm(dead / total ~ conc, type, weights = total, data = selenium, fct = LL.2(), type = \"binomial\" ) # summarize model fit with tidiers tidy(mod) #> # A tibble: 8 × 6 #> term curve estimate std.error statistic p.value #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 #> 5 e 1 252. 13.8 18.2 1.16e-74 #> 6 e 2 378. 39.4 9.61 3.53e-22 #> 7 e 3 120. 5.91 20.3 1.14e-91 #> 8 e 4 88.8 8.62 10.3 3.28e-25 tidy(mod, conf.int = TRUE) #> # A tibble: 8 × 8 #> term curve estimate std.error statistic p.value conf.low conf.high #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 -1.81 -1.20 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 -1.12 -0.571 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 -2.43 -1.89 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 -1.78 -1.12 #> 5 e 1 252. 13.8 18.2 1.16e-74 225. 279. #> 6 e 2 378. 39.4 9.61 3.53e-22 301. 456. #> 7 e 3 120. 5.91 20.3 1.14e-91 108. 131. #> 8 e 4 88.8 8.62 10.3 3.28e-25 71.9 106. glance(mod) #> # A tibble: 1 × 4 #> AIC BIC logLik df.residual #> #> 1 768. 778. -376.2099 17 augment(mod, selenium) #> # A tibble: 25 × 7 #> type conc total dead .fitted .resid .cooksd #> #> 1 1 0 151 3 0 0.0199 0 #> 2 1 100 146 40 0.199 0.0748 0.0000909 #> 3 1 200 116 31 0.414 -0.146 0.000104 #> 4 1 300 159 85 0.565 -0.0302 0.00000516 #> 5 1 400 150 102 0.667 0.0133 0.00000220 #> 6 1 500 140 112 0.737 0.0633 0.0000720 #> 7 2 0 141 2 0 0.0142 0 #> 8 2 100 153 30 0.246 -0.0495 0.000168 #> 9 2 200 142 59 0.369 0.0468 0.0000347 #> 10 2 300 139 82 0.451 0.139 0.0000430 #> # ℹ 15 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) emmGrid object — tidy.emmGrid","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"","code":"# S3 method for class 'emmGrid' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"x emmGrid object. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid(). Cautionary note: misspecified arguments may silently ignored!","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"Returns data frame one observation estimated marginal mean, one column combination factors. input contrast, row contain one estimated contrast. large number arguments can passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. df Degrees freedom used term model. p.value two-sided p-value associated observed statistic. std.error standard error regression term. estimate Expected marginal mean statistic T-ratio statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"","code":"# load libraries for models and data library(emmeans) #> Welcome to emmeans. #> Caution: You lose important information if you filter this package's results. #> See '? untidy' # linear model for sales of oranges per day oranges_lm1 <- lm(sales1 ~ price1 + price2 + day + store, data = oranges) # reference grid; see vignette(\"basics\", package = \"emmeans\") oranges_rg1 <- ref_grid(oranges_lm1) td <- tidy(oranges_rg1) td #> # A tibble: 36 × 9 #> price1 price2 day store estimate std.error df statistic p.value #> #> 1 51.2 48.6 1 1 2.92 2.72 23 1.07 0.294 #> 2 51.2 48.6 2 1 3.85 2.70 23 1.42 0.168 #> 3 51.2 48.6 3 1 11.0 2.53 23 4.35 0.000237 #> 4 51.2 48.6 4 1 6.10 2.65 23 2.30 0.0309 #> 5 51.2 48.6 5 1 12.8 2.44 23 5.23 0.0000261 #> 6 51.2 48.6 6 1 8.75 2.79 23 3.14 0.00459 #> 7 51.2 48.6 1 2 4.96 2.38 23 2.09 0.0482 #> 8 51.2 48.6 2 2 5.89 2.34 23 2.52 0.0190 #> 9 51.2 48.6 3 2 13.1 2.42 23 5.41 0.0000172 #> 10 51.2 48.6 4 2 8.14 2.35 23 3.46 0.00212 #> # ℹ 26 more rows # marginal averages marginal <- emmeans(oranges_rg1, \"day\") tidy(marginal) #> # A tibble: 6 × 6 #> day estimate std.error df statistic p.value #> #> 1 1 5.56 1.77 23 3.15 0.00451 #> 2 2 6.49 1.73 23 3.76 0.00103 #> 3 3 13.7 1.75 23 7.80 0.0000000658 #> 4 4 8.74 1.73 23 5.04 0.0000420 #> 5 5 15.4 1.79 23 8.65 0.0000000110 #> 6 6 11.4 1.77 23 6.45 0.00000140 # contrasts tidy(contrast(marginal)) #> # A tibble: 6 × 8 #> term contrast null.value estimate std.error df statistic adj.p.value #> #> 1 day day1 ef… 0 -4.65 1.62 23 -2.87 0.0261 #> 2 day day2 ef… 0 -3.72 1.58 23 -2.36 0.0547 #> 3 day day3 ef… 0 3.45 1.60 23 2.15 0.0637 #> 4 day day4 ef… 0 -1.47 1.59 23 -0.930 0.434 #> 5 day day5 ef… 0 5.22 1.64 23 3.18 0.0249 #> 6 day day6 ef… 0 1.18 1.62 23 0.726 0.475 tidy(contrast(marginal, method = \"pairwise\")) #> # A tibble: 15 × 8 #> term contrast null.value estimate std.error df statistic #> #> 1 day day1 - day2 0 -0.930 2.47 23 -0.377 #> 2 day day1 - day3 0 -8.10 2.47 23 -3.29 #> 3 day day1 - day4 0 -3.18 2.51 23 -1.27 #> 4 day day1 - day5 0 -9.88 2.56 23 -3.86 #> 5 day day1 - day6 0 -5.83 2.52 23 -2.31 #> 6 day day2 - day3 0 -7.17 2.48 23 -2.89 #> 7 day day2 - day4 0 -2.25 2.44 23 -0.920 #> 8 day day2 - day5 0 -8.95 2.52 23 -3.56 #> 9 day day2 - day6 0 -4.90 2.45 23 -2.00 #> 10 day day3 - day4 0 4.92 2.49 23 1.98 #> 11 day day3 - day5 0 -1.78 2.47 23 -0.719 #> 12 day day3 - day6 0 2.27 2.54 23 0.894 #> 13 day day4 - day5 0 -6.70 2.49 23 -2.69 #> 14 day day4 - day6 0 -2.65 2.45 23 -1.08 #> 15 day day5 - day6 0 4.05 2.56 23 1.58 #> # ℹ 1 more variable: adj.p.value # plot confidence intervals library(ggplot2) ggplot(tidy(marginal, conf.int = TRUE), aes(day, estimate)) + geom_point() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # by multiple prices by_price <- emmeans(oranges_lm1, \"day\", by = \"price2\", at = list( price1 = 50, price2 = c(40, 60, 80), day = c(\"2\", \"3\", \"4\") ) ) by_price #> price2 = 40: #> day emmean SE df lower.CL upper.CL #> 2 6.24 1.89 23 2.33 10.1 #> 3 13.41 2.12 23 9.02 17.8 #> 4 8.48 1.87 23 4.62 12.3 #> #> price2 = 60: #> day emmean SE df lower.CL upper.CL #> 2 9.21 2.11 23 4.85 13.6 #> 3 16.38 1.91 23 12.44 20.3 #> 4 11.46 2.18 23 6.96 16.0 #> #> price2 = 80: #> day emmean SE df lower.CL upper.CL #> 2 12.19 3.65 23 4.65 19.7 #> 3 19.36 3.27 23 12.59 26.1 #> 4 14.44 3.74 23 6.71 22.2 #> #> Results are averaged over the levels of: store #> Confidence level used: 0.95 tidy(by_price) #> # A tibble: 9 × 7 #> day price2 estimate std.error df statistic p.value #> #> 1 2 40 6.24 1.89 23 3.30 0.00310 #> 2 3 40 13.4 2.12 23 6.33 0.00000187 #> 3 4 40 8.48 1.87 23 4.55 0.000145 #> 4 2 60 9.21 2.11 23 4.37 0.000225 #> 5 3 60 16.4 1.91 23 8.60 0.0000000122 #> 6 4 60 11.5 2.18 23 5.26 0.0000244 #> 7 2 80 12.2 3.65 23 3.34 0.00282 #> 8 3 80 19.4 3.27 23 5.91 0.00000502 #> 9 4 80 14.4 3.74 23 3.86 0.000788 ggplot(tidy(by_price, conf.int = TRUE), aes(price2, estimate, color = day)) + geom_line() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # joint_tests tidy(joint_tests(oranges_lm1)) #> # A tibble: 4 × 5 #> term num.df den.df statistic p.value #> #> 1 price1 1 23 30.3 0.0000134 #> 2 price2 1 23 2.23 0.149 #> 3 day 5 23 4.88 0.00346 #> 4 store 5 23 2.52 0.0583"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"","code":"# S3 method for class 'epi.2by2' tidy(x, parameters = c(\"moa\", \"stat\"), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"x epi.2by2 object produced call epiR::epi.2by2() parameters Return measures association (moa) test statistics (stat), default moa (measures association) ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"tibble column measures association tests contained massoc massoc.detail epiR::epi.2by2() called.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. df Degrees freedom used term model. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. term name regression term. estimate Estimated measure association","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"","code":"# load libraries for models and data library(epiR) #> Package epiR 2.0.76 is loaded #> Type help(epi.about) for summary information #> Type browseVignettes(package = 'epiR') to learn how to use epiR for applied epidemiological analyses #> # generate data dat <- matrix(c(13, 2163, 5, 3349), nrow = 2, byrow = TRUE) rownames(dat) <- c(\"DF+\", \"DF-\") colnames(dat) <- c(\"FUS+\", \"FUS-\") # fit model fit <- epi.2by2( dat = as.table(dat), method = \"cross.sectional\", conf.level = 0.95, units = 100, outcome = \"as.columns\" ) # summarize model fit with tidiers tidy(fit, parameters = \"moa\") #> # A tibble: 15 × 4 #> term estimate conf.low conf.high #> #> 1 PR.strata.wald 4.01 1.43 11.2 #> 2 PR.strata.taylor 4.01 1.43 11.2 #> 3 PR.strata.score 1.84 1.25 2.24 #> 4 OR.strata.wald 4.03 1.43 11.3 #> 5 OR.strata.cfield 4.03 NA NA #> 6 OR.strata.score 4.03 1.49 10.9 #> 7 OR.strata.mle 4.02 1.34 14.4 #> 8 ARisk.strata.wald 0.448 0.0992 0.797 #> 9 ARisk.strata.score 0.448 0.142 0.882 #> 10 NNT.strata.wald 223. 125. 1008. #> 11 NNT.strata.score 223. 113. 705. #> 12 PARisk.strata.wald 0.176 -0.0225 0.375 #> 13 PARisk.strata.piri 0.176 0.0389 0.314 #> 14 AFRisk.strata.wald 0.750 0.301 0.911 #> 15 PAFRisk.strata.wald 0.542 0.0361 0.782 tidy(fit, parameters = \"stat\") #> # A tibble: 3 × 4 #> term statistic df p.value #> #> 1 chi2.strata.uncor 8.18 1 0.00424 #> 2 chi2.strata.yates 6.85 1 0.00885 #> 3 chi2.strata.fisher NA NA 0.00635"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ergm object — tidy.ergm","title":"Tidy a(n) ergm object — tidy.ergm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. methods work model conforms ergm class, produced weighted networks ergm.count package.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ergm object — tidy.ergm","text":"","code":"# S3 method for class 'ergm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ergm object — tidy.ergm","text":"x ergm object returned call ergm::ergm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments pass ergm::summary(). Cautionary note: Misspecified arguments may silently ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ergm object — tidy.ergm","text":"tibble::tibble one row coefficient exponential random graph model, columns: term term model estimated tested estimate estimated coefficient std.error standard error mcmc.error MCMC error p.value two-sided p-value","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tidy a(n) ergm object — tidy.ergm","text":"Hunter DR, Handcock MS, Butts CT, Goodreau SM, Morris M (2008b). ergm: Package Fit, Simulate Diagnose Exponential-Family Models Networks. Journal Statistical Software, 24(3). https://www.jstatsoft.org/v24/i03/.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ergm object — tidy.ergm","text":"","code":"# load libraries for models and data library(ergm) #> #> ‘ergm’ 4.7.1 (2024-10-07), part of the Statnet Project #> * ‘news(package=\"ergm\")’ for changes since last version #> * ‘citation(\"ergm\")’ for citation information #> * ‘https://statnet.org’ for help, support, and other information #> ‘ergm’ 4 is a major update that introduces some #> backwards-incompatible changes. Please type #> ‘news(package=\"ergm\")’ for a list of major changes. #> #> Attaching package: ‘ergm’ #> The following object is masked from ‘package:btergm’: #> #> gof # load the Florentine marriage network data data(florentine) # fit a model where the propensity to form ties between # families depends on the absolute difference in wealth gest <- ergm(flomarriage ~ edges + absdiff(\"wealth\")) #> Starting maximum pseudolikelihood estimation (MPLE): #> Obtaining the responsible dyads. #> Evaluating the predictor and response matrix. #> Maximizing the pseudolikelihood. #> Finished MPLE. #> Evaluating log-likelihood at the estimate. #> # show terms, coefficient estimates and errors tidy(gest) #> # A tibble: 2 × 6 #> term estimate std.error mcmc.error statistic p.value #> #> 1 edges -2.30 0.402 0 -5.73 0.0000000102 #> 2 absdiff.wealth 0.0155 0.00616 0 2.52 0.0117 # show coefficients as odds ratios with a 99% CI tidy(gest, exponentiate = TRUE, conf.int = TRUE, conf.level = 0.99) #> Warning: Coefficients will be exponentiated, but the model didn't use a `log` or #> `logit` link. #> # A tibble: 2 × 8 #> term estimate std.error mcmc.error statistic p.value conf.low conf.high #> #> 1 edges 0.100 0.402 0 -5.73 1.02e-8 0.0355 0.282 #> 2 absd… 1.02 0.00616 0 2.52 1.17e-2 1.00 1.03 # take a look at likelihood measures and other # control parameters used during MCMC estimation glance(gest) #> # A tibble: 1 × 5 #> independence iterations logLik AIC BIC #> #> 1 TRUE 4 -51.0 106. 112. glance(gest, deviance = TRUE) #> # A tibble: 1 × 9 #> independence iterations logLik null.deviance df.null residual.deviance #> #> 1 TRUE 4 -51.0 166.3553 120 102. #> # ℹ 3 more variables: df.residual , AIC , BIC glance(gest, mcmc = TRUE) #> Though `glance()` was supplied `mcmc = TRUE`, the model was not fitted #> using MCMC, #> ℹ The corresponding columns will be omitted. #> # A tibble: 1 × 5 #> independence iterations logLik AIC BIC #> #> 1 TRUE 4 -51.0 106. 112."},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) factanal object — tidy.factanal","title":"Tidy a(n) factanal object — tidy.factanal","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) factanal object — tidy.factanal","text":"","code":"# S3 method for class 'factanal' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) factanal object — tidy.factanal","text":"x factanal object created stats::factanal(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) factanal object — tidy.factanal","text":"tibble::tibble() columns: variable Variable consideration. uniqueness Proportion residual, unexplained variance flX Factor loading level X.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) factanal object — tidy.factanal","text":"","code":"set.seed(123) # generate data library(dplyr) library(purrr) m1 <- tibble( v1 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 4, 5, 6), v2 = c(1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 3, 4, 3, 3, 3, 4, 6, 5), v3 = c(3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 6), v4 = c(3, 3, 4, 3, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 5, 6, 4), v5 = c(1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 6, 4, 5), v6 = c(1, 1, 1, 2, 1, 3, 3, 3, 4, 3, 1, 1, 1, 2, 1, 6, 5, 4) ) # new data m2 <- map_dfr(m1, rev) # factor analysis objects fit1 <- factanal(m1, factors = 3, scores = \"Bartlett\") fit2 <- factanal(m1, factors = 3, scores = \"regression\") # tidying the object tidy(fit1) #> # A tibble: 6 × 5 #> variable uniqueness fl1 fl2 fl3 #> #> 1 v1 0.005 0.944 0.182 0.267 #> 2 v2 0.101 0.905 0.235 0.159 #> 3 v3 0.005 0.236 0.210 0.946 #> 4 v4 0.224 0.180 0.242 0.828 #> 5 v5 0.0843 0.242 0.881 0.286 #> 6 v6 0.005 0.193 0.959 0.196 tidy(fit2) #> # A tibble: 6 × 5 #> variable uniqueness fl1 fl2 fl3 #> #> 1 v1 0.005 0.944 0.182 0.267 #> 2 v2 0.101 0.905 0.235 0.159 #> 3 v3 0.005 0.236 0.210 0.946 #> 4 v4 0.224 0.180 0.242 0.828 #> 5 v5 0.0843 0.242 0.881 0.286 #> 6 v6 0.005 0.193 0.959 0.196 # augmented dataframe augment(fit1) #> # A tibble: 18 × 4 #> .rownames .fs1 .fs2 .fs3 #> #> 1 1 -0.904 -0.931 0.948 #> 2 2 -0.869 -0.933 0.935 #> 3 3 -0.908 -0.932 0.962 #> 4 4 -1.00 -0.253 0.818 #> 5 5 -0.904 -0.931 0.948 #> 6 6 -0.745 0.727 -0.788 #> 7 7 -0.710 0.725 -0.801 #> 8 8 -0.750 0.726 -0.774 #> 9 9 -0.808 1.40 -0.930 #> 10 10 -0.745 0.727 -0.788 #> 11 11 0.927 -0.931 -0.837 #> 12 12 0.963 -0.933 -0.849 #> 13 13 0.923 -0.932 -0.823 #> 14 14 0.829 -0.253 -0.967 #> 15 15 0.927 -0.931 -0.837 #> 16 16 0.422 2.05 1.29 #> 17 17 1.47 1.29 0.545 #> 18 18 1.88 0.309 1.95 augment(fit2) #> # A tibble: 18 × 4 #> .rownames .fs1 .fs2 .fs3 #> #> 1 1 -0.897 -0.925 0.936 #> 2 2 -0.861 -0.927 0.924 #> 3 3 -0.901 -0.926 0.950 #> 4 4 -0.993 -0.251 0.809 #> 5 5 -0.897 -0.925 0.936 #> 6 6 -0.741 0.720 -0.784 #> 7 7 -0.706 0.718 -0.796 #> 8 8 -0.745 0.719 -0.770 #> 9 9 -0.803 1.39 -0.923 #> 10 10 -0.741 0.720 -0.784 #> 11 11 0.917 -0.925 -0.830 #> 12 12 0.952 -0.927 -0.842 #> 13 13 0.913 -0.926 -0.816 #> 14 14 0.820 -0.252 -0.958 #> 15 15 0.917 -0.925 -0.830 #> 16 16 0.426 2.04 1.28 #> 17 17 1.46 1.29 0.548 #> 18 18 1.88 0.314 1.95 # augmented dataframe (with new data) augment(fit1, data = m2) #> # A tibble: 18 × 10 #> .rownames v1 v2 v3 v4 v5 v6 .fs1 .fs2 .fs3 #> #> 1 1 6 5 6 4 5 4 -0.904 -0.931 0.948 #> 2 2 5 6 4 6 4 5 -0.869 -0.933 0.935 #> 3 3 4 4 5 5 6 6 -0.908 -0.932 0.962 #> 4 4 3 3 1 1 1 1 -1.00 -0.253 0.818 #> 5 5 3 3 1 1 1 2 -0.904 -0.931 0.948 #> 6 6 3 3 1 2 1 1 -0.745 0.727 -0.788 #> 7 7 3 4 1 1 1 1 -0.710 0.725 -0.801 #> 8 8 3 3 1 1 1 1 -0.750 0.726 -0.774 #> 9 9 1 1 1 1 3 3 -0.808 1.40 -0.930 #> 10 10 1 2 1 1 3 4 -0.745 0.727 -0.788 #> 11 11 1 1 1 2 3 3 0.927 -0.931 -0.837 #> 12 12 1 2 1 1 3 3 0.963 -0.933 -0.849 #> 13 13 1 1 1 1 3 3 0.923 -0.932 -0.823 #> 14 14 1 1 3 3 1 1 0.829 -0.253 -0.967 #> 15 15 1 1 3 3 1 2 0.927 -0.931 -0.837 #> 16 16 1 1 3 4 1 1 0.422 2.05 1.29 #> 17 17 1 2 3 3 1 1 1.47 1.29 0.545 #> 18 18 1 1 3 3 1 1 1.88 0.309 1.95 augment(fit2, data = m2) #> # A tibble: 18 × 10 #> .rownames v1 v2 v3 v4 v5 v6 .fs1 .fs2 .fs3 #> #> 1 1 6 5 6 4 5 4 -0.897 -0.925 0.936 #> 2 2 5 6 4 6 4 5 -0.861 -0.927 0.924 #> 3 3 4 4 5 5 6 6 -0.901 -0.926 0.950 #> 4 4 3 3 1 1 1 1 -0.993 -0.251 0.809 #> 5 5 3 3 1 1 1 2 -0.897 -0.925 0.936 #> 6 6 3 3 1 2 1 1 -0.741 0.720 -0.784 #> 7 7 3 4 1 1 1 1 -0.706 0.718 -0.796 #> 8 8 3 3 1 1 1 1 -0.745 0.719 -0.770 #> 9 9 1 1 1 1 3 3 -0.803 1.39 -0.923 #> 10 10 1 2 1 1 3 4 -0.741 0.720 -0.784 #> 11 11 1 1 1 2 3 3 0.917 -0.925 -0.830 #> 12 12 1 2 1 1 3 3 0.952 -0.927 -0.842 #> 13 13 1 1 1 1 3 3 0.913 -0.926 -0.816 #> 14 14 1 1 3 3 1 1 0.820 -0.252 -0.958 #> 15 15 1 1 3 3 1 2 0.917 -0.925 -0.830 #> 16 16 1 1 3 4 1 1 0.426 2.04 1.28 #> 17 17 1 2 3 3 1 1 1.46 1.29 0.548 #> 18 18 1 1 3 3 1 1 1.88 0.314 1.95"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) felm object — tidy.felm","title":"Tidy a(n) felm object — tidy.felm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) felm object — tidy.felm","text":"","code":"# S3 method for class 'felm' tidy( x, conf.int = FALSE, conf.level = 0.95, fe = FALSE, se.type = c(\"default\", \"iid\", \"robust\", \"cluster\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) felm object — tidy.felm","text":"x felm object returned lfe::felm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. fe Logical indicating whether include estimates fixed effects. Defaults FALSE. se.type Character indicating type standard errors. Defaults using underlying felm() model object, e.g. clustered errors models provided cluster specification. Users can override defaults specifying appropriate alternative: \"iid\" (homoskedastic errors), \"robust\" (Eicker-Huber-White robust errors), \"cluster\" (clustered standard errors; model object supports ). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) felm object — tidy.felm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) felm object — tidy.felm","text":"","code":"# load libraries for models and data library(lfe) # use built-in `airquality` dataset head(airquality) #> Ozone Solar.R Wind Temp Month Day #> 1 41 190 7.4 67 5 1 #> 2 36 118 8.0 72 5 2 #> 3 12 149 12.6 74 5 3 #> 4 18 313 11.5 62 5 4 #> 5 NA NA 14.3 56 5 5 #> 6 28 NA 14.9 66 5 6 # no FEs; same as lm() est0 <- felm(Ozone ~ Temp + Wind + Solar.R, airquality) # summarize model fit with tidiers tidy(est0) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -64.3 23.1 -2.79 0.00623 #> 2 Temp 1.65 0.254 6.52 0.00000000242 #> 3 Wind -3.33 0.654 -5.09 0.00000152 #> 4 Solar.R 0.0598 0.0232 2.58 0.0112 augment(est0) #> # A tibble: 111 × 7 #> .rownames Ozone Temp Wind Solar.R .fitted .resid #> #> 1 1 41 67 7.4 190 33.0 7.95 #> 2 2 36 72 8 118 35.0 1.00 #> 3 3 12 74 12.6 149 24.8 -12.8 #> 4 4 18 62 11.5 313 18.5 -0.475 #> 5 7 23 65 8.6 299 32.3 -9.26 #> 6 8 19 59 13.8 99 -6.95 25.9 #> 7 9 8 61 20.1 19 -29.4 37.4 #> 8 12 16 69 9.7 256 32.6 -16.6 #> 9 13 11 66 9.2 290 31.4 -20.4 #> 10 14 14 68 10.9 274 28.1 -14.1 #> # ℹ 101 more rows # add month fixed effects est1 <- felm(Ozone ~ Temp + Wind + Solar.R | Month, airquality) # summarize model fit with tidiers tidy(est1) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, fe = TRUE) #> # A tibble: 8 × 7 #> term estimate std.error statistic p.value N comp #> #> 1 Temp 1.88 0.341 5.50 0.000000274 NA NA #> 2 Wind -3.11 0.660 -4.71 0.00000778 NA NA #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 NA NA #> 4 Month.5 -74.2 4.23 -17.5 2.00 24 1 #> 5 Month.6 -89.0 6.91 -12.9 2.00 9 1 #> 6 Month.7 -83.0 4.06 -20.4 2 26 1 #> 7 Month.8 -78.4 4.32 -18.2 2.00 23 1 #> 8 Month.9 -90.2 3.85 -23.4 2 29 1 augment(est1) #> # A tibble: 111 × 8 #> .rownames Ozone Temp Wind Solar.R Month .fitted .resid #> #> 1 1 41 67 7.4 190 5 38.3 2.69 #> 2 2 36 72 8 118 5 42.1 -6.07 #> 3 3 12 74 12.6 149 5 33.1 -21.1 #> 4 4 18 62 11.5 313 5 22.6 -4.62 #> 5 7 23 65 8.6 299 5 36.5 -13.5 #> 6 8 19 59 13.8 99 5 -1.33 20.3 #> 7 9 8 61 20.1 19 5 -21.3 29.3 #> 8 12 16 69 9.7 256 5 38.4 -22.4 #> 9 13 11 66 9.2 290 5 36.1 -25.1 #> 10 14 14 68 10.9 274 5 33.7 -19.7 #> # ℹ 101 more rows glance(est1) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.637 0.612 20.7 25.8 4.57e-20 103 103 111 # the \"se.type\" argument can be used to switch out different standard errors # types on the fly. In turn, this can be useful exploring the effect of # different error structures on model inference. tidy(est1, se.type = \"iid\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, se.type = \"robust\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.344 5.45 0.000000344 #> 2 Wind -3.11 0.903 -3.44 0.000834 #> 3 Solar.R 0.0522 0.0226 2.31 0.0227 # add clustered SEs (also by month) est2 <- felm(Ozone ~ Temp + Wind + Solar.R | Month | 0 | Month, airquality) # summarize model fit with tidiers tidy(est2, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"cluster\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"robust\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.344 5.45 0.00550 0.920 2.83 #> 2 Wind -3.11 0.903 -3.44 0.0262 -5.62 -0.602 #> 3 Solar.R 0.0522 0.0226 2.31 0.0817 -0.0104 0.115 tidy(est2, conf.int = TRUE, se.type = \"iid\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.341 5.50 0.00532 0.929 2.82 #> 2 Wind -3.11 0.660 -4.71 0.00924 -4.94 -1.28 #> 3 Solar.R 0.0522 0.0237 2.21 0.0920 -0.0135 0.118"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) fitdistr object — tidy.fitdistr","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"","code":"# S3 method for class 'fitdistr' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"x fitdistr object returned MASS::fitdistr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"tibble::tibble() columns: estimate estimated value regression term. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"","code":"# load libraries for models and data library(MASS) # generate data set.seed(2015) x <- rnorm(100, 5, 2) # fit models fit <- fitdistr(x, dnorm, list(mean = 3, sd = 1)) #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 3 #> term estimate std.error #> #> 1 mean 4.90 0.201 #> 2 sd 2.01 0.142 glance(fit) #> # A tibble: 1 × 4 #> logLik AIC BIC nobs #> #> 1 -211.6533 427. 433. 100"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) fixest object — tidy.fixest","title":"Tidy a(n) fixest object — tidy.fixest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) fixest object — tidy.fixest","text":"","code":"# S3 method for class 'fixest' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) fixest object — tidy.fixest","text":"x fixest object returned fixest estimators conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed summary confint. Important arguments se cluster. arguments dof, exact_dof, forceCovariance, keepBounded. See summary.fixest.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) fixest object — tidy.fixest","text":"fixest package provides family functions estimating models arbitrary numbers fixed-effects, OLS GLM context. package also supports robust (.e. White) clustered standard error reporting via generic summary.fixest() command. similar vein, tidy() method models allows users specify desired standard error correction either 1) implicitly via supplied fixest object, 2) explicitly part tidy call. See examples . Note fixest confidence intervals calculated assuming normal distribution – assumes infinite degrees freedom CI. (assumption distinct degrees freedom used calculate standard errors. degrees freedom clusters fixed effects, see https://github.com/lrberge/fixest/issues/6 https://github.com/sgaure/lfe/issues/1#issuecomment-530646990)","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) fixest object — tidy.fixest","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) fixest object — tidy.fixest","text":"","code":"# load libraries for models and data library(fixest) gravity <- feols( log(Euros) ~ log(dist_km) | Origin + Destination + Product + Year, trade ) tidy(gravity) #> # A tibble: 1 × 5 #> term estimate std.error statistic p.value #> #> 1 log(dist_km) -2.17 0.154 -14.1 0.00000000119 glance(gravity) #> # A tibble: 1 × 9 #> r.squared adj.r.squared within.r.squared pseudo.r.squared sigma nobs #> #> 1 0.706 0.705 0.219 NA 1.74 38325 #> # ℹ 3 more variables: AIC , BIC , logLik augment(gravity, trade) #> # A tibble: 38,325 × 9 #> .rownames Destination Origin Product Year dist_km Euros .fitted #> #> 1 1 LU BE 1 2007 140. 2966697 14.1 #> 2 2 BE LU 1 2007 140. 6755030 13.0 #> 3 3 LU BE 2 2007 140. 57078782 16.9 #> 4 4 BE LU 2 2007 140. 7117406 15.8 #> 5 5 LU BE 3 2007 140. 17379821 16.3 #> 6 6 BE LU 3 2007 140. 2622254 15.2 #> 7 7 LU BE 4 2007 140. 64867588 17.4 #> 8 8 BE LU 4 2007 140. 10731757 16.3 #> 9 9 LU BE 5 2007 140. 330702 14.1 #> 10 10 BE LU 5 2007 140. 7706 13.0 #> # ℹ 38,315 more rows #> # ℹ 1 more variable: .resid # to get robust or clustered SEs, users can either: # 1) specify the arguments directly in the `tidy()` call tidy(gravity, conf.int = TRUE, cluster = c(\"Product\", \"Year\")) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 tidy(gravity, conf.int = TRUE, se = \"threeway\") #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.175 -12.4 6.08e-9 -2.54 -1.79 # 2) or, feed tidy() a summary.fixest object that has already accepted # these arguments gravity_summ <- summary(gravity, cluster = c(\"Product\", \"Year\")) tidy(gravity_summ, conf.int = TRUE) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 # approach (1) is preferred."},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ftable.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Tidy ftable objects — tidy.ftable","title":"(Deprecated) Tidy ftable objects — tidy.ftable","text":"function deprecated. Please use tibble::as_tibble() instead.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ftable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Tidy ftable objects — tidy.ftable","text":"","code":"# S3 method for class 'ftable' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ftable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Tidy ftable objects — tidy.ftable","text":"x ftable object returned stats::ftable(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ftable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Tidy ftable objects — tidy.ftable","text":"ftable contains \"flat\" contingency table. melts tibble::tibble one column variable, Freq column.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) gam object — tidy.gam","title":"Tidy a(n) gam object — tidy.gam","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) gam object — tidy.gam","text":"","code":"# S3 method for class 'gam' tidy( x, parametric = FALSE, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) gam object — tidy.gam","text":"x gam object returned call mgcv::gam(). parametric Logical indicating parametric smooth terms tidied. Defaults FALSE, meaning smooth terms tidied default. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) gam object — tidy.gam","text":"parametric = FALSE return columns edf ref.df rather estimate std.error.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) gam object — tidy.gam","text":"tibble::tibble() columns: estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. edf effective degrees freedom. reported `parametric = FALSE` ref.df reference degrees freedom. reported `parametric = FALSE`","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) gam object — tidy.gam","text":"","code":"# load libraries for models and data library(mgcv) # fit model g <- gam(mpg ~ s(hp) + am + qsec, data = mtcars) # summarize model fit with tidiers tidy(g) #> # A tibble: 1 × 5 #> term edf ref.df statistic p.value #> #> 1 s(hp) 2.36 3.02 6.34 0.00218 tidy(g, parametric = TRUE) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 16.7 9.83 1.70 0.101 #> 2 am 4.37 1.56 2.81 0.00918 #> 3 qsec 0.0904 0.525 0.172 0.865 glance(g) #> # A tibble: 1 × 9 #> df logLik AIC BIC deviance df.residual nobs adj.r.squared npar #> #> 1 5.36 -74.4 162. 171. 196. 26.6 32 0.797 12 augment(g) #> # A tibble: 32 × 11 #> .rownames mpg am qsec hp .fitted .se.fit .resid .hat .sigma #> #> 1 Mazda RX4 21 1 16.5 110 24.3 1.03 -3.25 0.145 NA #> 2 Mazda RX4… 21 1 17.0 110 24.3 0.925 -3.30 0.116 NA #> 3 Datsun 710 22.8 1 18.6 93 26.0 0.894 -3.22 0.109 NA #> 4 Hornet 4 … 21.4 0 19.4 110 20.2 0.827 1.25 0.0930 NA #> 5 Hornet Sp… 18.7 0 17.0 175 15.7 0.815 3.02 0.0902 NA #> 6 Valiant 18.1 0 20.2 105 20.7 0.914 -2.56 0.113 NA #> 7 Duster 360 14.3 0 15.8 245 12.7 1.11 1.63 0.167 NA #> 8 Merc 240D 24.4 0 20 62 25.0 1.45 -0.618 0.287 NA #> 9 Merc 230 22.8 0 22.9 95 21.8 1.81 0.959 0.446 NA #> 10 Merc 280 19.2 0 18.3 123 19.0 0.864 0.211 0.102 NA #> # ℹ 22 more rows #> # ℹ 1 more variable: .cooksd "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) garch object — tidy.garch","title":"Tidy a(n) garch object — tidy.garch","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) garch object — tidy.garch","text":"","code":"# S3 method for class 'garch' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) garch object — tidy.garch","text":"x garch object returned tseries::garch(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) garch object — tidy.garch","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) garch object — tidy.garch","text":"","code":"# load libraries for models and data library(tseries) # load data data(EuStockMarkets) # fit model dax <- diff(log(EuStockMarkets))[, \"DAX\"] dax.garch <- garch(dax) #> #> ***** ESTIMATION WITH ANALYTICAL GRADIENT ***** #> #> #> I INITIAL X(I) D(I) #> #> 1 9.549651e-05 1.000e+00 #> 2 5.000000e-02 1.000e+00 #> 3 5.000000e-02 1.000e+00 #> #> IT NF F RELDF PRELDF RELDX STPPAR D*STEP NPRELDF #> 0 1 -7.584e+03 #> 1 8 -7.585e+03 1.45e-05 2.60e-05 1.4e-05 1.0e+11 1.4e-06 1.35e+06 #> 2 9 -7.585e+03 1.88e-07 1.97e-07 1.3e-05 2.0e+00 1.4e-06 1.50e+00 #> 3 18 -7.589e+03 6.22e-04 1.10e-03 3.5e-01 2.0e+00 5.5e-02 1.50e+00 #> 4 21 -7.601e+03 1.58e-03 1.81e-03 6.2e-01 1.9e+00 2.2e-01 3.07e-01 #> 5 23 -7.634e+03 4.22e-03 3.55e-03 4.3e-01 9.6e-01 4.4e-01 3.06e-02 #> 6 25 -7.646e+03 1.61e-03 1.85e-03 2.9e-02 2.0e+00 4.4e-02 5.43e-02 #> 7 27 -7.646e+03 3.82e-05 5.23e-04 1.3e-02 2.0e+00 2.0e-02 1.46e-02 #> 8 28 -7.648e+03 1.86e-04 1.46e-04 6.5e-03 2.0e+00 9.9e-03 1.54e-03 #> 9 29 -7.648e+03 3.12e-05 4.83e-05 6.4e-03 2.0e+00 9.9e-03 3.34e-03 #> 10 30 -7.648e+03 1.39e-05 6.31e-05 6.2e-03 1.9e+00 9.9e-03 1.86e-03 #> 11 31 -7.650e+03 2.70e-04 3.24e-04 6.0e-03 1.9e+00 9.9e-03 4.99e-03 #> 12 34 -7.656e+03 8.42e-04 8.57e-04 2.2e-02 1.7e-01 3.9e-02 2.22e-03 #> 13 36 -7.661e+03 6.12e-04 6.40e-04 1.9e-02 4.2e-01 3.9e-02 2.09e-03 #> 14 38 -7.665e+03 4.87e-04 8.63e-04 4.9e-02 4.1e-01 9.6e-02 9.69e-04 #> 15 48 -7.666e+03 1.02e-04 1.86e-04 1.9e-07 4.5e+00 3.5e-07 3.94e-04 #> 16 49 -7.666e+03 1.12e-07 1.01e-07 1.9e-07 2.0e+00 3.5e-07 6.22e-05 #> 17 57 -7.666e+03 1.60e-05 2.70e-05 2.0e-03 9.3e-01 3.7e-03 6.10e-05 #> 18 59 -7.666e+03 5.23e-06 7.01e-06 3.7e-03 3.9e-01 8.0e-03 7.77e-06 #> 19 60 -7.666e+03 4.08e-08 3.74e-08 1.4e-04 0.0e+00 3.1e-04 3.74e-08 #> 20 61 -7.666e+03 2.31e-09 8.57e-10 8.6e-06 0.0e+00 2.0e-05 8.57e-10 #> 21 62 -7.666e+03 5.35e-11 2.25e-13 7.6e-07 0.0e+00 1.6e-06 2.25e-13 #> 22 63 -7.666e+03 1.81e-12 7.06e-16 1.7e-08 0.0e+00 3.4e-08 7.06e-16 #> 23 64 -7.666e+03 7.00e-14 1.69e-17 1.0e-09 0.0e+00 2.4e-09 1.69e-17 #> 24 65 -7.666e+03 -1.16e-14 1.76e-20 1.9e-10 0.0e+00 4.0e-10 1.76e-20 #> #> ***** X- AND RELATIVE FUNCTION CONVERGENCE ***** #> #> FUNCTION -7.665775e+03 RELDX 1.874e-10 #> FUNC. EVALS 65 GRAD. EVALS 24 #> PRELDF 1.760e-20 NPRELDF 1.760e-20 #> #> I FINAL X(I) D(I) G(I) #> #> 1 4.639289e-06 1.000e+00 -2.337e-02 #> 2 6.832875e-02 1.000e+00 -8.294e-07 #> 3 8.890666e-01 1.000e+00 -2.230e-06 #> dax.garch #> #> Call: #> garch(x = dax) #> #> Coefficient(s): #> a0 a1 b1 #> 4.639e-06 6.833e-02 8.891e-01 #> # summarize model fit with tidiers tidy(dax.garch) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 a0 0.00000464 0.000000756 6.14 8.42e-10 #> 2 a1 0.0683 0.0113 6.07 1.25e- 9 #> 3 b1 0.889 0.0165 53.8 0 glance(dax.garch) #> # A tibble: 1 × 8 #> statistic p.value parameter method logLik AIC BIC nobs #> #> 1 0.136 0.713 1 Box-Ljung test 5958. -11911. -11894. 1859"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) geeglm object — tidy.geeglm","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"","code":"# S3 method for class 'geeglm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"x geeglm object returned call geepack::geeglm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"conf.int = TRUE, confidence interval computed internal confint.geeglm() function. missing values model data, may need refit model na.action = na.exclude deal missingness data beforehand.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"","code":"# load modeling library library(geepack) # load data data(state) ds <- data.frame(state.region, state.x77) # fit model geefit <- geeglm(Income ~ Frost + Murder, id = state.region, data = ds, corstr = \"exchangeable\" ) # summarize model fit with tidiers tidy(geefit) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4406. 407. 117. 0 #> 2 Frost 1.69 2.25 0.562 0.453 #> 3 Murder -22.7 31.4 0.522 0.470 tidy(geefit, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4406. 407. 117. 0 3608. 5205. #> 2 Frost 1.69 2.25 0.562 0.453 -2.72 6.10 #> 3 Murder -22.7 31.4 0.522 0.470 -84.2 38.8"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glht object — tidy.glht","title":"Tidy a(n) glht object — tidy.glht","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glht object — tidy.glht","text":"","code":"# S3 method for class 'glht' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glht object — tidy.glht","text":"x glht object returned multcomp::glht(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed summary() tidy.summary.glht().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) glht object — tidy.glht","text":"tibble::tibble() columns: contrast Levels compared. estimate estimated value regression term. null.value Value estimate compared.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) glht object — tidy.glht","text":"","code":"# load libraries for models and data library(multcomp) library(ggplot2) amod <- aov(breaks ~ wool + tension, data = warpbreaks) wht <- glht(amod, linfct = mcp(tension = \"Tukey\")) tidy(wht) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0336 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00108 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(wht, aes(lhs, estimate)) + geom_point() CI <- confint(wht) tidy(CI) #> # A tibble: 3 × 5 #> term contrast estimate conf.low conf.high #> #> 1 tension M - L -10 -19.4 -0.649 #> 2 tension H - L -14.7 -24.1 -5.37 #> 3 tension H - M -4.72 -14.1 4.63 ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + geom_pointrange() tidy(summary(wht)) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0335 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00111 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(mapping = aes(lhs, estimate)) + geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + geom_point(aes(size = p), data = summary(wht)) + scale_size(trans = \"reverse\") cld <- cld(wht) tidy(cld) #> # A tibble: 3 × 2 #> tension letters #> #> 1 L a #> 2 M b #> 3 H b"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glm object — tidy.glm","title":"Tidy a(n) glm object — tidy.glm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glm object — tidy.glm","text":"","code":"# S3 method for class 'glm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glm object — tidy.glm","text":"x glm object returned stats::glm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glmRob object — tidy.glmRob","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"","code":"# S3 method for class 'glmRob' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"x glmRob object returned robust::glmRob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"","code":"# load libraries for models and data library(robust) # fit model gm <- glmRob(am ~ wt, data = mtcars, family = \"binomial\") # summarize model fit with tidiers tidy(gm) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 12.0 4.51 2.67 0.00759 #> 2 wt -4.02 1.44 -2.80 0.00509 glance(gm) #> # A tibble: 1 × 5 #> deviance sigma null.deviance df.residual nobs #> #> 1 19.2 0.800 44.4 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glmnet object — tidy.glmnet","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"","code":"# S3 method for class 'glmnet' tidy(x, return_zeros = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"x glmnet object returned glmnet::glmnet(). return_zeros Logical indicating whether coefficients value zero zero included results. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"Note representation GLMs much easier plot combine default structure, also much memory-intensive. use large, sparse matrices. augment method yet provided even though model produces predictions, input data tidy (matrix may wide) therefore combining predictions logical. Furthermore, predictions make sense specific choice lambda.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"tibble::tibble() columns: dev.ratio Fraction null deviance explained value lambda. estimate estimated value regression term. lambda Value penalty parameter lambda. step step lambda choices used. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"","code":"# load libraries for models and data library(glmnet) set.seed(2014) x <- matrix(rnorm(100 * 20), 100, 20) y <- rnorm(100) fit1 <- glmnet(x, y) # summarize model fit with tidiers + visualization tidy(fit1) #> # A tibble: 1,086 × 5 #> term step estimate lambda dev.ratio #> #> 1 (Intercept) 1 -0.207 0.152 0 #> 2 (Intercept) 2 -0.208 0.139 0.00464 #> 3 (Intercept) 3 -0.209 0.127 0.0111 #> 4 (Intercept) 4 -0.210 0.115 0.0165 #> 5 (Intercept) 5 -0.210 0.105 0.0240 #> 6 (Intercept) 6 -0.210 0.0957 0.0321 #> 7 (Intercept) 7 -0.210 0.0872 0.0412 #> 8 (Intercept) 8 -0.210 0.0795 0.0497 #> 9 (Intercept) 9 -0.209 0.0724 0.0593 #> 10 (Intercept) 10 -0.208 0.0660 0.0682 #> # ℹ 1,076 more rows glance(fit1) #> # A tibble: 1 × 3 #> nulldev npasses nobs #> #> 1 104. 255 100 library(dplyr) library(ggplot2) tidied <- tidy(fit1) %>% filter(term != \"(Intercept)\") ggplot(tidied, aes(step, estimate, group = term)) + geom_line() ggplot(tidied, aes(lambda, estimate, group = term)) + geom_line() + scale_x_log10() ggplot(tidied, aes(lambda, dev.ratio)) + geom_line() # works for other types of regressions as well, such as logistic g2 <- sample(1:2, 100, replace = TRUE) fit2 <- glmnet(x, g2, family = \"binomial\") tidy(fit2) #> # A tibble: 947 × 5 #> term step estimate lambda dev.ratio #> #> 1 (Intercept) 1 0.282 0.0906 -1.62e-15 #> 2 (Intercept) 2 0.281 0.0826 6.28e- 3 #> 3 (Intercept) 3 0.279 0.0753 1.55e- 2 #> 4 (Intercept) 4 0.277 0.0686 2.48e- 2 #> 5 (Intercept) 5 0.284 0.0625 4.17e- 2 #> 6 (Intercept) 6 0.293 0.0569 5.79e- 2 #> 7 (Intercept) 7 0.303 0.0519 7.39e- 2 #> 8 (Intercept) 8 0.314 0.0473 8.94e- 2 #> 9 (Intercept) 9 0.325 0.0431 1.03e- 1 #> 10 (Intercept) 10 0.336 0.0392 1.14e- 1 #> # ℹ 937 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) gmm object — tidy.gmm","title":"Tidy a(n) gmm object — tidy.gmm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) gmm object — tidy.gmm","text":"","code":"# S3 method for class 'gmm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) gmm object — tidy.gmm","text":"x gmm object returned gmm::gmm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) gmm object — tidy.gmm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) gmm object — tidy.gmm","text":"","code":"# load libraries for models and data library(gmm) # examples come from the \"gmm\" package # CAPM test with GMM data(Finance) r <- Finance[1:300, 1:10] rm <- Finance[1:300, \"rm\"] rf <- Finance[1:300, \"rf\"] z <- as.matrix(r - rf) t <- nrow(z) zm <- rm - rf h <- matrix(zm, t, 1) res <- gmm(z ~ zm, x = h) # tidy result tidy(res) #> # A tibble: 20 × 5 #> term estimate std.error statistic p.value #> #> 1 WMK_(Intercept) -0.00467 0.0566 -0.0824 9.34e- 1 #> 2 UIS_(Intercept) 0.102 0.126 0.816 4.15e- 1 #> 3 ORB_(Intercept) 0.146 0.203 0.718 4.73e- 1 #> 4 MAT_(Intercept) 0.0359 0.110 0.326 7.45e- 1 #> 5 ABAX_(Intercept) 0.0917 0.288 0.318 7.50e- 1 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 #> 7 EMR_(Intercept) 0.0299 0.0552 0.542 5.88e- 1 #> 8 JCS_(Intercept) 0.117 0.155 0.756 4.50e- 1 #> 9 VOXX_(Intercept) 0.0209 0.182 0.115 9.09e- 1 #> 10 ZOOM_(Intercept) -0.219 0.202 -1.08 2.79e- 1 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 tidy(res, conf.int = TRUE) #> # A tibble: 20 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercep… -0.00467 0.0566 -0.0824 9.34e- 1 -0.116 0.106 #> 2 UIS_(Intercep… 0.102 0.126 0.816 4.15e- 1 -0.144 0.348 #> 3 ORB_(Intercep… 0.146 0.203 0.718 4.73e- 1 -0.252 0.544 #> 4 MAT_(Intercep… 0.0359 0.110 0.326 7.45e- 1 -0.180 0.252 #> 5 ABAX_(Interce… 0.0917 0.288 0.318 7.50e- 1 -0.473 0.656 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 -0.129 0.175 #> 7 EMR_(Intercep… 0.0299 0.0552 0.542 5.88e- 1 -0.0782 0.138 #> 8 JCS_(Intercep… 0.117 0.155 0.756 4.50e- 1 -0.186 0.420 #> 9 VOXX_(Interce… 0.0209 0.182 0.115 9.09e- 1 -0.335 0.377 #> 10 ZOOM_(Interce… -0.219 0.202 -1.08 2.79e- 1 -0.616 0.177 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 0.0708 0.564 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 0.812 1.71 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 0.654 2.33 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 0.588 1.44 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 -0.0451 2.22 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 0.547 1.15 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 0.545 0.936 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 0.277 1.64 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 0.758 2.21 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 1.45 2.71 tidy(res, conf.int = TRUE, conf.level = .99) #> # A tibble: 20 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercep… -0.00467 0.0566 -0.0824 9.34e- 1 -0.151 0.141 #> 2 UIS_(Intercep… 0.102 0.126 0.816 4.15e- 1 -0.221 0.426 #> 3 ORB_(Intercep… 0.146 0.203 0.718 4.73e- 1 -0.377 0.669 #> 4 MAT_(Intercep… 0.0359 0.110 0.326 7.45e- 1 -0.248 0.320 #> 5 ABAX_(Interce… 0.0917 0.288 0.318 7.50e- 1 -0.650 0.834 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 -0.176 0.223 #> 7 EMR_(Intercep… 0.0299 0.0552 0.542 5.88e- 1 -0.112 0.172 #> 8 JCS_(Intercep… 0.117 0.155 0.756 4.50e- 1 -0.281 0.515 #> 9 VOXX_(Interce… 0.0209 0.182 0.115 9.09e- 1 -0.447 0.489 #> 10 ZOOM_(Interce… -0.219 0.202 -1.08 2.79e- 1 -0.740 0.302 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 -0.00656 0.641 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 0.671 1.85 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 0.391 2.60 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 0.454 1.58 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 -0.401 2.58 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 0.453 1.25 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 0.484 0.998 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 0.0627 1.85 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 0.530 2.43 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 1.25 2.91 # coefficient plot library(ggplot2) library(dplyr) tidy(res, conf.int = TRUE) %>% mutate(variable = reorder(term, estimate)) %>% ggplot(aes(estimate, variable)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_vline(xintercept = 0, color = \"red\", lty = 2) # from a function instead of a matrix g <- function(theta, x) { e <- x[, 2:11] - theta[1] - (x[, 1] - theta[1]) %*% matrix(theta[2:11], 1, 10) gmat <- cbind(e, e * c(x[, 1])) return(gmat) } x <- as.matrix(cbind(rm, r)) res_black <- gmm(g, x = x, t0 = rep(0, 11)) tidy(res_black) #> # A tibble: 11 × 5 #> term estimate std.error statistic p.value #> #> 1 Theta[1] 0.516 0.172 3.00 2.72e- 3 #> 2 Theta[2] 1.12 0.116 9.65 5.02e-22 #> 3 Theta[3] 0.680 0.197 3.45 5.65e- 4 #> 4 Theta[4] -0.0322 0.424 -0.0761 9.39e- 1 #> 5 Theta[5] 0.850 0.155 5.49 4.05e- 8 #> 6 Theta[6] -0.205 0.479 -0.429 6.68e- 1 #> 7 Theta[7] 0.625 0.122 5.14 2.73e- 7 #> 8 Theta[8] 1.05 0.0687 15.3 5.03e-53 #> 9 Theta[9] 0.640 0.233 2.75 5.92e- 3 #> 10 Theta[10] 0.596 0.295 2.02 4.36e- 2 #> 11 Theta[11] 1.16 0.240 4.82 1.45e- 6 tidy(res_black, conf.int = TRUE) #> # A tibble: 11 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Theta[1] 0.516 0.172 3.00 2.72e- 3 0.178 0.853 #> 2 Theta[2] 1.12 0.116 9.65 5.02e-22 0.889 1.34 #> 3 Theta[3] 0.680 0.197 3.45 5.65e- 4 0.293 1.07 #> 4 Theta[4] -0.0322 0.424 -0.0761 9.39e- 1 -0.862 0.798 #> 5 Theta[5] 0.850 0.155 5.49 4.05e- 8 0.546 1.15 #> 6 Theta[6] -0.205 0.479 -0.429 6.68e- 1 -1.14 0.733 #> 7 Theta[7] 0.625 0.122 5.14 2.73e- 7 0.387 0.864 #> 8 Theta[8] 1.05 0.0687 15.3 5.03e-53 0.919 1.19 #> 9 Theta[9] 0.640 0.233 2.75 5.92e- 3 0.184 1.10 #> 10 Theta[10] 0.596 0.295 2.02 4.36e- 2 0.0171 1.17 #> 11 Theta[11] 1.16 0.240 4.82 1.45e- 6 0.686 1.63 # APT test with Fama-French factors and GMM f1 <- zm f2 <- Finance[1:300, \"hml\"] - rf f3 <- Finance[1:300, \"smb\"] - rf h <- cbind(f1, f2, f3) res2 <- gmm(z ~ f1 + f2 + f3, x = h) td2 <- tidy(res2, conf.int = TRUE) td2 #> # A tibble: 40 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercept) -0.0240 0.0548 -0.438 0.662 -0.131 0.0834 #> 2 UIS_(Intercept) 0.0723 0.127 0.567 0.570 -0.177 0.322 #> 3 ORB_(Intercept) 0.114 0.212 0.534 0.593 -0.303 0.530 #> 4 MAT_(Intercept) 0.0694 0.0979 0.709 0.478 -0.122 0.261 #> 5 ABAX_(Intercep… 0.0668 0.275 0.242 0.808 -0.473 0.606 #> 6 T_(Intercept) 0.0195 0.0745 0.262 0.793 -0.126 0.165 #> 7 EMR_(Intercept) 0.0217 0.0538 0.404 0.687 -0.0837 0.127 #> 8 JCS_(Intercept) 0.0904 0.154 0.586 0.558 -0.212 0.393 #> 9 VOXX_(Intercep… -0.00706 0.179 -0.0394 0.969 -0.359 0.344 #> 10 ZOOM_(Intercep… -0.189 0.215 -0.878 0.380 -0.610 0.233 #> # ℹ 30 more rows # coefficient plot td2 %>% mutate(variable = reorder(term, estimate)) %>% ggplot(aes(estimate, variable)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_vline(xintercept = 0, color = \"red\", lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy/glance a(n) htest object — tidy.htest","title":"Tidy/glance a(n) htest object — tidy.htest","text":"models single component, tidy() glance() methods identical. Please see documentation methods.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy/glance a(n) htest object — tidy.htest","text":"","code":"# S3 method for class 'htest' tidy(x, ...) # S3 method for class 'htest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy/glance a(n) htest object — tidy.htest","text":"x htest objected, created stats::cor.test(), stats::t.test(), stats::wilcox.test(), stats::chisq.test(), etc. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy/glance a(n) htest object — tidy.htest","text":"tibble::tibble() columns: alternative Alternative hypothesis (character). conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. estimate1 Sometimes two estimates computed, two-sample t-test. estimate2 Sometimes two estimates computed, two-sample t-test. method Method used. p.value two-sided p-value associated observed statistic. parameter parameter modeled. statistic value T-statistic use hypothesis regression term non-zero.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy/glance a(n) htest object — tidy.htest","text":"","code":"tt <- t.test(rnorm(10)) tidy(tt) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.218 -0.533 0.607 9 -1.14 0.706 One Sample t-te… #> # ℹ 1 more variable: alternative # the glance output will be the same for each of the below tests glance(tt) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.218 -0.533 0.607 9 -1.14 0.706 One Sample t-te… #> # ℹ 1 more variable: alternative tt <- t.test(mpg ~ am, data = mtcars) tidy(tt) #> # A tibble: 1 × 10 #> estimate estimate1 estimate2 statistic p.value parameter conf.low #> #> 1 -7.24 17.1 24.4 -3.77 0.00137 18.3 -11.3 #> # ℹ 3 more variables: conf.high , method , alternative wt <- wilcox.test(mpg ~ am, data = mtcars, conf.int = TRUE, exact = FALSE) tidy(wt) #> # A tibble: 1 × 7 #> estimate statistic p.value conf.low conf.high method alternative #> #> 1 -6.80 42 0.00187 -11.7 -2.90 Wilcoxon rank… two.sided ct <- cor.test(mtcars$wt, mtcars$mpg) tidy(ct) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.868 -9.56 1.29e-10 30 -0.934 -0.744 Pearson's prod… #> # ℹ 1 more variable: alternative chit <- chisq.test(xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic))) tidy(chit) #> # A tibble: 1 × 4 #> statistic p.value parameter method #> #> 1 350. 1.56e-75 3 Pearson's Chi-squared test augment(chit) #> # A tibble: 8 × 9 #> Sex Class .observed .prop .row.prop .col.prop .expected .resid #> #> 1 Male 1st 180 0.0818 0.104 0.554 256. -4.73 #> 2 Female 1st 145 0.0659 0.309 0.446 69.4 9.07 #> 3 Male 2nd 179 0.0813 0.103 0.628 224. -3.02 #> 4 Female 2nd 106 0.0482 0.226 0.372 60.9 5.79 #> 5 Male 3rd 510 0.232 0.295 0.722 555. -1.92 #> 6 Female 3rd 196 0.0891 0.417 0.278 151. 3.68 #> 7 Male Crew 862 0.392 0.498 0.974 696. 6.29 #> 8 Female Crew 23 0.0104 0.0489 0.0260 189. -12.1 #> # ℹ 1 more variable: .std.resid "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ivreg object — tidy.ivreg","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"","code":"# S3 method for class 'ivreg' tidy(x, conf.int = FALSE, conf.level = 0.95, instruments = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"x ivreg object created call AER::ivreg(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. instruments Logical indicating whether return coefficients second-stage diagnostics tests endogenous regressor (F-statistics). Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"tidier currently supports ivreg-classed objects outputted AER package. ivreg package also outputs objects class ivreg, supported later release.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. p.value.Sargan p-value Sargan test overidentifying restrictions. p.value.weakinst p-value weak instruments test. p.value.Wu.Hausman p-value Wu-Hausman weak instruments test endogeneity. statistic value T-statistic use hypothesis regression term non-zero. statistic.Sargan Statistic Sargan test overidentifying restrictions. statistic.weakinst Statistic Wu-Hausman test. statistic.Wu.Hausman Statistic Wu-Hausman weak instruments test endogeneity. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"","code":"# load libraries for models and data library(AER) # load data data(\"CigarettesSW\", package = \"AER\") # fit model ivr <- ivreg( log(packs) ~ income | population, data = CigarettesSW, subset = year == \"1995\" ) # summarize model fit with tidiers tidy(ivr) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 tidy(ivr, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 4.52e+0 4.70e+ 0 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 -1.03e-9 -1.13e-10 tidy(ivr, conf.int = TRUE, instruments = TRUE) #> # A tibble: 1 × 5 #> term num.df den.df statistic p.value #> #> 1 income 1 46 3329. 1.46e-44 augment(ivr) #> # A tibble: 48 × 6 #> .rownames `log(packs)` income population .fitted .resid #> #> 1 49 4.62 83903280 4262731 4.56 0.0522 #> 2 50 4.71 45995496 2480121 4.59 0.124 #> 3 51 4.28 88870496 4306908 4.56 -0.285 #> 4 52 4.04 771470144 31493524 4.17 -0.131 #> 5 53 4.41 92946544 3738061 4.56 -0.145 #> 6 54 4.38 104315120 3265293 4.55 -0.177 #> 7 55 4.82 18237436 718265 4.60 0.223 #> 8 56 4.53 333525344 14185403 4.42 0.112 #> 9 57 4.58 159800448 7188538 4.52 0.0591 #> 10 58 4.53 60170928 2840860 4.58 -0.0512 #> # ℹ 38 more rows augment(ivr, data = CigarettesSW) #> # A tibble: 96 × 11 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.56 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.59 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.56 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.17 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.56 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.55 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.60 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.42 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.52 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.58 #> # ℹ 86 more rows #> # ℹ 1 more variable: .resid augment(ivr, newdata = CigarettesSW) #> # A tibble: 96 × 10 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.59 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.60 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.59 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.36 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.58 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.58 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.61 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.52 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.57 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.59 #> # ℹ 86 more rows glance(ivr) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.131 0.112 0.229 5.98 0.0184 2 46 48"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) kappa object — tidy.kappa","title":"Tidy a(n) kappa object — tidy.kappa","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) kappa object — tidy.kappa","text":"","code":"# S3 method for class 'kappa' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) kappa object — tidy.kappa","text":"x kappa object returned psych::cohen.kappa(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) kappa object — tidy.kappa","text":"Note confidence level (alpha) confidence interval set tidy. Instead must set alpha argument psych::cohen.kappa() creating kappa object.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) kappa object — tidy.kappa","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. type Either `weighted` `unweighted`.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) kappa object — tidy.kappa","text":"","code":"# load libraries for models and data library(psych) #> #> Attaching package: ‘psych’ #> The following object is masked from ‘package:boot’: #> #> logit #> The following object is masked from ‘package:lavaan’: #> #> cor2cov #> The following object is masked from ‘package:car’: #> #> logit #> The following object is masked from ‘package:drc’: #> #> logistic #> The following objects are masked from ‘package:ggplot2’: #> #> %+%, alpha #> The following object is masked from ‘package:mclust’: #> #> sim # generate example data rater1 <- 1:9 rater2 <- c(1, 3, 1, 6, 1, 5, 5, 6, 7) # fit model ck <- cohen.kappa(cbind(rater1, rater2)) # summarize model fit with tidiers + visualization tidy(ck) #> # A tibble: 2 × 4 #> type estimate conf.low conf.high #> #> 1 unweighted 0 -0.185 0.185 #> 2 weighted 0.678 0.430 0.926 # graph the confidence intervals library(ggplot2) ggplot(tidy(ck), aes(estimate, type)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) kde object — tidy.kde","title":"Tidy a(n) kde object — tidy.kde","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) kde object — tidy.kde","text":"","code":"# S3 method for class 'kde' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) kde object — tidy.kde","text":"x kde object returned ks::kde(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) kde object — tidy.kde","text":"Returns data frame long format four columns. Use tidyr::pivot_wider(..., names_from = variable, values_from = value) output return wide format.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) kde object — tidy.kde","text":"tibble::tibble() columns: estimate estimated value regression term. obs weighted observed number events group. value value/estimate component. Results data reshaping. variable Variable consideration.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) kde object — tidy.kde","text":"","code":"# load libraries for models and data library(ks) # generate data dat <- replicate(2, rnorm(100)) k <- kde(dat) # summarize model fit with tidiers + visualization td <- tidy(k) td #> # A tibble: 45,602 × 4 #> obs variable value estimate #> #> 1 1 x1 -5.41 0 #> 2 2 x1 -5.34 0 #> 3 3 x1 -5.28 0 #> 4 4 x1 -5.22 0 #> 5 5 x1 -5.15 0 #> 6 6 x1 -5.09 0 #> 7 7 x1 -5.03 0 #> 8 8 x1 -4.96 0 #> 9 9 x1 -4.90 0 #> 10 10 x1 -4.84 0 #> # ℹ 45,592 more rows library(ggplot2) library(dplyr) library(tidyr) td %>% pivot_wider(c(obs, estimate), names_from = variable, values_from = value ) %>% ggplot(aes(x1, x2, fill = estimate)) + geom_tile() + theme_void() #> Warning: Specifying the `id_cols` argument by position was deprecated in tidyr #> 1.3.0. #> ℹ Please explicitly name `id_cols`, like `id_cols = c(obs, estimate)`. # also works with 3 dimensions dat3 <- replicate(3, rnorm(100)) k3 <- kde(dat3) td3 <- tidy(k3) td3 #> # A tibble: 397,953 × 4 #> obs variable value estimate #> #> 1 1 x1 -4.77 0 #> 2 2 x1 -4.59 0 #> 3 3 x1 -4.41 0 #> 4 4 x1 -4.23 0 #> 5 5 x1 -4.05 0 #> 6 6 x1 -3.87 0 #> 7 7 x1 -3.69 0 #> 8 8 x1 -3.51 0 #> 9 9 x1 -3.33 0 #> 10 10 x1 -3.15 0 #> # ℹ 397,943 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) kmeans object — tidy.kmeans","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"","code":"# S3 method for class 'kmeans' tidy(x, col.names = colnames(x$centers), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"x kmeans object created stats::kmeans(). col.names Dimension names. Defaults names variables x. Set NULL get names x1, x2, .... ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"tibble::tibble() columns: cluster factor describing cluster 1:k. size Number points assigned cluster. withinss within-cluster sum squares.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"","code":"library(cluster) library(modeldata) library(dplyr) data(hpc_data) x <- hpc_data[, 2:5] fit <- pam(x, k = 4) tidy(fit) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(fit) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(fit, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lavaan object — tidy.lavaan","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"","code":"# S3 method for class 'lavaan' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"x lavaan object, returned lavaan::cfa(), lavaan::sem(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed lavaan::parameterEstimates(). Cautionary note: Misspecified arguments may silently ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"tibble::tibble() one row estimated parameter columns: term result paste(lhs, op, rhs) op operator model syntax (e.g. ~~ covariances, ~ regression parameters) group group (specified) lavaan model estimate parameter estimate (may standardized) std.error statistic z value returned lavaan::parameterEstimates() p.value conf.low conf.high std.lv Standardized estimates based variances (continuous) latent variables std.Standardized estimates based variances (continuous) observed latent variables. std.nox Standardized estimates based variances (continuous) observed latent variables, variances exogenous covariates.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"","code":"# load libraries for models and data library(lavaan) cfa.fit <- cfa(\"F =~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9\", data = HolzingerSwineford1939, group = \"school\" ) tidy(cfa.fit) #> # A tibble: 58 × 10 #> term op block group estimate std.error statistic p.value std.lv #> #> 1 F =~ x1 =~ 1 1 1 0 NA NA 0.567 #> 2 F =~ x2 =~ 1 1 0.333 0.190 1.76 7.89e-2 0.189 #> 3 F =~ x3 =~ 1 1 0.400 0.182 2.20 2.80e-2 0.227 #> 4 F =~ x4 =~ 1 1 1.66 0.280 5.92 3.28e-9 0.941 #> 5 F =~ x5 =~ 1 1 1.92 0.323 5.95 2.60e-9 1.09 #> 6 F =~ x6 =~ 1 1 1.48 0.247 5.98 2.23e-9 0.837 #> 7 F =~ x7 =~ 1 1 0.453 0.173 2.61 8.96e-3 0.257 #> 8 F =~ x8 =~ 1 1 0.376 0.155 2.43 1.51e-2 0.213 #> 9 F =~ x9 =~ 1 1 0.422 0.159 2.66 7.80e-3 0.240 #> 10 x1 ~~ x1 ~~ 1 1 1.07 0.127 8.47 0 1.07 #> # ℹ 48 more rows #> # ℹ 1 more variable: std.all "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lm.beta object — tidy.lm.beta","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"","code":"# S3 method for class 'lm.beta' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"x lm.beta object created lm.beta::lm.beta. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"linear model mlm object (multiple linear model), additional column response. missing values model data, may need refit model na.action = na.exclude.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"","code":"# load libraries for models and data library(lm.beta) # fit models mod <- stats::lm(speed ~ ., data = cars) std <- lm.beta(mod) # summarize model fit with tidiers tidy(std, conf.int = TRUE) #> # A tibble: 2 × 8 #> term estimate std_estimate std.error statistic p.value conf.low #> #> 1 (Intercept) 8.28 NA 0.874 9.47 1.44e-12 NA #> 2 dist 0.166 0.807 0.0175 9.46 1.49e-12 0.772 #> # ℹ 1 more variable: conf.high # generate data ctl <- c(4.17, 5.58, 5.18, 6.11, 4.50, 4.61, 5.17, 4.53, 5.33, 5.14) trt <- c(4.81, 4.17, 4.41, 3.59, 5.87, 3.83, 6.03, 4.89, 4.32, 4.69) group <- gl(2, 10, 20, labels = c(\"Ctl\", \"Trt\")) weight <- c(ctl, trt) # fit models mod2 <- lm(weight ~ group) std2 <- lm.beta(mod2) # summarize model fit with tidiers tidy(std2, conf.int = TRUE) #> # A tibble: 2 × 8 #> term estimate std_estimate std.error statistic p.value conf.low #> #> 1 (Intercept) 5.03 NA 0.220 22.9 9.55e-15 NA #> 2 groupTrt -0.371 -0.270 0.311 -1.19 2.49e- 1 -0.925 #> # ℹ 1 more variable: conf.high "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lm object — tidy.lm","title":"Tidy a(n) lm object — tidy.lm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lm object — tidy.lm","text":"","code":"# S3 method for class 'lm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lm object — tidy.lm","text":"x lm object created stats::lm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lm object — tidy.lm","text":"linear model mlm object (multiple linear model), additional column response. See tidy.mlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lm object — tidy.lm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lm object — tidy.lm","text":"","code":"library(ggplot2) library(dplyr) mod <- lm(mpg ~ wt + qsec, data = mtcars) tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # coefficient plot d <- tidy(mod, conf.int = TRUE) ggplot(d, aes(estimate, term, xmin = conf.low, xmax = conf.high, height = 0)) + geom_point() + geom_vline(xintercept = 0, lty = 4) + geom_errorbarh() # aside: There are tidy() and glance() methods for lm.summary objects too. # this can be useful when you want to conserve memory by converting large lm # objects into their leaner summary.lm equivalents. s <- summary(mod) tidy(s, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(s) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32 augment(mod) #> # A tibble: 32 × 10 #> .rownames mpg wt qsec .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 0.0693 2.64 2.63e-3 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 0.0444 2.64 5.59e-6 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 0.0607 2.60 2.17e-2 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 0.0576 2.64 1.05e-4 #> 5 Hornet Sportab… 18.7 3.44 17.0 18.2 0.504 0.0389 2.64 5.29e-4 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 0.0957 2.58 5.10e-2 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 0.0729 2.61 1.93e-2 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 0.0791 2.61 2.18e-2 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 0.295 2.59 1.59e-1 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 0.0358 2.64 6.55e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid augment(mod, mtcars, interval = \"confidence\") #> # A tibble: 32 × 20 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 9 more variables: carb , .fitted , .lower , #> # .upper , .resid , .hat , .sigma , .cooksd , #> # .std.resid # predict on new data newdata <- mtcars %>% head(6) %>% mutate(wt = wt + 1) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid # ggplot2 example where we also construct 95% prediction interval # simpler bivariate model since we're plotting in 2D mod2 <- lm(mpg ~ wt, data = mtcars) au <- augment(mod2, newdata = newdata, interval = \"prediction\") ggplot(au, aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) + geom_ribbon(aes(ymin = .lower, ymax = .upper), col = NA, alpha = 0.3) # predict on new data without outcome variable. Output does not include .resid newdata <- newdata %>% select(-mpg) augment(mod, newdata = newdata) #> # A tibble: 6 × 12 #> .rownames cyl disp hp drat wt qsec vs am gear carb #> #> 1 Mazda RX4 6 160 110 3.9 3.62 16.5 0 1 4 4 #> 2 Mazda RX4 W… 6 160 110 3.9 3.88 17.0 0 1 4 4 #> 3 Datsun 710 4 108 93 3.85 3.32 18.6 1 1 4 1 #> 4 Hornet 4 Dr… 6 258 110 3.08 4.22 19.4 1 0 3 1 #> 5 Hornet Spor… 8 360 175 3.15 4.44 17.0 0 0 3 2 #> 6 Valiant 6 225 105 2.76 4.46 20.2 1 0 3 1 #> # ℹ 1 more variable: .fitted au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + geom_vline(size = 2, colour = \"white\", xintercept = 0) + geom_hline(size = 2, colour = \"white\", yintercept = 0) + geom_point() + geom_smooth(se = FALSE) #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' plot(mod, which = 6) ggplot(au, aes(.hat, .cooksd)) + geom_vline(xintercept = 0, colour = NA) + geom_abline(slope = seq(0, 3, by = 0.5), colour = \"white\") + geom_smooth(se = FALSE) + geom_point() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # column-wise models a <- matrix(rnorm(20), nrow = 10) b <- a + rnorm(length(a)) result <- lm(b ~ a) tidy(result) #> # A tibble: 6 × 6 #> response term estimate std.error statistic p.value #> #> 1 Y1 (Intercept) 0.120 0.460 0.260 0.802 #> 2 Y1 a1 1.40 0.400 3.51 0.00987 #> 3 Y1 a2 0.00979 0.337 0.0291 0.978 #> 4 Y2 (Intercept) -0.300 0.320 -0.940 0.379 #> 5 Y2 a1 0.160 0.278 0.578 0.582 #> 6 Y2 a2 0.913 0.234 3.90 0.00589"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lmRob object — tidy.lmRob","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"","code":"# S3 method for class 'lmRob' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"x lmRob object returned robust::lmRob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"","code":"# load modeling library library(robust) # fit model m <- lmRob(mpg ~ wt, data = mtcars) # summarize model fit with tidiers tidy(m) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 35.6 3.58 9.93 5.37e-11 #> 2 wt -4.91 1.09 -4.49 9.67e- 5 augment(m) #> # A tibble: 32 × 4 #> .rownames mpg wt .fitted #> #> 1 Mazda RX4 21 2.62 22.7 #> 2 Mazda RX4 Wag 21 2.88 21.4 #> 3 Datsun 710 22.8 2.32 24.2 #> 4 Hornet 4 Drive 21.4 3.22 19.8 #> 5 Hornet Sportabout 18.7 3.44 18.7 #> 6 Valiant 18.1 3.46 18.6 #> 7 Duster 360 14.3 3.57 18.0 #> 8 Merc 240D 24.4 3.19 19.9 #> 9 Merc 230 22.8 3.15 20.1 #> 10 Merc 280 19.2 3.44 18.7 #> # ℹ 22 more rows glance(m) #> # A tibble: 1 × 5 #> r.squared deviance sigma df.residual nobs #> #> 1 0.567 136. 2.95 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lmodel2 object — tidy.lmodel2","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"","code":"# S3 method for class 'lmodel2' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"x lmodel2 object returned lmodel2::lmodel2(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"always two terms lmodel2: \"Intercept\" \"Slope\". computed four methods: OLS (ordinary least squares), MA (major axis), SMA (standard major axis), RMA (ranged major axis). returned p-value one-tailed calculated via permutation test. permutational test used distributional assumptions may valid. information can found vignette(\"mod2user\", package = \"lmodel2\").","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. term name regression term. method Either OLS/MA/SMA/RMA","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"","code":"# load libraries for models and data library(lmodel2) data(mod2ex2) Ex2.res <- lmodel2(Prey ~ Predators, data = mod2ex2, \"relative\", \"relative\", 99) Ex2.res #> #> Model II regression #> #> Call: lmodel2(formula = Prey ~ Predators, data = mod2ex2, range.y #> = \"relative\", range.x = \"relative\", nperm = 99) #> #> n = 20 r = 0.8600787 r-square = 0.7397354 #> Parametric P-values: 2-tailed = 1.161748e-06 1-tailed = 5.808741e-07 #> Angle between the two OLS regression lines = 5.106227 degrees #> #> Permutation tests of OLS, MA, RMA slopes: 1-tailed, tail corresponding to sign #> A permutation test of r is equivalent to a permutation test of the OLS slope #> P-perm for SMA = NA because the SMA slope cannot be tested #> #> Regression results #> Method Intercept Slope Angle (degrees) P-perm (1-tailed) #> 1 OLS 20.02675 2.631527 69.19283 0.01 #> 2 MA 13.05968 3.465907 73.90584 0.01 #> 3 SMA 16.45205 3.059635 71.90073 NA #> 4 RMA 17.25651 2.963292 71.35239 0.01 #> #> Confidence intervals #> Method 2.5%-Intercept 97.5%-Intercept 2.5%-Slope 97.5%-Slope #> 1 OLS 12.490993 27.56251 1.858578 3.404476 #> 2 MA 1.347422 19.76310 2.663101 4.868572 #> 3 SMA 9.195287 22.10353 2.382810 3.928708 #> 4 RMA 8.962997 23.84493 2.174260 3.956527 #> #> Eigenvalues: 269.8212 6.418234 #> #> H statistic used for computing C.I. of MA: 0.006120651 #> # summarize model fit with tidiers + visualization tidy(Ex2.res) #> # A tibble: 8 × 6 #> method term estimate conf.low conf.high p.value #> #> 1 MA Intercept 13.1 1.35 19.8 0.01 #> 2 MA Slope 3.47 2.66 4.87 0.01 #> 3 OLS Intercept 20.0 12.5 27.6 0.01 #> 4 OLS Slope 2.63 1.86 3.40 0.01 #> 5 RMA Intercept 17.3 8.96 23.8 0.01 #> 6 RMA Slope 2.96 2.17 3.96 0.01 #> 7 SMA Intercept 16.5 9.20 22.1 NA #> 8 SMA Slope 3.06 2.38 3.93 NA glance(Ex2.res) #> # A tibble: 1 × 5 #> r.squared theta p.value H nobs #> #> 1 0.740 5.11 0.00000116 0.00612 20 # this allows coefficient plots with ggplot2 library(ggplot2) ggplot(tidy(Ex2.res), aes(estimate, term, color = method)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lsmobj object — tidy.lsmobj","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"","code":"# S3 method for class 'lsmobj' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"x lsmobj object. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid(). Cautionary note: misspecified arguments may silently ignored!","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"Returns data frame one observation estimated marginal mean, one column combination factors. input contrast, row contain one estimated contrast. large number arguments can passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. contrast Levels compared. df Degrees freedom used term model. null.value Value estimate compared. p.value two-sided p-value associated observed statistic. std.error standard error regression term. estimate Expected marginal mean statistic T-ratio statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"","code":"# load libraries for models and data library(emmeans) # linear model for sales of oranges per day oranges_lm1 <- lm(sales1 ~ price1 + price2 + day + store, data = oranges) # reference grid; see vignette(\"basics\", package = \"emmeans\") oranges_rg1 <- ref_grid(oranges_lm1) td <- tidy(oranges_rg1) td #> # A tibble: 36 × 9 #> price1 price2 day store estimate std.error df statistic p.value #> #> 1 51.2 48.6 1 1 2.92 2.72 23 1.07 0.294 #> 2 51.2 48.6 2 1 3.85 2.70 23 1.42 0.168 #> 3 51.2 48.6 3 1 11.0 2.53 23 4.35 0.000237 #> 4 51.2 48.6 4 1 6.10 2.65 23 2.30 0.0309 #> 5 51.2 48.6 5 1 12.8 2.44 23 5.23 0.0000261 #> 6 51.2 48.6 6 1 8.75 2.79 23 3.14 0.00459 #> 7 51.2 48.6 1 2 4.96 2.38 23 2.09 0.0482 #> 8 51.2 48.6 2 2 5.89 2.34 23 2.52 0.0190 #> 9 51.2 48.6 3 2 13.1 2.42 23 5.41 0.0000172 #> 10 51.2 48.6 4 2 8.14 2.35 23 3.46 0.00212 #> # ℹ 26 more rows # marginal averages marginal <- emmeans(oranges_rg1, \"day\") tidy(marginal) #> # A tibble: 6 × 6 #> day estimate std.error df statistic p.value #> #> 1 1 5.56 1.77 23 3.15 0.00451 #> 2 2 6.49 1.73 23 3.76 0.00103 #> 3 3 13.7 1.75 23 7.80 0.0000000658 #> 4 4 8.74 1.73 23 5.04 0.0000420 #> 5 5 15.4 1.79 23 8.65 0.0000000110 #> 6 6 11.4 1.77 23 6.45 0.00000140 # contrasts tidy(contrast(marginal)) #> # A tibble: 6 × 8 #> term contrast null.value estimate std.error df statistic adj.p.value #> #> 1 day day1 ef… 0 -4.65 1.62 23 -2.87 0.0261 #> 2 day day2 ef… 0 -3.72 1.58 23 -2.36 0.0547 #> 3 day day3 ef… 0 3.45 1.60 23 2.15 0.0637 #> 4 day day4 ef… 0 -1.47 1.59 23 -0.930 0.434 #> 5 day day5 ef… 0 5.22 1.64 23 3.18 0.0249 #> 6 day day6 ef… 0 1.18 1.62 23 0.726 0.475 tidy(contrast(marginal, method = \"pairwise\")) #> # A tibble: 15 × 8 #> term contrast null.value estimate std.error df statistic #> #> 1 day day1 - day2 0 -0.930 2.47 23 -0.377 #> 2 day day1 - day3 0 -8.10 2.47 23 -3.29 #> 3 day day1 - day4 0 -3.18 2.51 23 -1.27 #> 4 day day1 - day5 0 -9.88 2.56 23 -3.86 #> 5 day day1 - day6 0 -5.83 2.52 23 -2.31 #> 6 day day2 - day3 0 -7.17 2.48 23 -2.89 #> 7 day day2 - day4 0 -2.25 2.44 23 -0.920 #> 8 day day2 - day5 0 -8.95 2.52 23 -3.56 #> 9 day day2 - day6 0 -4.90 2.45 23 -2.00 #> 10 day day3 - day4 0 4.92 2.49 23 1.98 #> 11 day day3 - day5 0 -1.78 2.47 23 -0.719 #> 12 day day3 - day6 0 2.27 2.54 23 0.894 #> 13 day day4 - day5 0 -6.70 2.49 23 -2.69 #> 14 day day4 - day6 0 -2.65 2.45 23 -1.08 #> 15 day day5 - day6 0 4.05 2.56 23 1.58 #> # ℹ 1 more variable: adj.p.value # plot confidence intervals library(ggplot2) ggplot(tidy(marginal, conf.int = TRUE), aes(day, estimate)) + geom_point() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # by multiple prices by_price <- emmeans(oranges_lm1, \"day\", by = \"price2\", at = list( price1 = 50, price2 = c(40, 60, 80), day = c(\"2\", \"3\", \"4\") ) ) by_price #> price2 = 40: #> day emmean SE df lower.CL upper.CL #> 2 6.24 1.89 23 2.33 10.1 #> 3 13.41 2.12 23 9.02 17.8 #> 4 8.48 1.87 23 4.62 12.3 #> #> price2 = 60: #> day emmean SE df lower.CL upper.CL #> 2 9.21 2.11 23 4.85 13.6 #> 3 16.38 1.91 23 12.44 20.3 #> 4 11.46 2.18 23 6.96 16.0 #> #> price2 = 80: #> day emmean SE df lower.CL upper.CL #> 2 12.19 3.65 23 4.65 19.7 #> 3 19.36 3.27 23 12.59 26.1 #> 4 14.44 3.74 23 6.71 22.2 #> #> Results are averaged over the levels of: store #> Confidence level used: 0.95 tidy(by_price) #> # A tibble: 9 × 7 #> day price2 estimate std.error df statistic p.value #> #> 1 2 40 6.24 1.89 23 3.30 0.00310 #> 2 3 40 13.4 2.12 23 6.33 0.00000187 #> 3 4 40 8.48 1.87 23 4.55 0.000145 #> 4 2 60 9.21 2.11 23 4.37 0.000225 #> 5 3 60 16.4 1.91 23 8.60 0.0000000122 #> 6 4 60 11.5 2.18 23 5.26 0.0000244 #> 7 2 80 12.2 3.65 23 3.34 0.00282 #> 8 3 80 19.4 3.27 23 5.91 0.00000502 #> 9 4 80 14.4 3.74 23 3.86 0.000788 ggplot(tidy(by_price, conf.int = TRUE), aes(price2, estimate, color = day)) + geom_line() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # joint_tests tidy(joint_tests(oranges_lm1)) #> # A tibble: 4 × 5 #> term num.df den.df statistic p.value #> #> 1 price1 1 23 30.3 0.0000134 #> 2 price2 1 23 2.23 0.149 #> 3 day 5 23 4.88 0.00346 #> 4 store 5 23 2.52 0.0583"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) manova object — tidy.manova","title":"Tidy a(n) manova object — tidy.manova","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) manova object — tidy.manova","text":"","code":"# S3 method for class 'manova' tidy(x, test = \"Pillai\", ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) manova object — tidy.manova","text":"x manova object return stats::manova(). test One \"Pillai\" (Pillai's trace), \"Wilks\" (Wilk's lambda), \"Hotelling-Lawley\" (Hotelling-Lawley trace) \"Roy\" (Roy's greatest root) indicating test statistic used. Defaults \"Pillai\". ... Arguments passed stats::summary.manova object object class \"manova\" aov object multiple responses. intercept logical. TRUE, intercept term included table. tol tolerance used deciding residuals rank-deficient: see qr.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) manova object — tidy.manova","text":"Depending test statistic specified one pillai, wilks, hl roy included.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) manova object — tidy.manova","text":"tibble::tibble() columns: den.df Degrees freedom denominator. num.df Degrees freedom. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. term name regression term. pillai Pillai's trace. wilks Wilk's lambda. hl Hotelling-Lawley trace. roy Roy's greatest root.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) manova object — tidy.manova","text":"","code":"npk2 <- within(npk, foo <- rnorm(24)) m <- manova(cbind(yield, foo) ~ block + N * P * K, npk2) tidy(m) #> # A tibble: 8 × 7 #> term df pillai statistic num.df den.df p.value #> #> 1 block 5 0.889 1.92 10 24 0.0925 #> 2 N 1 0.521 5.97 2 11 0.0175 #> 3 P 1 0.0505 0.293 2 11 0.752 #> 4 K 1 0.357 3.05 2 11 0.0882 #> 5 N:P 1 0.103 0.633 2 11 0.549 #> 6 N:K 1 0.294 2.29 2 11 0.147 #> 7 P:K 1 0.00855 0.0474 2 11 0.954 #> 8 Residuals 12 NA NA NA NA NA"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) map object — tidy.map","title":"Tidy a(n) map object — tidy.map","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) map object — tidy.map","text":"","code":"# S3 method for class 'map' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) map object — tidy.map","text":"x map object returned maps::map(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) map object — tidy.map","text":"tibble::tibble() columns: term name regression term. long Longitude. lat Latitude. Remaining columns give information geographic attributes depend inputted map object. See ?maps::map information.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) map object — tidy.map","text":"","code":"# load libraries for models and data library(maps) #> #> Attaching package: ‘maps’ #> The following object is masked from ‘package:cluster’: #> #> votes.repub #> The following object is masked from ‘package:purrr’: #> #> map #> The following object is masked from ‘package:mclust’: #> #> map library(ggplot2) ca <- map(\"county\", \"ca\", plot = FALSE, fill = TRUE) tidy(ca) #> # A tibble: 2,977 × 7 #> term long lat group order region subregion #> #> 1 1 -121. 37.5 1 1 california alameda #> 2 2 -122. 37.5 1 2 california alameda #> 3 3 -122. 37.5 1 3 california alameda #> 4 4 -122. 37.5 1 4 california alameda #> 5 5 -122. 37.5 1 5 california alameda #> 6 6 -122. 37.5 1 6 california alameda #> 7 7 -122. 37.5 1 7 california alameda #> 8 8 -122. 37.5 1 8 california alameda #> 9 9 -122. 37.5 1 9 california alameda #> 10 10 -122. 37.5 1 10 california alameda #> # ℹ 2,967 more rows qplot(long, lat, data = ca, geom = \"polygon\", group = group) #> Warning: `qplot()` was deprecated in ggplot2 3.4.0. tx <- map(\"county\", \"texas\", plot = FALSE, fill = TRUE) tidy(tx) #> # A tibble: 4,488 × 7 #> term long lat group order region subregion #> #> 1 1 -95.8 31.5 1 1 texas anderson #> 2 2 -95.8 31.6 1 2 texas anderson #> 3 3 -95.8 31.6 1 3 texas anderson #> 4 4 -95.7 31.6 1 4 texas anderson #> 5 5 -95.7 31.6 1 5 texas anderson #> 6 6 -95.7 31.6 1 6 texas anderson #> 7 7 -95.8 31.7 1 7 texas anderson #> 8 8 -95.8 31.7 1 8 texas anderson #> 9 9 -95.8 31.6 1 9 texas anderson #> 10 10 -95.8 31.6 1 10 texas anderson #> # ℹ 4,478 more rows qplot(long, lat, data = tx, geom = \"polygon\", group = group, colour = I(\"white\") )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) margins object — tidy.margins","title":"Tidy a(n) margins object — tidy.margins","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) margins object — tidy.margins","text":"","code":"# S3 method for class 'margins' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) margins object — tidy.margins","text":"x margins object returned margins::margins(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) margins object — tidy.margins","text":"margins package provides way obtain coefficient marginal effects variety (non-linear) models, logit models multiway interaction terms. Note glance.margins() method requires rerunning underlying model , can take time. Similarly, augment.margins() method currently supported, users can simply run underlying model obtain information.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) margins object — tidy.margins","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) margins object — tidy.margins","text":"","code":"# load libraries for models and data library(margins) # example 1: logit model mod_log <- glm(am ~ cyl + hp + wt, data = mtcars, family = binomial) # get tidied \"naive\" model coefficients tidy(mod_log) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 #> 2 cyl 0.488 1.07 0.455 0.649 #> 3 hp 0.0326 0.0189 1.73 0.0840 #> 4 wt -9.15 4.15 -2.20 0.0276 # convert to marginal effects with margins() marg_log <- margins(mod_log) # get tidied marginal effects tidy(marg_log) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 cyl 0.0215 0.0470 0.457 0.648 #> 2 hp 0.00143 0.000618 2.32 0.0204 #> 3 wt -0.403 0.115 -3.49 0.000487 tidy(marg_log, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl 0.0215 0.0470 0.457 0.648 -0.0706 0.114 #> 2 hp 0.00143 0.000618 2.32 0.0204 0.000222 0.00265 #> 3 wt -0.403 0.115 -3.49 0.000487 -0.629 -0.176 # requires running the underlying model again. quick for this example glance(marg_log) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # augmenting `margins` outputs isn't supported, but # you can get the same info by running on the underlying model augment(mod_log) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid # example 2: threeway interaction terms mod_ie <- lm(mpg ~ wt * cyl * disp, data = mtcars) # get tidied \"naive\" model coefficients tidy(mod_ie) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 108. 23.3 4.62 0.000109 #> 2 wt -24.8 8.47 -2.92 0.00744 #> 3 cyl -10.8 4.34 -2.49 0.0201 #> 4 disp -0.593 0.213 -2.79 0.0102 #> 5 wt:cyl 2.91 1.42 2.05 0.0514 #> 6 wt:disp 0.184 0.0685 2.69 0.0127 #> 7 cyl:disp 0.0752 0.0268 2.81 0.00979 #> 8 wt:cyl:disp -0.0233 0.00861 -2.71 0.0123 # convert to marginal effects with margins() marg_ie0 <- margins(mod_ie) # get tidied marginal effects tidy(marg_ie0) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 cyl -3.85 1.46 -2.65 0.00812 #> 2 disp -0.0295 0.0174 -1.70 0.0900 #> 3 wt -2.01 1.17 -1.72 0.0860 glance(marg_ie0) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.896 0.865 2.21 29.4 2.75e-10 7 -66.2 150. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # marginal effects evaluated at specific values of a variable (here: cyl) marg_ie1 <- margins(mod_ie, at = list(cyl = c(4,6,8))) # summarize model fit with tidiers tidy(marg_ie1) #> # A tibble: 9 × 7 #> term at.variable at.value estimate std.error statistic p.value #> #> 1 cyl cyl 4 -3.85 1.46 -2.65 0.00808 #> 2 cyl cyl 6 -3.85 1.46 -2.65 0.00814 #> 3 cyl cyl 8 -3.85 1.46 -2.65 0.00812 #> 4 disp cyl 4 0.000978 0.0314 0.0312 0.975 #> 5 disp cyl 6 0.00134 0.0182 0.0737 0.941 #> 6 disp cyl 8 0.00170 0.0120 0.141 0.888 #> 7 wt cyl 4 7.91 5.06 1.56 0.118 #> 8 wt cyl 6 2.96 2.52 1.18 0.239 #> 9 wt cyl 8 -1.98 2.40 -0.825 0.409 # marginal effects of one interaction variable (here: wt), modulated at # specific values of the two other interaction variables (here: cyl and drat) marg_ie2 <- margins(mod_ie, variables = \"wt\", at = list(cyl = c(4,6,8), drat = c(3, 3.5, 4))) # summarize model fit with tidiers tidy(marg_ie2) #> # A tibble: 18 × 7 #> term at.variable at.value estimate std.error statistic p.value #> #> 1 wt cyl 4 7.91 5.06 1.56 0.118 #> 2 wt drat 3 7.91 5.06 1.56 0.118 #> 3 wt cyl 4 7.91 5.06 1.56 0.118 #> 4 wt drat 3.5 7.91 5.06 1.56 0.118 #> 5 wt cyl 4 7.91 5.06 1.56 0.118 #> 6 wt drat 4 7.91 5.06 1.56 0.118 #> 7 wt cyl 6 2.96 2.52 1.18 0.239 #> 8 wt drat 3 2.96 2.52 1.18 0.239 #> 9 wt cyl 6 2.96 2.52 1.18 0.239 #> 10 wt drat 3.5 2.96 2.52 1.18 0.239 #> 11 wt cyl 6 2.96 2.52 1.18 0.239 #> 12 wt drat 4 2.96 2.52 1.18 0.239 #> 13 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 14 wt drat 3 -1.98 2.40 -0.825 0.409 #> 15 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 16 wt drat 3.5 -1.98 2.40 -0.825 0.409 #> 17 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 18 wt drat 4 -1.98 2.40 -0.825 0.409"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mediate object — tidy.mediate","title":"Tidy a(n) mediate object — tidy.mediate","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mediate object — tidy.mediate","text":"","code":"# S3 method for class 'mediate' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mediate object — tidy.mediate","text":"x mediate object produced call mediation::mediate(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) mediate object — tidy.mediate","text":"tibble four rows. first two indicate mediated effect control treatment groups, respectively. last two direct effect group.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mediate object — tidy.mediate","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mediate object — tidy.mediate","text":"","code":"# load libraries for models and data library(mediation) #> mediation: Causal Mediation Analysis #> Version: 4.5.0 #> #> Attaching package: ‘mediation’ #> The following object is masked from ‘package:psych’: #> #> mediate data(jobs) # fit models b <- lm(job_seek ~ treat + econ_hard + sex + age, data = jobs) c <- lm(depress2 ~ treat + job_seek + econ_hard + sex + age, data = jobs) mod <- mediate(b, c, sims = 50, treat = \"treat\", mediator = \"job_seek\") # summarize model fit with tidiers tidy(mod) #> # A tibble: 4 × 4 #> term estimate std.error p.value #> #> 1 acme_0 -0.0143 0.0129 0.24 #> 2 acme_1 -0.0143 0.0129 0.24 #> 3 ade_0 -0.0315 0.0377 0.24 #> 4 ade_1 -0.0315 0.0377 0.24 tidy(mod, conf.int = TRUE) #> # A tibble: 4 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 acme_0 -0.0143 0.0129 0.24 -0.0349 0.0103 #> 2 acme_1 -0.0143 0.0129 0.24 -0.0349 0.0103 #> 3 ade_0 -0.0315 0.0377 0.24 -0.105 0.0584 #> 4 ade_1 -0.0315 0.0377 0.24 -0.105 0.0584 tidy(mod, conf.int = TRUE, conf.level = .99) #> # A tibble: 4 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 acme_0 -0.0143 0.0129 0.24 -0.0378 0.0243 #> 2 acme_1 -0.0143 0.0129 0.24 -0.0378 0.0243 #> 3 ade_0 -0.0315 0.0377 0.24 -0.106 0.0686 #> 4 ade_1 -0.0315 0.0377 0.24 -0.106 0.0686"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mfx object — tidy.mfx","title":"Tidy a(n) mfx object — tidy.mfx","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. particular functions provide generic tidy methods objects returned mfx package, preserving calculated marginal effects instead naive model coefficients. returned tidy tibble also include additional \"atmean\" column indicating marginal effects originally calculated (see Details ).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mfx object — tidy.mfx","text":"","code":"# S3 method for class 'mfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) # S3 method for class 'logitmfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) # S3 method for class 'negbinmfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) # S3 method for class 'poissonmfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) # S3 method for class 'probitmfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mfx object — tidy.mfx","text":"x logitmfx, negbinmfx, poissonmfx, probitmfx object. (Note betamfx objects receive set tidiers.) conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) mfx object — tidy.mfx","text":"mfx package provides methods calculating marginal effects various generalized linear models (GLMs). Unlike standard linear models, estimated model coefficients GLM directly interpreted marginal effects (.e., change response variable predicted one unit change one regressors). estimated coefficients multiplicative, dependent link function used estimation variables included model. calculating marginal effects, users must typically choose whether want use ) average observation data, ii) average sample marginal effects. See vignette(\"mfxarticle\") mfx package details.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mfx object — tidy.mfx","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. atmean TRUE marginal effects originally calculated partial effects average observation. FALSE, instead calculated average partial effects.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mfx object — tidy.mfx","text":"","code":"# load libraries for models and data library(mfx) # get the marginal effects from a logit regression mod_logmfx <- logitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) tidy(mod_logmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0538 0.113 0.475 0.635 -0.178 0.286 #> 2 hp TRUE 0.00359 0.00290 1.24 0.216 -0.00236 0.00954 #> 3 wt TRUE -1.01 0.668 -1.51 0.131 -2.38 0.359 # compare with the naive model coefficients of the same logit call tidy( glm(am ~ cyl + hp + wt, family = binomial, data = mtcars), conf.int = TRUE ) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 8.56 44.3 #> 2 cyl 0.488 1.07 0.455 0.649 -1.53 3.12 #> 3 hp 0.0326 0.0189 1.73 0.0840 0.00332 0.0884 #> 4 wt -9.15 4.15 -2.20 0.0276 -21.4 -3.48 augment(mod_logmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_logmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # another example, this time using probit regression mod_probmfx <- probitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred tidy(mod_probmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0616 0.112 0.548 0.583 -0.169 0.292 #> 2 hp TRUE 0.00383 0.00282 1.36 0.174 -0.00194 0.00960 #> 3 wt TRUE -1.06 0.594 -1.78 0.0753 -2.27 0.160 augment(mod_probmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 1.21 0.490 0.308 0.585 2.05e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.129 1.27 0.249 0.526 1.36e-1 #> 3 Datsun 7… 1 4 93 2.32 1.85 0.256 0.134 0.594 1.48e-3 #> 4 Hornet 4… 0 6 110 3.22 -1.92 -0.237 0.116 0.594 1.05e-3 #> 5 Hornet S… 0 8 175 3.44 -1.25 -0.474 0.236 0.587 1.20e-2 #> 6 Valiant 0 6 105 3.46 -3.30 -0.0312 0.0111 0.596 1.39e-6 #> 7 Duster 3… 0 8 245 3.57 -0.595 -0.804 0.285 0.567 5.32e-2 #> 8 Merc 240D 0 4 62 3.19 -3.31 -0.0304 0.0179 0.596 2.15e-6 #> 9 Merc 230 0 4 95 3.15 -2.47 -0.116 0.130 0.596 2.89e-4 #> 10 Merc 280 0 6 123 3.44 -2.85 -0.0662 0.0315 0.596 1.84e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_probmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.80 17.6 23.5 9.59 28 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mjoint object — tidy.mjoint","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"","code":"# S3 method for class 'mjoint' tidy( x, component = \"survival\", conf.int = FALSE, conf.level = 0.95, boot_se = NULL, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"x mjoint object returned joineRML::mjoint(). component Character specifying whether tidy survival longitudinal component model. Must either \"survival\" \"longitudinal\". Defaults \"survival\". conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. boot_se Optionally bootSE object joineRML::bootSE(). specified, calculates confidence intervals via bootstrap. Defaults NULL, case standard errors calculated empirical information matrix. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"","code":"# broom only skips running these examples because the example models take a # while to generate—they should run just fine, though! if (FALSE) { # \\dontrun{ # load libraries for models and data library(joineRML) # fit a joint model with bivariate longitudinal outcomes data(heart.valve) hvd <- heart.valve[!is.na(heart.valve$log.grad) & !is.na(heart.valve$log.lvmi) & heart.valve$num <= 50, ] fit <- mjoint( formLongFixed = list( \"grad\" = log.grad ~ time + sex + hs, \"lvmi\" = log.lvmi ~ time + sex ), formLongRandom = list( \"grad\" = ~ 1 | num, \"lvmi\" = ~ time | num ), formSurv = Surv(fuyrs, status) ~ age, data = hvd, inits = list(\"gamma\" = c(0.11, 1.51, 0.80)), timeVar = \"time\" ) # extract the survival fixed effects tidy(fit) # extract the longitudinal fixed effects tidy(fit, component = \"longitudinal\") # extract the survival fixed effects with confidence intervals tidy(fit, ci = TRUE) # extract the survival fixed effects with confidence intervals based # on bootstrapped standard errors bSE <- bootSE(fit, nboot = 5, safe.boot = TRUE) tidy(fit, boot_se = bSE, ci = TRUE) # augment original data with fitted longitudinal values and residuals hvd2 <- augment(fit) # extract model statistics glance(fit) } # }"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mle2 object — tidy.mle2","title":"Tidy a(n) mle2 object — tidy.mle2","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mle2 object — tidy.mle2","text":"","code":"# S3 method for class 'mle2' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mle2 object — tidy.mle2","text":"x mle2 object created call bbmle::mle2(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mle2 object — tidy.mle2","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mle2 object — tidy.mle2","text":"","code":"# load libraries for models and data library(bbmle) #> Loading required package: stats4 #> #> Attaching package: ‘bbmle’ #> The following object is masked from ‘package:dfidx’: #> #> slice #> The following object is masked from ‘package:ordinal’: #> #> slice #> The following object is masked from ‘package:dplyr’: #> #> slice # generate data x <- 0:10 y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) d <- data.frame(x, y) # fit model fit <- mle2(y ~ dpois(lambda = ymean), start = list(ymean = mean(y)), data = d ) # summarize model fit with tidiers tidy(fit) #> # A tibble: 1 × 5 #> term estimate std.error statistic p.value #> #> 1 ymean 11.5 1.02 11.3 1.86e-29"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mlm object — tidy.mlm","title":"Tidy a(n) mlm object — tidy.mlm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mlm object — tidy.mlm","text":"","code":"# S3 method for class 'mlm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mlm object — tidy.mlm","text":"x mlm object created stats::lm() matrix response. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) mlm object — tidy.mlm","text":"contrast lm object (simple linear model), tidy output mlm (multiple linear model) objects contain additional column response. missing values model data, may need refit model na.action = na.exclude.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mlm object — tidy.mlm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mlm object — tidy.mlm","text":"","code":"# fit model mod <- lm(cbind(mpg, disp) ~ wt, mtcars) # summarize model fit with tidiers tidy(mod, conf.int = TRUE) #> # A tibble: 4 × 8 #> response term estimate std.error statistic p.value conf.low conf.high #> #> 1 mpg (Inte… 37.3 1.88 19.9 8.24e-19 33.5 41.1 #> 2 mpg wt -5.34 0.559 -9.56 1.29e-10 -6.49 -4.20 #> 3 disp (Inte… -131. 35.7 -3.67 9.33e- 4 -204. -58.2 #> 4 disp wt 112. 10.6 10.6 1.22e-11 90.8 134."},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidying methods for logit models — tidy.mlogit","title":"Tidying methods for logit models — tidy.mlogit","text":"methods tidy coefficients mnl nl models generated functions mlogit package.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidying methods for logit models — tidy.mlogit","text":"","code":"# S3 method for class 'mlogit' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidying methods for logit models — tidy.mlogit","text":"x object returned mlogit::mlogit(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidying methods for logit models — tidy.mlogit","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidying methods for logit models — tidy.mlogit","text":"","code":"# load libraries for models and data library(mlogit) data(\"Fishing\", package = \"mlogit\") Fish <- dfidx(Fishing, varying = 2:9, shape = \"wide\", choice = \"mode\") # fit model m <- mlogit(mode ~ price + catch | income, data = Fish) # summarize model fit with tidiers tidy(m) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept):boat 0.527 0.223 2.37 1.79e- 2 #> 2 (Intercept):charter 1.69 0.224 7.56 3.95e-14 #> 3 (Intercept):pier 0.778 0.220 3.53 4.18e- 4 #> 4 price -0.0251 0.00173 -14.5 0 #> 5 catch 0.358 0.110 3.26 1.12e- 3 #> 6 income:boat 0.0000894 0.0000501 1.79 7.40e- 2 #> 7 income:charter -0.0000333 0.0000503 -0.661 5.08e- 1 #> 8 income:pier -0.000128 0.0000506 -2.52 1.18e- 2 augment(m) #> # A tibble: 4,728 × 9 #> id alternative chosen price catch income .probability .fitted #> #> 1 1 beach FALSE 158. 0.0678 7083. 0.125 -3.94 #> 2 1 boat FALSE 158. 0.260 7083. 0.427 -2.71 #> 3 1 charter TRUE 183. 0.539 7083. 0.339 -2.94 #> 4 1 pier FALSE 158. 0.0503 7083. 0.109 -4.07 #> 5 2 beach FALSE 15.1 0.105 1250. 0.116 -0.342 #> 6 2 boat FALSE 10.5 0.157 1250. 0.251 0.431 #> 7 2 charter TRUE 34.5 0.467 1250. 0.423 0.952 #> 8 2 pier FALSE 15.1 0.0451 1250. 0.210 0.255 #> 9 3 beach FALSE 162. 0.533 3750. 0.00689 -3.87 #> 10 3 boat TRUE 24.3 0.241 3750. 0.465 0.338 #> # ℹ 4,718 more rows #> # ℹ 1 more variable: .resid glance(m) #> # A tibble: 1 × 6 #> logLik rho2 rho20 AIC BIC nobs #> #> 1 -1215. 0.189 0.258 2446. NA 1182"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) muhaz object — tidy.muhaz","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"","code":"# S3 method for class 'muhaz' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"x muhaz object returned muhaz::muhaz(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"tibble::tibble() columns: time Point time. estimate Estimated hazard rate.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"","code":"# load libraries for models and data library(muhaz) library(survival) # fit model x <- muhaz(ovarian$futime, ovarian$fustat) # summarize model fit with tidiers tidy(x) #> # A tibble: 101 × 2 #> time estimate #> #> 1 0 0.000255 #> 2 7.44 0.000274 #> 3 14.9 0.000293 #> 4 22.3 0.000312 #> 5 29.8 0.000332 #> 6 37.2 0.000352 #> 7 44.6 0.000372 #> 8 52.1 0.000392 #> 9 59.5 0.000411 #> 10 67.0 0.000431 #> # ℹ 91 more rows glance(x) #> # A tibble: 1 × 5 #> nobs min.time max.time min.hazard max.hazard #> #> 1 26 0 744 0.000212 0.00111"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidying methods for multinomial logistic regression models — tidy.multinom","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"methods tidy coefficients multinomial logistic regression models generated multinom nnet package.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"","code":"# S3 method for class 'multinom' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"x multinom object returned nnet::multinom(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. y.value response level.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"","code":"# load libraries for models and data library(nnet) library(MASS) example(birthwt) #> #> brthwt> bwt <- with(birthwt, { #> brthwt+ race <- factor(race, labels = c(\"white\", \"black\", \"other\")) #> brthwt+ ptd <- factor(ptl > 0) #> brthwt+ ftv <- factor(ftv) #> brthwt+ levels(ftv)[-(1:2)] <- \"2+\" #> brthwt+ data.frame(low = factor(low), age, lwt, race, smoke = (smoke > 0), #> brthwt+ ptd, ht = (ht > 0), ui = (ui > 0), ftv) #> brthwt+ }) #> #> brthwt> options(contrasts = c(\"contr.treatment\", \"contr.poly\")) #> #> brthwt> glm(low ~ ., binomial, bwt) #> #> Call: glm(formula = low ~ ., family = binomial, data = bwt) #> #> Coefficients: #> (Intercept) age lwt raceblack raceother #> 0.82302 -0.03723 -0.01565 1.19241 0.74068 #> smokeTRUE ptdTRUE htTRUE uiTRUE ftv1 #> 0.75553 1.34376 1.91317 0.68020 -0.43638 #> ftv2+ #> 0.17901 #> #> Degrees of Freedom: 188 Total (i.e. Null); 178 Residual #> Null Deviance:\t 234.7 #> Residual Deviance: 195.5 \tAIC: 217.5 bwt.mu <- multinom(low ~ ., bwt) #> # weights: 12 (11 variable) #> initial value 131.004817 #> iter 10 value 98.029803 #> final value 97.737759 #> converged tidy(bwt.mu) #> # A tibble: 11 × 6 #> y.level term estimate std.error statistic p.value #> #> 1 1 (Intercept) 0.823 1.24 0.661 0.508 #> 2 1 age -0.0372 0.0387 -0.962 0.336 #> 3 1 lwt -0.0157 0.00708 -2.21 0.0271 #> 4 1 raceblack 1.19 0.536 2.22 0.0261 #> 5 1 raceother 0.741 0.462 1.60 0.109 #> 6 1 smokeTRUE 0.756 0.425 1.78 0.0755 #> 7 1 ptdTRUE 1.34 0.481 2.80 0.00518 #> 8 1 htTRUE 1.91 0.721 2.65 0.00794 #> 9 1 uiTRUE 0.680 0.464 1.46 0.143 #> 10 1 ftv1 -0.436 0.479 -0.910 0.363 #> 11 1 ftv2+ 0.179 0.456 0.392 0.695 glance(bwt.mu) #> # A tibble: 1 × 4 #> edf deviance AIC nobs #> #> 1 11 195. 217. 189 # or, for output from a multinomial logistic regression fit.gear <- multinom(gear ~ mpg + factor(am), data = mtcars) #> # weights: 12 (6 variable) #> initial value 35.155593 #> iter 10 value 14.156582 #> iter 20 value 14.031881 #> iter 30 value 14.025659 #> iter 40 value 14.021414 #> iter 50 value 14.019824 #> iter 60 value 14.019278 #> iter 70 value 14.018601 #> iter 80 value 14.018282 #> iter 80 value 14.018282 #> iter 90 value 14.017126 #> final value 14.015374 #> converged tidy(fit.gear) #> # A tibble: 6 × 6 #> y.level term estimate std.error statistic p.value #> #> 1 4 (Intercept) -11.2 5.32 -2.10 3.60e- 2 #> 2 4 mpg 0.525 0.268 1.96 5.02e- 2 #> 3 4 factor(am)1 11.9 66.9 0.178 8.59e- 1 #> 4 5 (Intercept) -18.4 67.9 -0.271 7.87e- 1 #> 5 5 mpg 0.366 0.292 1.25 2.10e- 1 #> 6 5 factor(am)1 22.4 2.17 10.3 4.54e-25 glance(fit.gear) #> # A tibble: 1 × 4 #> edf deviance AIC nobs #> #> 1 6 28.0 40.0 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.negbin.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) negbin object — tidy.negbin","title":"Tidy a(n) negbin object — tidy.negbin","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.negbin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) negbin object — tidy.negbin","text":"","code":"# S3 method for class 'negbin' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.negbin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) negbin object — tidy.negbin","text":"x glm.nb object returned MASS::glm.nb(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... tidy(), additional arguments passed summary(). Otherwise ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.negbin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) negbin object — tidy.negbin","text":"","code":"# load libraries for models and data library(MASS) # fit model r <- glm.nb(Days ~ Sex / (Age + Eth * Lrn), data = quine) # summarize model fit with tidiers tidy(r) #> # A tibble: 14 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 3.02 0.297 10.2 2.89e-24 #> 2 SexM -0.475 0.396 -1.20 2.29e- 1 #> 3 SexF:AgeF1 -0.709 0.323 -2.19 2.83e- 2 #> 4 SexM:AgeF1 -0.724 0.330 -2.19 2.85e- 2 #> 5 SexF:AgeF2 -0.615 0.371 -1.66 9.78e- 2 #> 6 SexM:AgeF2 0.628 0.274 2.30 2.17e- 2 #> 7 SexF:AgeF3 -0.342 0.327 -1.05 2.95e- 1 #> 8 SexM:AgeF3 1.15 0.314 3.67 2.46e- 4 #> 9 SexF:EthN -0.0731 0.265 -0.276 7.83e- 1 #> 10 SexM:EthN -0.679 0.256 -2.65 8.07e- 3 #> 11 SexF:LrnSL 0.944 0.322 2.93 3.43e- 3 #> 12 SexM:LrnSL 0.239 0.336 0.712 4.76e- 1 #> 13 SexF:EthN:LrnSL -1.36 0.377 -3.60 3.16e- 4 #> 14 SexM:EthN:LrnSL 0.761 0.441 1.73 8.45e- 2 glance(r) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 235. 145 -531.5125 1093. 1138. 168. 132 146"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) nlrq object — tidy.nlrq","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"","code":"# S3 method for class 'nlrq' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"x nlrq object returned quantreg::nlrq(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"","code":"# load modeling library library(quantreg) # build artificial data with multiplicative error set.seed(1) dat <- NULL dat$x <- rep(1:25, 20) dat$y <- SSlogis(dat$x, 10, 12, 2) * rnorm(500, 1, 0.1) # fit the median using nlrq mod <- nlrq(y ~ SSlogis(x, Asym, mid, scal), data = dat, tau = 0.5, trace = TRUE ) #> 109.059 : 9.968027 11.947208 1.962113 #> final value 108.942725 #> converged #> lambda = 1 #> 108.9427 : 9.958648 11.943273 1.967144 #> final value 108.490939 #> stopped after 2 iterations #> lambda = 0.9750984 #> 108.4909 : 9.949430 11.987472 1.998607 #> final value 108.471416 #> converged #> lambda = 0.9999299 #> 108.4714 : 9.94163 11.99077 1.99344 #> final value 108.471243 #> converged #> lambda = 1 #> 108.4712 : 9.941008 11.990550 1.992921 #> final value 108.470935 #> converged #> lambda = 0.8621249 #> 108.4709 : 9.942734 11.992773 1.993209 #> final value 108.470923 #> converged #> lambda = 0.9999613 #> 108.4709 : 9.942629 11.992728 1.993136 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Asym 9.94 0.0841 118. 0 #> 2 mid 12.0 0.0673 178. 0 #> 3 scal 1.99 0.0248 80.3 0 glance(mod) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -429.0842 864. 877. 497 augment(mod) #> # A tibble: 500 × 4 #> x y .fitted .resid #> #> 1 1 0.0382 0.0399 -0.00171 #> 2 2 0.0682 0.0657 0.00250 #> 3 3 0.101 0.108 -0.00728 #> 4 4 0.209 0.177 0.0315 #> 5 5 0.303 0.289 0.0137 #> 6 6 0.435 0.469 -0.0332 #> 7 7 0.796 0.751 0.0448 #> 8 8 1.28 1.18 0.0982 #> 9 9 1.93 1.81 0.118 #> 10 10 2.61 2.67 -0.0671 #> # ℹ 490 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) nls object — tidy.nls","title":"Tidy a(n) nls object — tidy.nls","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) nls object — tidy.nls","text":"","code":"# S3 method for class 'nls' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) nls object — tidy.nls","text":"x nls object returned stats::nls(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) nls object — tidy.nls","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) nls object — tidy.nls","text":"","code":"# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 k 49.7 3.79 13.1 5.96e-14 #> 2 e 0.746 0.0199 37.5 8.86e-27 augment(n) #> # A tibble: 32 × 4 #> mpg wt .fitted .resid #> #> 1 21 2.62 23.0 -2.01 #> 2 21 2.88 21.4 -0.352 #> 3 22.8 2.32 25.1 -2.33 #> 4 21.4 3.22 19.3 2.08 #> 5 18.7 3.44 18.1 0.611 #> 6 18.1 3.46 18.0 0.117 #> 7 14.3 3.57 17.4 -3.11 #> 8 24.4 3.19 19.5 4.93 #> 9 22.8 3.15 19.7 3.10 #> 10 19.2 3.44 18.1 1.11 #> # ℹ 22 more rows glance(n) #> # A tibble: 1 × 9 #> sigma isConv finTol logLik AIC BIC deviance df.residual nobs #> #> 1 2.67 TRUE 0.00000204 -75.8 158. 162. 214. 30 32 library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata) #> # A tibble: 6 × 13 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 2 more variables: carb , .fitted "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) orcutt object — tidy.orcutt","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"","code":"# S3 method for class 'orcutt' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"x orcutt object returned orcutt::cochrane.orcutt(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"tibble::tibble() columns: estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"","code":"# load libraries for models and data library(orcutt) # fit model and summarize results reg <- lm(mpg ~ wt + qsec + disp, mtcars) tidy(reg) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.8 5.94 3.33 0.00244 #> 2 wt -5.03 1.22 -4.11 0.000310 #> 3 qsec 0.927 0.342 2.71 0.0114 #> 4 disp -0.000128 0.0106 -0.0121 0.990 co <- cochrane.orcutt(reg) tidy(co) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 21.8 6.63 3.29 0.00279 #> 2 wt -4.85 1.33 -3.65 0.00112 #> 3 qsec 0.797 0.370 2.15 0.0402 #> 4 disp -0.00136 0.0110 -0.123 0.903 glance(co) #> # A tibble: 1 × 9 #> r.squared adj.r.squared rho number.interaction dw.original #> #> 1 0.799 0.777 0.268 7 1.50 #> # ℹ 4 more variables: p.value.original , dw.transformed , #> # p.value.transformed , nobs "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"","code":"# S3 method for class 'pairwise.htest' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"x pairwise.htest object returned stats::pairwise.t.test() stats::pairwise.wilcox.test(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"Note one-sided tests, alternative hypothesis test can stated \"group1 greater/less group2\". Note also columns group1 group2 always factor, even original input (e.g.) numeric.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"tibble::tibble() columns: group1 First group compared. group2 Second group compared. p.value two-sided p-value associated observed statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"","code":"attach(airquality) Month <- factor(Month, labels = month.abb[5:9]) ptt <- pairwise.t.test(Ozone, Month) tidy(ptt) #> # A tibble: 10 × 3 #> group1 group2 p.value #> #> 1 Jun May 1 #> 2 Jul May 0.000264 #> 3 Jul Jun 0.0511 #> 4 Aug May 0.000195 #> 5 Aug Jun 0.0499 #> 6 Aug Jul 1 #> 7 Sep May 1 #> 8 Sep Jun 1 #> 9 Sep Jul 0.00488 #> 10 Sep Aug 0.00388 library(modeldata) data(hpc_data) attach(hpc_data) ptt2 <- pairwise.t.test(compounds, class) tidy(ptt2) #> # A tibble: 6 × 3 #> group1 group2 p.value #> #> 1 F VF 9.28e- 8 #> 2 M VF 2.55e- 61 #> 3 M F 4.26e- 34 #> 4 L VF 2.52e-126 #> 5 L F 5.44e- 95 #> 6 L M 2.45e- 25 tidy(pairwise.t.test(compounds, class, alternative = \"greater\")) #> # A tibble: 6 × 3 #> group1 group2 p.value #> #> 1 F VF 4.64e- 8 #> 2 M VF 1.27e- 61 #> 3 M F 2.13e- 34 #> 4 L VF 1.26e-126 #> 5 L F 2.72e- 95 #> 6 L M 1.22e- 25 tidy(pairwise.t.test(compounds, class, alternative = \"less\")) #> # A tibble: 6 × 3 #> group1 group2 p.value #> #> 1 F VF 1 #> 2 M VF 1 #> 3 M F 1 #> 4 L VF 1 #> 5 L F 1 #> 6 L M 1 tidy(pairwise.wilcox.test(compounds, class)) #> # A tibble: 6 × 3 #> group1 group2 p.value #> #> 1 F VF 4.85e-32 #> 2 M VF 2.41e-66 #> 3 M F 1.45e-23 #> 4 L VF 1.90e-77 #> 5 L F 1.28e-42 #> 6 L M 6.84e- 9"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) pam object — tidy.pam","title":"Tidy a(n) pam object — tidy.pam","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) pam object — tidy.pam","text":"","code":"# S3 method for class 'pam' tidy(x, col.names = paste0(\"x\", 1:ncol(x$medoids)), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) pam object — tidy.pam","text":"x pam object returned cluster::pam() col.names Column names input data frame. Defaults names variables x. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) pam object — tidy.pam","text":"examples, see pam vignette.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) pam object — tidy.pam","text":"tibble::tibble() columns: size Size cluster. max.diss Maximal dissimilarity observations cluster cluster's medoid. avg.diss Average dissimilarity observations cluster cluster's medoid. diameter Diameter cluster. separation Separation cluster. avg.width Average silhouette width cluster. cluster factor describing cluster 1:k.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) pam object — tidy.pam","text":"","code":"# load libraries for models and data library(dplyr) library(ggplot2) library(cluster) library(modeldata) data(hpc_data) x <- hpc_data[, 2:5] p <- pam(x, k = 4) # summarize model fit with tidiers + visualization tidy(p) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(p) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(p, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows augment(p, x) %>% ggplot(aes(compounds, input_fields)) + geom_point(aes(color = .cluster)) + geom_text(aes(label = cluster), data = tidy(p), size = 10)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) plm object — tidy.plm","title":"Tidy a(n) plm object — tidy.plm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) plm object — tidy.plm","text":"","code":"# S3 method for class 'plm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) plm object — tidy.plm","text":"x plm objected returned plm::plm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) plm object — tidy.plm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) plm object — tidy.plm","text":"","code":"# load libraries for models and data library(plm) # load data data(\"Produc\", package = \"plm\") # fit model zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, index = c(\"state\", \"year\") ) # summarize model fit with tidiers summary(zz) #> Oneway (individual) effect Within Model #> #> Call: #> plm(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, #> data = Produc, index = c(\"state\", \"year\")) #> #> Balanced Panel: n = 48, T = 17, N = 816 #> #> Residuals: #> Min. 1st Qu. Median 3rd Qu. Max. #> -0.120456 -0.023741 -0.002041 0.018144 0.174718 #> #> Coefficients: #> Estimate Std. Error t-value Pr(>|t|) #> log(pcap) -0.02614965 0.02900158 -0.9017 0.3675 #> log(pc) 0.29200693 0.02511967 11.6246 < 2.2e-16 *** #> log(emp) 0.76815947 0.03009174 25.5273 < 2.2e-16 *** #> unemp -0.00529774 0.00098873 -5.3582 1.114e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Total Sum of Squares: 18.941 #> Residual Sum of Squares: 1.1112 #> R-Squared: 0.94134 #> Adj. R-Squared: 0.93742 #> F-statistic: 3064.81 on 4 and 764 DF, p-value: < 2.22e-16 tidy(zz) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 tidy(zz, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0830 0.0307 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.243 0.341 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.709 0.827 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00724 -0.00336 tidy(zz, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0739 0.0216 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.251 0.333 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.719 0.818 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00692 -0.00367 augment(zz) #> # A tibble: 816 × 7 #> `log(gsp)` `log(pcap)` `log(pc)` `log(emp)` unemp .fitted .resid #> #> 1 10.25478 9.617981 10.48553 6.918201 4.7 10.3 -0.046561413 #> 2 10.28790 9.648720 10.52675 6.929419 5.2 10.3 -0.030640422 #> 3 10.35147 9.678618 10.56283 6.977561 4.7 10.4 -0.016454312 #> 4 10.41721 9.705418 10.59873 7.034828 3.9 10.4 -0.008726974 #> 5 10.42671 9.726910 10.64679 7.064588 5.5 10.5 -0.027084312 #> 6 10.42240 9.759401 10.69130 7.052202 7.7 10.4 -0.022368930 #> 7 10.48470 9.783175 10.82420 7.095893 6.8 10.5 -0.036587629 #> 8 10.53111 9.804326 10.84125 7.146142 7.4 10.6 -0.030020604 #> 9 10.59573 9.824430 10.87055 7.197810 6.3 10.6 -0.018942497 #> 10 10.62082 9.845937 10.90643 7.216709 7.1 10.6 -0.014057170 #> # ℹ 806 more rows glance(zz) #> # A tibble: 1 × 7 #> r.squared adj.r.squared statistic p.value deviance df.residual nobs #> #> 1 0.941 0.937 3065. 0 1.11 764 816"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) poLCA object — tidy.poLCA","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"","code":"# S3 method for class 'poLCA' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"x poLCA object returned poLCA::poLCA(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"tibble::tibble() columns: class class consideration. outcome Outcome manifest variable. std.error standard error regression term. variable Manifest variable estimate Estimated class-conditional response probability","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"","code":"# load libraries for models and data library(poLCA) library(dplyr) # generate data data(values) f <- cbind(A, B, C, D) ~ 1 # fit model M1 <- poLCA(f, values, nclass = 2, verbose = FALSE) M1 #> Conditional item response (column) probabilities, #> by outcome variable, for each class (row) #> #> $A #> Pr(1) Pr(2) #> class 1: 0.2864 0.7136 #> class 2: 0.0068 0.9932 #> #> $B #> Pr(1) Pr(2) #> class 1: 0.6704 0.3296 #> class 2: 0.0602 0.9398 #> #> $C #> Pr(1) Pr(2) #> class 1: 0.6460 0.3540 #> class 2: 0.0735 0.9265 #> #> $D #> Pr(1) Pr(2) #> class 1: 0.8676 0.1324 #> class 2: 0.2309 0.7691 #> #> Estimated class population shares #> 0.7208 0.2792 #> #> Predicted class memberships (by modal posterior prob.) #> 0.6713 0.3287 #> #> ========================================================= #> Fit for 2 latent classes: #> ========================================================= #> number of observations: 216 #> number of estimated parameters: 9 #> residual degrees of freedom: 6 #> maximum log-likelihood: -504.4677 #> #> AIC(2): 1026.935 #> BIC(2): 1057.313 #> G^2(2): 2.719922 (Likelihood ratio/deviance statistic) #> X^2(2): 2.719764 (Chi-square goodness of fit) #> # summarize model fit with tidiers + visualization tidy(M1) #> # A tibble: 16 × 5 #> variable class outcome estimate std.error #> #> 1 A 1 1 0.286 0.0393 #> 2 A 2 1 0.00681 0.0254 #> 3 A 1 2 0.714 0.0393 #> 4 A 2 2 0.993 0.0254 #> 5 B 1 1 0.670 0.0489 #> 6 B 2 1 0.0602 0.0649 #> 7 B 1 2 0.330 0.0489 #> 8 B 2 2 0.940 0.0649 #> 9 C 1 1 0.646 0.0482 #> 10 C 2 1 0.0735 0.0642 #> 11 C 1 2 0.354 0.0482 #> 12 C 2 2 0.927 0.0642 #> 13 D 1 1 0.868 0.0379 #> 14 D 2 1 0.231 0.0929 #> 15 D 1 2 0.132 0.0379 #> 16 D 2 2 0.769 0.0929 augment(M1) #> # A tibble: 216 × 7 #> A B C D X.Intercept. .class .probability #> #> 1 2 2 2 2 1 2 0.959 #> 2 2 2 2 2 1 2 0.959 #> 3 2 2 2 2 1 2 0.959 #> 4 2 2 2 2 1 2 0.959 #> 5 2 2 2 2 1 2 0.959 #> 6 2 2 2 2 1 2 0.959 #> 7 2 2 2 2 1 2 0.959 #> 8 2 2 2 2 1 2 0.959 #> 9 2 2 2 2 1 2 0.959 #> 10 2 2 2 2 1 2 0.959 #> # ℹ 206 more rows glance(M1) #> # A tibble: 1 × 8 #> logLik AIC BIC g.squared chi.squared df df.residual nobs #> #> 1 -504. 1027. 1057. 2.72 2.72 9 6 216 library(ggplot2) ggplot(tidy(M1), aes(factor(class), estimate, fill = factor(outcome))) + geom_bar(stat = \"identity\", width = 1) + facet_wrap(~variable) # three-class model with a single covariate. data(election) f2a <- cbind( MORALG, CARESG, KNOWG, LEADG, DISHONG, INTELG, MORALB, CARESB, KNOWB, LEADB, DISHONB, INTELB ) ~ PARTY nes2a <- poLCA(f2a, election, nclass = 3, nrep = 5, verbose = FALSE) #> Error in eval(predvars, data, env): object 'MORALG' not found td <- tidy(nes2a) #> Error: object 'nes2a' not found td #> Error: object 'td' not found ggplot(td, aes(outcome, estimate, color = factor(class), group = class)) + geom_line() + facet_wrap(~variable, nrow = 2) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) #> Error: object 'td' not found au <- augment(nes2a) #> Error: object 'nes2a' not found au #> Error: object 'au' not found count(au, .class) #> Error: object 'au' not found # if the original data is provided, it leads to NAs in new columns # for rows that weren't predicted au2 <- augment(nes2a, data = election) #> Error: object 'nes2a' not found au2 #> Error: object 'au2' not found dim(au2) #> Error: object 'au2' not found"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) polr object — tidy.polr","title":"Tidy a(n) polr object — tidy.polr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) polr object — tidy.polr","text":"","code":"# S3 method for class 'polr' tidy( x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, p.values = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) polr object — tidy.polr","text":"x polr object returned MASS::polr(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. p.values Logical. p-values returned, based chi-squared tests MASS::dropterm(). Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) polr object — tidy.polr","text":"broom 0.7.0 coefficient_type column renamed coef.type, contents changed well. Now contents coefficient scale, rather coefficient zeta. Calculating p.values dropterm() function approach suggested MASS package author. approach computationally intensive p.values returned requested explicitly. Additionally, works models containing variables two categories. condition met, message shown NA returned instead p-values.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) polr object — tidy.polr","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) polr object — tidy.polr","text":"","code":"# load libraries for models and data library(MASS) # fit model fit <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) # summarize model fit with tidiers tidy(fit, exponentiate = TRUE, conf.int = TRUE) #> #> Re-fitting to get Hessian #> # A tibble: 8 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 InflMedium 1.76 0.105 5.41 1.44 2.16 coefficie… #> 2 InflHigh 3.63 0.127 10.1 2.83 4.66 coefficie… #> 3 TypeApartment 0.564 0.119 -4.80 0.446 0.712 coefficie… #> 4 TypeAtrium 0.693 0.155 -2.36 0.511 0.940 coefficie… #> 5 TypeTerrace 0.336 0.151 -7.20 0.249 0.451 coefficie… #> 6 ContHigh 1.43 0.0955 3.77 1.19 1.73 coefficie… #> 7 Low|Medium 0.609 0.125 -3.97 NA NA scale #> 8 Medium|High 2.00 0.125 5.50 NA NA scale glance(fit) #> # A tibble: 1 × 7 #> edf logLik AIC BIC deviance df.residual nobs #> #> 1 8 -1740. 3495. 3539. 3479. 1673 1681 augment(fit, type.predict = \"class\") #> # A tibble: 72 × 6 #> Sat Infl Type Cont `(weights)` .fitted #> #> 1 Low Low Tower Low 21 Low #> 2 Medium Low Tower Low 21 Low #> 3 High Low Tower Low 28 Low #> 4 Low Medium Tower Low 34 High #> 5 Medium Medium Tower Low 22 High #> 6 High Medium Tower Low 36 High #> 7 Low High Tower Low 10 High #> 8 Medium High Tower Low 11 High #> 9 High High Tower Low 36 High #> 10 Low Low Apartment Low 61 Low #> # ℹ 62 more rows fit2 <- polr(factor(gear) ~ am + mpg + qsec, data = mtcars) tidy(fit, p.values = TRUE) #> #> Re-fitting to get Hessian #> p-values can presently only be returned for models that contain no #> categorical variables with more than two levels. #> # A tibble: 8 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 InflMedium 0.566 0.105 5.41 NA coefficient #> 2 InflHigh 1.29 0.127 10.1 NA coefficient #> 3 TypeApartment -0.572 0.119 -4.80 NA coefficient #> 4 TypeAtrium -0.366 0.155 -2.36 NA coefficient #> 5 TypeTerrace -1.09 0.151 -7.20 NA coefficient #> 6 ContHigh 0.360 0.0955 3.77 NA coefficient #> 7 Low|Medium -0.496 0.125 -3.97 NA scale #> 8 Medium|High 0.691 0.125 5.50 NA scale"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) power.htest object — tidy.power.htest","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"","code":"# S3 method for class 'power.htest' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"x power.htest object returned stats::power.t.test(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"tibble::tibble() columns: delta True difference means. n Number observations component. power Power achieved given value n. sd Standard deviation. sig.level Significance level (Type error probability).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"","code":"ptt <- power.t.test(n = 2:30, delta = 1) tidy(ptt) #> # A tibble: 29 × 5 #> n delta sd sig.level power #> #> 1 2 1 1 0.05 0.0913 #> 2 3 1 1 0.05 0.157 #> 3 4 1 1 0.05 0.222 #> 4 5 1 1 0.05 0.286 #> 5 6 1 1 0.05 0.347 #> 6 7 1 1 0.05 0.406 #> 7 8 1 1 0.05 0.461 #> 8 9 1 1 0.05 0.513 #> 9 10 1 1 0.05 0.562 #> 10 11 1 1 0.05 0.607 #> # ℹ 19 more rows library(ggplot2) ggplot(tidy(ptt), aes(n, power)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) prcomp object — tidy.prcomp","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"","code":"# S3 method for class 'prcomp' tidy(x, matrix = \"u\", ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"x prcomp object returned stats::prcomp(). matrix Character specifying component PCA tidied. \"u\", \"samples\", \"scores\", \"x\": returns information map original space principle components space. \"v\", \"rotation\", \"loadings\" \"variables\": returns information map principle components space back original space. \"d\", \"eigenvalues\" \"pcs\": returns information eigenvalues. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"tibble::tibble columns depending component PCA tidied. matrix \"u\", \"samples\", \"scores\", \"x\" row tidied output corresponds original data PCA space. columns : row ID original observation (.e. rowname original data). PC Integer indicating principal component. value score observation particular principal component. , location observation PCA space. matrix \"v\", \"rotation\", \"loadings\" \"variables\", row tidied output corresponds information principle components original space. columns : row variable labels (colnames) data set PCA performed. PC integer vector indicating principal component. value value eigenvector (axis score) indicated principal component. matrix \"d\", \"eigenvalues\" \"pcs\", columns : PC integer vector indicating principal component. std.dev Standard deviation explained PC. percent Fraction variation explained component (numeric value 0 1). cumulative Cumulative fraction variation explained principle components component (numeric value 0 1).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"See https://stats.stackexchange.com/questions/134282/relationship--svd--pca---use-svd--perform-pca information interpret various tidied matrices. Note SVD equivalent PCA centered data.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"","code":"pc <- prcomp(USArrests, scale = TRUE) # information about rotation tidy(pc) #> # A tibble: 200 × 3 #> row PC value #> #> 1 Alabama 1 -0.976 #> 2 Alabama 2 -1.12 #> 3 Alabama 3 0.440 #> 4 Alabama 4 0.155 #> 5 Alaska 1 -1.93 #> 6 Alaska 2 -1.06 #> 7 Alaska 3 -2.02 #> 8 Alaska 4 -0.434 #> 9 Arizona 1 -1.75 #> 10 Arizona 2 0.738 #> # ℹ 190 more rows # information about samples (states) tidy(pc, \"samples\") #> # A tibble: 200 × 3 #> row PC value #> #> 1 Alabama 1 -0.976 #> 2 Alabama 2 -1.12 #> 3 Alabama 3 0.440 #> 4 Alabama 4 0.155 #> 5 Alaska 1 -1.93 #> 6 Alaska 2 -1.06 #> 7 Alaska 3 -2.02 #> 8 Alaska 4 -0.434 #> 9 Arizona 1 -1.75 #> 10 Arizona 2 0.738 #> # ℹ 190 more rows # information about PCs tidy(pc, \"pcs\") #> # A tibble: 4 × 4 #> PC std.dev percent cumulative #> #> 1 1 1.57 0.620 0.620 #> 2 2 0.995 0.247 0.868 #> 3 3 0.597 0.0891 0.957 #> 4 4 0.416 0.0434 1 # state map library(dplyr) library(ggplot2) library(maps) pc %>% tidy(matrix = \"samples\") %>% mutate(region = tolower(row)) %>% inner_join(map_data(\"state\"), by = \"region\") %>% ggplot(aes(long, lat, group = group, fill = value)) + geom_polygon() + facet_wrap(~PC) + theme_void() + ggtitle(\"Principal components of arrest data\") #> Warning: Detected an unexpected many-to-many relationship between `x` and `y`. #> ℹ Row 1 of `x` matches multiple rows in `y`. #> ℹ Row 1 of `y` matches multiple rows in `x`. #> ℹ If a many-to-many relationship is expected, set `relationship = #> \"many-to-many\"` to silence this warning. au <- augment(pc, data = USArrests) au #> # A tibble: 50 × 9 #> .rownames Murder Assault UrbanPop Rape .fittedPC1 .fittedPC2 #> #> 1 Alabama 13.2 236 58 21.2 -0.976 -1.12 #> 2 Alaska 10 263 48 44.5 -1.93 -1.06 #> 3 Arizona 8.1 294 80 31 -1.75 0.738 #> 4 Arkansas 8.8 190 50 19.5 0.140 -1.11 #> 5 California 9 276 91 40.6 -2.50 1.53 #> 6 Colorado 7.9 204 78 38.7 -1.50 0.978 #> 7 Connecticut 3.3 110 77 11.1 1.34 1.08 #> 8 Delaware 5.9 238 72 15.8 -0.0472 0.322 #> 9 Florida 15.4 335 80 31.9 -2.98 -0.0388 #> 10 Georgia 17.4 211 60 25.8 -1.62 -1.27 #> # ℹ 40 more rows #> # ℹ 2 more variables: .fittedPC3 , .fittedPC4 ggplot(au, aes(.fittedPC1, .fittedPC2)) + geom_point() + geom_text(aes(label = .rownames), vjust = 1, hjust = 1)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) pyears object — tidy.pyears","title":"Tidy a(n) pyears object — tidy.pyears","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) pyears object — tidy.pyears","text":"","code":"# S3 method for class 'pyears' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) pyears object — tidy.pyears","text":"x pyears object returned survival::pyears(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) pyears object — tidy.pyears","text":"expected present output ratetable term present. data.frame = TRUE argument supplied pyears, simply contents x$data.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) pyears object — tidy.pyears","text":"tibble::tibble() columns: expected Expected number events. pyears Person-years exposure. n number subjects contributing time event observed number events","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) pyears object — tidy.pyears","text":"","code":"# load libraries for models and data library(survival) # generate and format data temp.yr <- tcut(mgus$dxyr, 55:92, labels = as.character(55:91)) temp.age <- tcut(mgus$age, 34:101, labels = as.character(34:100)) ptime <- ifelse(is.na(mgus$pctime), mgus$futime, mgus$pctime) pstat <- ifelse(is.na(mgus$pctime), 0, 1) pfit <- pyears(Surv(ptime / 365.25, pstat) ~ temp.yr + temp.age + sex, mgus, data.frame = TRUE ) # summarize model fit with tidiers tidy(pfit) #> # A tibble: 1,752 × 6 #> temp.yr temp.age sex pyears n event #> #> 1 71 34 female 0.00274 1 0 #> 2 68 35 female 0.00274 1 0 #> 3 72 35 female 0.00274 1 0 #> 4 69 36 female 0.00274 1 0 #> 5 73 36 female 0.00274 1 0 #> 6 69 37 female 0.00274 1 0 #> 7 70 37 female 0.00274 1 0 #> 8 74 37 female 0.00274 1 0 #> 9 70 38 female 0.00274 1 0 #> 10 71 38 female 0.00274 1 0 #> # ℹ 1,742 more rows glance(pfit) #> # A tibble: 1 × 3 #> total offtable nobs #> #> 1 8.32 0.727 241 # if data.frame argument is not given, different information is present in # output pfit2 <- pyears(Surv(ptime / 365.25, pstat) ~ temp.yr + temp.age + sex, mgus) tidy(pfit2) #> # A tibble: 37 × 402 #> pyears.34.female pyears.35.female pyears.36.female pyears.37.female #> #> 1 0 0 0 0 #> 2 0 0 0 0 #> 3 0 0 0 0 #> 4 0 0 0 0 #> 5 0 0 0 0 #> 6 0 0 0 0 #> 7 0 0 0 0 #> 8 0 0 0 0 #> 9 0 0 0 0 #> 10 0 0 0 0 #> # ℹ 27 more rows #> # ℹ 398 more variables: pyears.38.female , pyears.39.female , #> # pyears.40.female , pyears.41.female , #> # pyears.42.female , pyears.43.female , #> # pyears.44.female , pyears.45.female , #> # pyears.46.female , pyears.47.female , #> # pyears.48.female , pyears.49.female , … glance(pfit2) #> # A tibble: 1 × 3 #> total offtable nobs #> #> 1 8.32 0.727 241"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rcorr object — tidy.rcorr","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"","code":"# S3 method for class 'rcorr' tidy(x, diagonal = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"x rcorr object returned Hmisc::rcorr(). diagonal Logical indicating whether include diagonal elements correlation matrix, correlation column . elements, estimate always 1 p.value always NA. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"Suppose original data columns B. correlation matrix rcorr may entries cor(, B) cor(B, ). one pairs ever present tidy output.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"tibble::tibble() columns: column1 Name index first column described. column2 Name index second column described. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. n Number observations used compute correlation","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"","code":"# load libraries for models and data library(Hmisc) #> #> Attaching package: ‘Hmisc’ #> The following object is masked from ‘package:psych’: #> #> describe #> The following object is masked from ‘package:network’: #> #> is.discrete #> The following object is masked from ‘package:survey’: #> #> deff #> The following object is masked from ‘package:quantreg’: #> #> latex #> The following objects are masked from ‘package:dplyr’: #> #> src, summarize #> The following objects are masked from ‘package:base’: #> #> format.pval, units mat <- replicate(52, rnorm(100)) # add some NAs mat[sample(length(mat), 2000)] <- NA # also, column names colnames(mat) <- c(LETTERS, letters) # fit model rc <- rcorr(mat) # summarize model fit with tidiers + visualization td <- tidy(rc) td #> # A tibble: 1,326 × 5 #> column1 column2 estimate n p.value #> #> 1 B A -0.0806 41 0.616 #> 2 C A -0.194 38 0.242 #> 3 C B 0.0811 37 0.633 #> 4 D A -0.451 37 0.00505 #> 5 D B -0.258 35 0.134 #> 6 D C -0.183 35 0.292 #> 7 E A -0.0593 42 0.709 #> 8 E B 0.0208 45 0.892 #> 9 E C -0.228 44 0.136 #> 10 E D -0.0134 34 0.940 #> # ℹ 1,316 more rows library(ggplot2) ggplot(td, aes(p.value)) + geom_histogram(binwidth = .1) ggplot(td, aes(estimate, p.value)) + geom_point() + scale_y_log10()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ref.grid object — tidy.ref.grid","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"","code":"# S3 method for class 'ref.grid' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"x ref.grid object created emmeans::ref_grid(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid(). Cautionary note: misspecified arguments may silently ignored!","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"Returns data frame one observation estimated marginal mean, one column combination factors. input contrast, row contain one estimated contrast. large number arguments can passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. df Degrees freedom used term model. p.value two-sided p-value associated observed statistic. std.error standard error regression term. estimate Expected marginal mean statistic T-ratio statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"","code":"# load libraries for models and data library(emmeans) # linear model for sales of oranges per day oranges_lm1 <- lm(sales1 ~ price1 + price2 + day + store, data = oranges) # reference grid; see vignette(\"basics\", package = \"emmeans\") oranges_rg1 <- ref_grid(oranges_lm1) td <- tidy(oranges_rg1) td #> # A tibble: 36 × 9 #> price1 price2 day store estimate std.error df statistic p.value #> #> 1 51.2 48.6 1 1 2.92 2.72 23 1.07 0.294 #> 2 51.2 48.6 2 1 3.85 2.70 23 1.42 0.168 #> 3 51.2 48.6 3 1 11.0 2.53 23 4.35 0.000237 #> 4 51.2 48.6 4 1 6.10 2.65 23 2.30 0.0309 #> 5 51.2 48.6 5 1 12.8 2.44 23 5.23 0.0000261 #> 6 51.2 48.6 6 1 8.75 2.79 23 3.14 0.00459 #> 7 51.2 48.6 1 2 4.96 2.38 23 2.09 0.0482 #> 8 51.2 48.6 2 2 5.89 2.34 23 2.52 0.0190 #> 9 51.2 48.6 3 2 13.1 2.42 23 5.41 0.0000172 #> 10 51.2 48.6 4 2 8.14 2.35 23 3.46 0.00212 #> # ℹ 26 more rows # marginal averages marginal <- emmeans(oranges_rg1, \"day\") tidy(marginal) #> # A tibble: 6 × 6 #> day estimate std.error df statistic p.value #> #> 1 1 5.56 1.77 23 3.15 0.00451 #> 2 2 6.49 1.73 23 3.76 0.00103 #> 3 3 13.7 1.75 23 7.80 0.0000000658 #> 4 4 8.74 1.73 23 5.04 0.0000420 #> 5 5 15.4 1.79 23 8.65 0.0000000110 #> 6 6 11.4 1.77 23 6.45 0.00000140 # contrasts tidy(contrast(marginal)) #> # A tibble: 6 × 8 #> term contrast null.value estimate std.error df statistic adj.p.value #> #> 1 day day1 ef… 0 -4.65 1.62 23 -2.87 0.0261 #> 2 day day2 ef… 0 -3.72 1.58 23 -2.36 0.0547 #> 3 day day3 ef… 0 3.45 1.60 23 2.15 0.0637 #> 4 day day4 ef… 0 -1.47 1.59 23 -0.930 0.434 #> 5 day day5 ef… 0 5.22 1.64 23 3.18 0.0249 #> 6 day day6 ef… 0 1.18 1.62 23 0.726 0.475 tidy(contrast(marginal, method = \"pairwise\")) #> # A tibble: 15 × 8 #> term contrast null.value estimate std.error df statistic #> #> 1 day day1 - day2 0 -0.930 2.47 23 -0.377 #> 2 day day1 - day3 0 -8.10 2.47 23 -3.29 #> 3 day day1 - day4 0 -3.18 2.51 23 -1.27 #> 4 day day1 - day5 0 -9.88 2.56 23 -3.86 #> 5 day day1 - day6 0 -5.83 2.52 23 -2.31 #> 6 day day2 - day3 0 -7.17 2.48 23 -2.89 #> 7 day day2 - day4 0 -2.25 2.44 23 -0.920 #> 8 day day2 - day5 0 -8.95 2.52 23 -3.56 #> 9 day day2 - day6 0 -4.90 2.45 23 -2.00 #> 10 day day3 - day4 0 4.92 2.49 23 1.98 #> 11 day day3 - day5 0 -1.78 2.47 23 -0.719 #> 12 day day3 - day6 0 2.27 2.54 23 0.894 #> 13 day day4 - day5 0 -6.70 2.49 23 -2.69 #> 14 day day4 - day6 0 -2.65 2.45 23 -1.08 #> 15 day day5 - day6 0 4.05 2.56 23 1.58 #> # ℹ 1 more variable: adj.p.value # plot confidence intervals library(ggplot2) ggplot(tidy(marginal, conf.int = TRUE), aes(day, estimate)) + geom_point() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # by multiple prices by_price <- emmeans(oranges_lm1, \"day\", by = \"price2\", at = list( price1 = 50, price2 = c(40, 60, 80), day = c(\"2\", \"3\", \"4\") ) ) by_price #> price2 = 40: #> day emmean SE df lower.CL upper.CL #> 2 6.24 1.89 23 2.33 10.1 #> 3 13.41 2.12 23 9.02 17.8 #> 4 8.48 1.87 23 4.62 12.3 #> #> price2 = 60: #> day emmean SE df lower.CL upper.CL #> 2 9.21 2.11 23 4.85 13.6 #> 3 16.38 1.91 23 12.44 20.3 #> 4 11.46 2.18 23 6.96 16.0 #> #> price2 = 80: #> day emmean SE df lower.CL upper.CL #> 2 12.19 3.65 23 4.65 19.7 #> 3 19.36 3.27 23 12.59 26.1 #> 4 14.44 3.74 23 6.71 22.2 #> #> Results are averaged over the levels of: store #> Confidence level used: 0.95 tidy(by_price) #> # A tibble: 9 × 7 #> day price2 estimate std.error df statistic p.value #> #> 1 2 40 6.24 1.89 23 3.30 0.00310 #> 2 3 40 13.4 2.12 23 6.33 0.00000187 #> 3 4 40 8.48 1.87 23 4.55 0.000145 #> 4 2 60 9.21 2.11 23 4.37 0.000225 #> 5 3 60 16.4 1.91 23 8.60 0.0000000122 #> 6 4 60 11.5 2.18 23 5.26 0.0000244 #> 7 2 80 12.2 3.65 23 3.34 0.00282 #> 8 3 80 19.4 3.27 23 5.91 0.00000502 #> 9 4 80 14.4 3.74 23 3.86 0.000788 ggplot(tidy(by_price, conf.int = TRUE), aes(price2, estimate, color = day)) + geom_line() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # joint_tests tidy(joint_tests(oranges_lm1)) #> # A tibble: 4 × 5 #> term num.df den.df statistic p.value #> #> 1 price1 1 23 30.3 0.0000134 #> 2 price2 1 23 2.23 0.149 #> 3 day 5 23 4.88 0.00346 #> 4 store 5 23 2.52 0.0583"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) regsubsets object — tidy.regsubsets","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"","code":"# S3 method for class 'regsubsets' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"x regsubsets object created leaps::regsubsets(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"tibble::tibble() columns: r.squared R squared statistic, percent variation explained model. adj.r.squared Adjusted R squared statistic BIC Bayesian information criterion component. mallows_cp Mallow's Cp statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"","code":"# load libraries for models and data library(leaps) # fit model all_fits <- regsubsets(hp ~ ., mtcars) # summarize model fit with tidiers tidy(all_fits) #> # A tibble: 8 × 15 #> `(Intercept)` mpg cyl disp drat wt qsec vs am gear #> #> 1 TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> 2 TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE #> 3 TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE #> 4 TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE #> 5 TRUE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE FALSE #> 6 TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE #> 7 TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE #> 8 TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE #> # ℹ 5 more variables: carb , r.squared , adj.r.squared , #> # BIC , mallows_cp "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ridgelm object — tidy.ridgelm","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"","code":"# S3 method for class 'ridgelm' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"x ridgelm object returned MASS::lm.ridge(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"tibble::tibble() columns: GCV Generalized cross validation error estimate. lambda Value penalty parameter lambda. term name regression term. estimate estimate scaled coefficient using lambda scale Scaling factor estimated coefficient","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"","code":"# load libraries for models and data library(MASS) names(longley)[1] <- \"y\" # fit model and summarizd results fit1 <- lm.ridge(y ~ ., longley) tidy(fit1) #> # A tibble: 6 × 5 #> lambda GCV term estimate scale #> #> 1 0 0.128 GNP 25.4 96.2 #> 2 0 0.128 Unemployed 3.30 90.5 #> 3 0 0.128 Armed.Forces 0.752 67.4 #> 4 0 0.128 Population -11.7 6.74 #> 5 0 0.128 Year -6.54 4.61 #> 6 0 0.128 Employed 0.786 3.40 fit2 <- lm.ridge(y ~ ., longley, lambda = seq(0.001, .05, .001)) td2 <- tidy(fit2) g2 <- glance(fit2) # coefficient plot library(ggplot2) ggplot(td2, aes(lambda, estimate, color = term)) + geom_line() # GCV plot ggplot(td2, aes(lambda, GCV)) + geom_line() # add line for the GCV minimizing estimate ggplot(td2, aes(lambda, GCV)) + geom_line() + geom_vline(xintercept = g2$lambdaGCV, col = \"red\", lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rlm object — tidy.rlm","title":"Tidy a(n) rlm object — tidy.rlm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rlm object — tidy.rlm","text":"","code":"# S3 method for class 'rlm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rlm object — tidy.rlm","text":"x rlm object returned MASS::rlm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glmrob object — tidy.glmrob","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"","code":"# S3 method for class 'glmrob' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"x glmrob object returned robustbase::glmrob(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lmrob object — tidy.lmrob","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"","code":"# S3 method for class 'lmrob' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"x lmrob object returned robustbase::lmrob(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) roc object — tidy.roc","title":"Tidy a(n) roc object — tidy.roc","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) roc object — tidy.roc","text":"","code":"# S3 method for class 'roc' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) roc object — tidy.roc","text":"x roc object returned call AUC::roc(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) roc object — tidy.roc","text":"tibble::tibble() columns: cutoff cutoff used classification. Observations predicted probabilities value assigned class 1, observations predicted probabilities value assigned class 0. fpr False positive rate. tpr true positive rate given cutoff.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) roc object — tidy.roc","text":"","code":"# load libraries for models and data library(AUC) #> AUC 0.3.2 #> Type AUCNews() to see the change log and ?AUC to get an overview. #> #> Attaching package: ‘AUC’ #> The following objects are masked from ‘package:caret’: #> #> sensitivity, specificity # load data data(churn) # fit model r <- roc(churn$predictions, churn$labels) # summarize with tidiers + visualization td <- tidy(r) td #> # A tibble: 220 × 3 #> cutoff fpr tpr #> #> 1 1 0 0 #> 2 1 0.00262 0.164 #> 3 0.972 0.00350 0.164 #> 4 0.968 0.00350 0.182 #> 5 0.964 0.00350 0.189 #> 6 0.96 0.00350 0.201 #> 7 0.932 0.00437 0.201 #> 8 0.91 0.00437 0.208 #> 9 0.908 0.00525 0.208 #> 10 0.902 0.00525 0.214 #> # ℹ 210 more rows library(ggplot2) ggplot(td, aes(fpr, tpr)) + geom_line() # compare the ROC curves for two prediction algorithms library(dplyr) library(tidyr) rocs <- churn %>% pivot_longer(contains(\"predictions\"), names_to = \"algorithm\", values_to = \"value\" ) %>% nest(data = -algorithm) %>% mutate(tidy_roc = purrr::map(data, ~ tidy(roc(.x$value, .x$labels)))) %>% unnest(tidy_roc) ggplot(rocs, aes(fpr, tpr, color = algorithm)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rq object — tidy.rq","title":"Tidy a(n) rq object — tidy.rq","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rq object — tidy.rq","text":"","code":"# S3 method for class 'rq' tidy(x, se.type = NULL, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rq object — tidy.rq","text":"x rq object returned quantreg::rq(). se.type Character specifying method use calculate standard errors. Passed quantreg::summary.rq() se argument. Defaults \"rank\" sample size less 1000, otherwise defaults \"nid\". conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed quantreg::summary.rq().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) rq object — tidy.rq","text":"se.type = \"rank\" confidence intervals calculated summary.rq statistic p.value values returned. single predictor included model, confidence intervals calculated confidence limits set NA.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) rq object — tidy.rq","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) rq object — tidy.rq","text":"","code":"# load modeling library and data library(quantreg) data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.124 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -78.76986 160. 161. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 0.393 0.696 0.269 0.124 0.5 #> 2 0.458 0.266 0.334 0.124 0.5 #> 3 -1.22 0.660 -1.34 0.124 0.5 #> 4 -1.12 0.212 -1.25 0.124 0.5 #> 5 0.993 0.00527 0.869 0.124 0.5 #> 6 -1.83 0.103 -1.96 0.124 0.5 #> 7 0.124 0.287 0 0.124 0.5 #> 8 0.591 0.444 0.467 0.124 0.5 #> 9 0.805 0.693 0.681 0.124 0.5 #> 10 0.00754 0.0209 -0.116 0.124 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rqs object — tidy.rqs","title":"Tidy a(n) rqs object — tidy.rqs","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rqs object — tidy.rqs","text":"","code":"# S3 method for class 'rqs' tidy(x, se.type = \"rank\", conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rqs object — tidy.rqs","text":"x rqs object returned quantreg::rq(). se.type Character specifying method use calculate standard errors. Passed quantreg::summary.rq() se argument. Defaults \"rank\". conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed quantreg::summary.rqs()","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) rqs object — tidy.rqs","text":"se.type = \"rank\" confidence intervals calculated summary.rq. single predictor included model, confidence intervals calculated confidence limits set NA.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) rqs object — tidy.rqs","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. quantile Linear conditional quantile.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) rqs object — tidy.rqs","text":"","code":"# load modeling library and data library(quantreg) data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.0744 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -72.9869 148. 150. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 1.25 0.192 1.18 0.0744 0.5 #> 2 0.458 0.321 0.383 0.0744 0.5 #> 3 0.765 0.0297 0.691 0.0744 0.5 #> 4 0.392 0.870 0.317 0.0744 0.5 #> 5 -0.547 0.647 -0.622 0.0744 0.5 #> 6 -0.468 0.319 -0.542 0.0744 0.5 #> 7 -1.11 0.293 -1.18 0.0744 0.5 #> 8 0.786 0.669 0.711 0.0744 0.5 #> 9 -0.648 0.408 -0.722 0.0744 0.5 #> 10 1.07 0.664 1.00 0.0744 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidying methods for spatially autoregressive models — tidy.sarlm","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"methods tidy coefficients spatial autoregression models generated functions spatialreg package.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"","code":"# S3 method for class 'sarlm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"x object returned spatialreg::lagsarlm() spatialreg::errorsarlm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"","code":"# load libraries for models and data library(spatialreg) library(spdep) # load data data(oldcol, package = \"spdep\") listw <- nb2listw(COL.nb, style = \"W\") # fit model crime_sar <- lagsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw = listw, method = \"eigen\" ) # summarize model fit with tidiers tidy(crime_sar) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 tidy(crime_sar, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 0.200 0.662 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 31.0 59.1 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 -1.63 -0.434 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 -0.439 -0.0925 glance(crime_sar) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 375. 384. 4679. -182. 49 augment(crime_sar) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.6 -3.84 #> 2 1 4.48 33.2 32.4 46.6 -14.2 #> 3 1 11.3 37.1 38.4 41.4 -2.97 #> 4 1 8.44 75 0.178 37.9 -37.7 #> 5 1 19.5 80.5 15.7 14.2 1.54 #> 6 1 16.0 26.4 30.6 34.3 -3.66 #> 7 1 11.3 23.2 50.7 44.7 5.99 #> 8 1 16.0 28.8 26.1 38.4 -12.3 #> 9 1 9.87 18 48.6 51.7 -3.12 #> 10 1 13.6 96.4 34.0 16.3 17.7 #> # ℹ 39 more rows # fit another model crime_sem <- errorsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sem) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 59.9 5.37 11.2 0 #> 2 INC -0.941 0.331 -2.85 0.00441 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 #> 4 lambda 0.562 0.134 4.20 0.0000271 tidy(crime_sem, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 59.9 5.37 11.2 0 49.4 70.4 #> 2 INC -0.941 0.331 -2.85 0.00441 -1.59 -0.293 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 -0.480 -0.125 #> 4 lambda 0.562 0.134 4.20 0.0000271 0.299 0.824 glance(crime_sem) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.658 377. 386. 4683. -183. 49 augment(crime_sem) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.5 -3.70 #> 2 1 4.48 33.2 32.4 44.9 -12.5 #> 3 1 11.3 37.1 38.4 38.2 0.223 #> 4 1 8.44 75 0.178 35.0 -34.8 #> 5 1 19.5 80.5 15.7 13.3 2.45 #> 6 1 16.0 26.4 30.6 35.0 -4.33 #> 7 1 11.3 23.2 50.7 42.3 8.41 #> 8 1 16.0 28.8 26.1 39.4 -13.3 #> 9 1 9.87 18 48.6 49.3 -0.721 #> 10 1 13.6 96.4 34.0 16.6 17.4 #> # ℹ 39 more rows # fit another model crime_sac <- sacsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sac) #> # A tibble: 5 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.368 0.197 1.87 0.0613 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 #> 3 INC -1.03 0.326 -3.14 0.00167 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 #> 5 lambda 0.167 0.297 0.562 0.574 tidy(crime_sac, conf.int = TRUE) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.368 0.197 1.87 0.0613 -0.0174 0.754 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 28.4 67.2 #> 3 INC -1.03 0.326 -3.14 0.00167 -1.67 -0.386 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 -0.458 -0.105 #> 5 lambda 0.167 0.297 0.562 0.574 -0.415 0.748 glance(crime_sac) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 376. 388. 4685. -182. 49 augment(crime_sac) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.2 -3.37 #> 2 1 4.48 33.2 32.4 46.4 -14.0 #> 3 1 11.3 37.1 38.4 40.4 -2.00 #> 4 1 8.44 75 0.178 37.5 -37.3 #> 5 1 19.5 80.5 15.7 13.5 2.25 #> 6 1 16.0 26.4 30.6 34.4 -3.74 #> 7 1 11.3 23.2 50.7 44.1 6.60 #> 8 1 16.0 28.8 26.1 39.0 -12.9 #> 9 1 9.87 18 48.6 51.5 -2.93 #> 10 1 13.6 96.4 34.0 15.8 18.2 #> # ℹ 39 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) spec object — tidy.spec","title":"Tidy a(n) spec object — tidy.spec","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) spec object — tidy.spec","text":"","code":"# S3 method for class 'spec' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) spec object — tidy.spec","text":"x spec object created stats::spectrum(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) spec object — tidy.spec","text":"tibble::tibble() columns: freq Vector frequencies spectral density estimated. spec Vector (univariate series) matrix (multivariate series) estimates spectral density frequencies corresponding freq.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) spec object — tidy.spec","text":"","code":"spc <- spectrum(lh) tidy(spc) #> # A tibble: 24 × 2 #> freq spec #> #> 1 0.0208 0.0912 #> 2 0.0417 0.331 #> 3 0.0625 0.836 #> 4 0.0833 1.17 #> 5 0.104 0.350 #> 6 0.125 1.51 #> 7 0.146 0.328 #> 8 0.167 0.618 #> 9 0.188 0.320 #> 10 0.208 0.0675 #> # ℹ 14 more rows library(ggplot2) ggplot(tidy(spc), aes(freq, spec)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) speedglm object — tidy.speedglm","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"","code":"# S3 method for class 'speedglm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"x speedglm object returned speedglm::speedglm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"","code":"# load libraries for models and data library(speedglm) # generate data clotting <- data.frame( u = c(5, 10, 15, 20, 30, 40, 60, 80, 100), lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18) ) # fit model fit <- speedglm(lot1 ~ log(u), data = clotting, family = Gamma(log)) # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 5.50 0.190 28.9 0.0000000152 #> 2 log(u) -0.602 0.0553 -10.9 0.0000122 glance(fit) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 3.51 8 -26.2 58.5 59.1 0.163 7 9"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) speedlm object — tidy.speedlm","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"","code":"# S3 method for class 'speedlm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"x speedlm object returned speedglm::speedlm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"","code":"# load modeling library library(speedglm) # fit model mod <- speedlm(mpg ~ wt + qsec, data = mtcars, fitted = TRUE) # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 11 #> r.squared adj.r.squared statistic p.value df logLik AIC BIC #> #> 1 0.826 0.814 69.0 9.39e-12 3 -74.4 157. 163. #> # ℹ 3 more variables: deviance , df.residual , nobs augment(mod) #> # A tibble: 32 × 6 #> .rownames mpg wt qsec .fitted .resid #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 #> 5 Hornet Sportabout 18.7 3.44 17.0 18.2 0.504 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 #> # ℹ 22 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) summary.glht object — tidy.summary.glht","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"","code":"# S3 method for class 'summary.glht' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"x summary.glht object created calling multcomp::summary.glht() glht object created multcomp::glht(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"tibble::tibble() columns: contrast Levels compared. estimate estimated value regression term. null.value Value estimate compared. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"","code":"# load libraries for models and data library(multcomp) library(ggplot2) amod <- aov(breaks ~ wool + tension, data = warpbreaks) wht <- glht(amod, linfct = mcp(tension = \"Tukey\")) tidy(wht) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0337 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00109 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(wht, aes(lhs, estimate)) + geom_point() CI <- confint(wht) tidy(CI) #> # A tibble: 3 × 5 #> term contrast estimate conf.low conf.high #> #> 1 tension M - L -10 -19.4 -0.643 #> 2 tension H - L -14.7 -24.1 -5.37 #> 3 tension H - M -4.72 -14.1 4.63 ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + geom_pointrange() tidy(summary(wht)) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0336 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00121 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(mapping = aes(lhs, estimate)) + geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + geom_point(aes(size = p), data = summary(wht)) + scale_size(trans = \"reverse\") cld <- cld(wht) tidy(cld) #> # A tibble: 3 × 2 #> tension letters #> #> 1 L a #> 2 M b #> 3 H b"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) summary.lm object — tidy.summary.lm","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"","code":"# S3 method for class 'summary.lm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"x summary.lm object created stats::summary.lm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"tidy.summary.lm() method potentially useful alternative tidy.lm(). instance, users already converted large lm objects leaner summary.lm equivalents conserve memory.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"","code":"# fit model mod <- lm(mpg ~ wt + qsec, data = mtcars) modsumm <- summary(mod) # summarize model fit with tidiers tidy(mod, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 # equivalent to the above tidy(modsumm, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # mostly the same, except for a few missing columns glance(modsumm) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) summary_emm object — tidy.summary_emm","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"","code":"# S3 method for class 'summary_emm' tidy(x, null.value = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"x summary_emm object. null.value Value estimate compared. ... Additional arguments passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid(). Cautionary note: misspecified arguments may silently ignored!","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"Returns data frame one observation estimated marginal mean, one column combination factors. input contrast, row contain one estimated contrast. large number arguments can passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. contrast Levels compared. den.df Degrees freedom denominator. df Degrees freedom used term model. null.value Value estimate compared. num.df Degrees freedom. p.value two-sided p-value associated observed statistic. std.error standard error regression term. level1 One level factor contrasted level2 level factor contrasted term Model term joint tests estimate Expected marginal mean statistic T-ratio statistic F-ratio statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"","code":"# load libraries for models and data library(emmeans) # linear model for sales of oranges per day oranges_lm1 <- lm(sales1 ~ price1 + price2 + day + store, data = oranges) # reference grid; see vignette(\"basics\", package = \"emmeans\") oranges_rg1 <- ref_grid(oranges_lm1) td <- tidy(oranges_rg1) td #> # A tibble: 36 × 9 #> price1 price2 day store estimate std.error df statistic p.value #> #> 1 51.2 48.6 1 1 2.92 2.72 23 1.07 0.294 #> 2 51.2 48.6 2 1 3.85 2.70 23 1.42 0.168 #> 3 51.2 48.6 3 1 11.0 2.53 23 4.35 0.000237 #> 4 51.2 48.6 4 1 6.10 2.65 23 2.30 0.0309 #> 5 51.2 48.6 5 1 12.8 2.44 23 5.23 0.0000261 #> 6 51.2 48.6 6 1 8.75 2.79 23 3.14 0.00459 #> 7 51.2 48.6 1 2 4.96 2.38 23 2.09 0.0482 #> 8 51.2 48.6 2 2 5.89 2.34 23 2.52 0.0190 #> 9 51.2 48.6 3 2 13.1 2.42 23 5.41 0.0000172 #> 10 51.2 48.6 4 2 8.14 2.35 23 3.46 0.00212 #> # ℹ 26 more rows # marginal averages marginal <- emmeans(oranges_rg1, \"day\") tidy(marginal) #> # A tibble: 6 × 6 #> day estimate std.error df statistic p.value #> #> 1 1 5.56 1.77 23 3.15 0.00451 #> 2 2 6.49 1.73 23 3.76 0.00103 #> 3 3 13.7 1.75 23 7.80 0.0000000658 #> 4 4 8.74 1.73 23 5.04 0.0000420 #> 5 5 15.4 1.79 23 8.65 0.0000000110 #> 6 6 11.4 1.77 23 6.45 0.00000140 # contrasts tidy(contrast(marginal)) #> # A tibble: 6 × 8 #> term contrast null.value estimate std.error df statistic adj.p.value #> #> 1 day day1 ef… 0 -4.65 1.62 23 -2.87 0.0261 #> 2 day day2 ef… 0 -3.72 1.58 23 -2.36 0.0547 #> 3 day day3 ef… 0 3.45 1.60 23 2.15 0.0637 #> 4 day day4 ef… 0 -1.47 1.59 23 -0.930 0.434 #> 5 day day5 ef… 0 5.22 1.64 23 3.18 0.0249 #> 6 day day6 ef… 0 1.18 1.62 23 0.726 0.475 tidy(contrast(marginal, method = \"pairwise\")) #> # A tibble: 15 × 8 #> term contrast null.value estimate std.error df statistic #> #> 1 day day1 - day2 0 -0.930 2.47 23 -0.377 #> 2 day day1 - day3 0 -8.10 2.47 23 -3.29 #> 3 day day1 - day4 0 -3.18 2.51 23 -1.27 #> 4 day day1 - day5 0 -9.88 2.56 23 -3.86 #> 5 day day1 - day6 0 -5.83 2.52 23 -2.31 #> 6 day day2 - day3 0 -7.17 2.48 23 -2.89 #> 7 day day2 - day4 0 -2.25 2.44 23 -0.920 #> 8 day day2 - day5 0 -8.95 2.52 23 -3.56 #> 9 day day2 - day6 0 -4.90 2.45 23 -2.00 #> 10 day day3 - day4 0 4.92 2.49 23 1.98 #> 11 day day3 - day5 0 -1.78 2.47 23 -0.719 #> 12 day day3 - day6 0 2.27 2.54 23 0.894 #> 13 day day4 - day5 0 -6.70 2.49 23 -2.69 #> 14 day day4 - day6 0 -2.65 2.45 23 -1.08 #> 15 day day5 - day6 0 4.05 2.56 23 1.58 #> # ℹ 1 more variable: adj.p.value # plot confidence intervals library(ggplot2) ggplot(tidy(marginal, conf.int = TRUE), aes(day, estimate)) + geom_point() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # by multiple prices by_price <- emmeans(oranges_lm1, \"day\", by = \"price2\", at = list( price1 = 50, price2 = c(40, 60, 80), day = c(\"2\", \"3\", \"4\") ) ) by_price #> price2 = 40: #> day emmean SE df lower.CL upper.CL #> 2 6.24 1.89 23 2.33 10.1 #> 3 13.41 2.12 23 9.02 17.8 #> 4 8.48 1.87 23 4.62 12.3 #> #> price2 = 60: #> day emmean SE df lower.CL upper.CL #> 2 9.21 2.11 23 4.85 13.6 #> 3 16.38 1.91 23 12.44 20.3 #> 4 11.46 2.18 23 6.96 16.0 #> #> price2 = 80: #> day emmean SE df lower.CL upper.CL #> 2 12.19 3.65 23 4.65 19.7 #> 3 19.36 3.27 23 12.59 26.1 #> 4 14.44 3.74 23 6.71 22.2 #> #> Results are averaged over the levels of: store #> Confidence level used: 0.95 tidy(by_price) #> # A tibble: 9 × 7 #> day price2 estimate std.error df statistic p.value #> #> 1 2 40 6.24 1.89 23 3.30 0.00310 #> 2 3 40 13.4 2.12 23 6.33 0.00000187 #> 3 4 40 8.48 1.87 23 4.55 0.000145 #> 4 2 60 9.21 2.11 23 4.37 0.000225 #> 5 3 60 16.4 1.91 23 8.60 0.0000000122 #> 6 4 60 11.5 2.18 23 5.26 0.0000244 #> 7 2 80 12.2 3.65 23 3.34 0.00282 #> 8 3 80 19.4 3.27 23 5.91 0.00000502 #> 9 4 80 14.4 3.74 23 3.86 0.000788 ggplot(tidy(by_price, conf.int = TRUE), aes(price2, estimate, color = day)) + geom_line() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # joint_tests tidy(joint_tests(oranges_lm1)) #> # A tibble: 4 × 5 #> term num.df den.df statistic p.value #> #> 1 price1 1 23 30.3 0.0000134 #> 2 price2 1 23 2.23 0.149 #> 3 day 5 23 4.88 0.00346 #> 4 store 5 23 2.52 0.0583"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) survdiff object — tidy.survdiff","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"","code":"# S3 method for class 'survdiff' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"x survdiff object returned survival::survdiff(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"tibble::tibble() columns: exp Weighted expected number events group. N Number subjects group. obs weighted observed number events group.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"","code":"# load libraries for models and data library(survival) # fit model s <- survdiff( Surv(time, status) ~ pat.karno + strata(inst), data = lung ) # summarize model fit with tidiers tidy(s) #> # A tibble: 8 × 4 #> pat.karno N obs exp #> #> 1 30 2 1 0.692 #> 2 40 2 1 1.10 #> 3 50 4 4 1.17 #> 4 60 30 27 16.3 #> 5 70 41 31 26.4 #> 6 80 50 38 41.9 #> 7 90 60 38 47.2 #> 8 100 35 21 26.2 glance(s) #> # A tibble: 1 × 3 #> statistic df p.value #> #> 1 21.4 7 0.00326"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) survexp object — tidy.survexp","title":"Tidy a(n) survexp object — tidy.survexp","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) survexp object — tidy.survexp","text":"","code":"# S3 method for class 'survexp' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) survexp object — tidy.survexp","text":"x survexp object returned survival::survexp(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) survexp object — tidy.survexp","text":"tibble::tibble() columns: n.risk Number individuals risk time zero. time Point time. estimate Estimate survival","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) survexp object — tidy.survexp","text":"","code":"# load libraries for models and data library(survival) # fit model sexpfit <- survexp( futime ~ 1, rmap = list( sex = \"male\", year = accept.dt, age = (accept.dt - birth.dt) ), method = \"conditional\", data = jasa ) # summarize model fit with tidiers tidy(sexpfit) #> # A tibble: 88 × 3 #> time estimate n.risk #> #> 1 0 1 102 #> 2 1 1.00 102 #> 3 2 1.00 99 #> 4 4 1.00 96 #> 5 5 1.00 94 #> 6 7 1.00 92 #> 7 8 1.00 91 #> 8 10 1.00 90 #> 9 11 1.00 89 #> 10 15 1.00 88 #> # ℹ 78 more rows glance(sexpfit) #> # A tibble: 1 × 3 #> n.max n.start timepoints #> #> 1 102 102 88"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) survfit object — tidy.survfit","title":"Tidy a(n) survfit object — tidy.survfit","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) survfit object — tidy.survfit","text":"","code":"# S3 method for class 'survfit' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) survfit object — tidy.survfit","text":"x survfit object returned survival::survfit(). ... glance.survfit(), additional arguments passed summary(). Otherwise ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) survfit object — tidy.survfit","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. n.censor Number censored events. n.event Number events time t. n.risk Number individuals risk time zero. std.error standard error regression term. time Point time. estimate estimate survival cumulative incidence rate multistate state state multistate survfit object input strata strata stratified survfit object input","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) survfit object — tidy.survfit","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) sfit <- survfit(cfit) # summarize model fit with tidiers + visualization tidy(sfit) #> # A tibble: 186 × 8 #> time n.risk n.event n.censor estimate std.error conf.high conf.low #> #> 1 5 228 1 0 0.996 0.00419 1 0.988 #> 2 11 227 3 0 0.983 0.00845 1.00 0.967 #> 3 12 224 1 0 0.979 0.00947 0.997 0.961 #> 4 13 223 2 0 0.971 0.0113 0.992 0.949 #> 5 15 221 1 0 0.966 0.0121 0.990 0.944 #> 6 26 220 1 0 0.962 0.0129 0.987 0.938 #> 7 30 219 1 0 0.958 0.0136 0.984 0.933 #> 8 31 218 1 0 0.954 0.0143 0.981 0.927 #> 9 53 217 2 0 0.945 0.0157 0.975 0.917 #> 10 54 215 1 0 0.941 0.0163 0.972 0.911 #> # ℹ 176 more rows glance(sfit) #> # A tibble: 1 × 10 #> records n.max n.start events rmean rmean.std.error median conf.low #> #> 1 228 228 228 165 381. 20.3 320 285 #> # ℹ 2 more variables: conf.high , nobs library(ggplot2) ggplot(tidy(sfit), aes(time, estimate)) + geom_line() + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25) # multi-state fitCI <- survfit(Surv(stop, status * as.numeric(event), type = \"mstate\") ~ 1, data = mgus1, subset = (start == 0) ) td_multi <- tidy(fitCI) td_multi #> # A tibble: 711 × 9 #> time n.risk n.event n.censor estimate std.error conf.high conf.low #> #> 1 6 241 0 0 0.996 0.00414 1 0.988 #> 2 7 240 0 0 0.992 0.00584 1 0.980 #> 3 31 239 0 0 0.988 0.00714 1 0.974 #> 4 32 238 0 0 0.983 0.00823 1.00 0.967 #> 5 39 237 0 0 0.979 0.00918 0.997 0.961 #> 6 60 236 0 0 0.975 0.0100 0.995 0.956 #> 7 61 235 0 0 0.967 0.0115 0.990 0.944 #> 8 152 233 0 0 0.963 0.0122 0.987 0.939 #> 9 153 232 0 0 0.959 0.0128 0.984 0.934 #> 10 174 231 0 0 0.954 0.0134 0.981 0.928 #> # ℹ 701 more rows #> # ℹ 1 more variable: state ggplot(td_multi, aes(time, estimate, group = state)) + geom_line(aes(color = state)) + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) survreg object — tidy.survreg","title":"Tidy a(n) survreg object — tidy.survreg","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) survreg object — tidy.survreg","text":"","code":"# S3 method for class 'survreg' tidy(x, conf.level = 0.95, conf.int = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) survreg object — tidy.survreg","text":"x survreg object returned survival::survreg(). conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) survreg object — tidy.survreg","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) survreg object — tidy.survreg","text":"","code":"# load libraries for models and data library(survival) # fit model sr <- survreg( Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = \"exponential\" ) # summarize model fit with tidiers + visualization tidy(sr) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 6.96 1.32 5.27 0.000000139 #> 2 ecog.ps -0.433 0.587 -0.738 0.461 #> 3 rx 0.582 0.587 0.991 0.322 augment(sr, ovarian) #> # A tibble: 26 × 9 #> futime fustat age resid.ds rx ecog.ps .fitted .se.fit .resid #> #> 1 59 1 72.3 2 1 1 1224. 639. -1165. #> 2 115 1 74.5 2 1 1 1224. 639. -1109. #> 3 156 1 66.5 2 1 2 794. 350. -638. #> 4 421 0 53.4 2 2 1 2190. 1202. -1769. #> 5 431 1 50.3 2 1 1 1224. 639. -793. #> 6 448 0 56.4 1 1 2 794. 350. -346. #> 7 464 1 56.9 2 2 2 1420. 741. -956. #> 8 475 1 59.9 2 2 2 1420. 741. -945. #> 9 477 0 64.2 2 1 1 1224. 639. -747. #> 10 563 1 55.2 1 2 2 1420. 741. -857. #> # ℹ 16 more rows glance(sr) #> # A tibble: 1 × 9 #> iter df statistic logLik AIC BIC df.residual nobs p.value #> #> 1 4 3 1.67 -97.2 200. 204. 23 26 0.434 # coefficient plot td <- tidy(sr, conf.int = TRUE) library(ggplot2) ggplot(td, aes(estimate, term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) svyglm object — tidy.svyglm","title":"Tidy a(n) svyglm object — tidy.svyglm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) svyglm object — tidy.svyglm","text":"","code":"# S3 method for class 'svyglm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) svyglm object — tidy.svyglm","text":"x svyglm object returned survey::svyglm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) svyolr object — tidy.svyolr","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"","code":"# S3 method for class 'svyolr' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"x svyolr object returned survey::svyolr(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"tidy.svyolr() tidier light wrapper around tidy.polr(). However, implementation p-value calculation tidy.polr() computationally intensive specific model, p.values argument tidy.svyolr() currently ignored, raise warning passed.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"","code":"library(broom) library(survey) data(api) dclus1 <- svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) dclus1 <- update(dclus1, mealcat = cut(meals, c(0, 25, 50, 75, 100))) m <- svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1) m #> Call: #> svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1) #> #> Coefficients: #> avg.ed mobility stypeH stypeM #> -2.6999217 0.0325042 -1.7574715 -0.6191463 #> #> Intercepts: #> (0,25]|(25,50] (25,50]|(50,75] (50,75]|(75,100] #> -8.857919 -6.586464 -4.924938 tidy(m, conf.int = TRUE) #> # A tibble: 7 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 avg.ed -2.70 1.13 -2.38 -4.92e+0 -0.477 coeffici… #> 2 mobility 0.0325 0.0207 1.57 -7.98e-3 0.0730 coeffici… #> 3 stypeH -1.76 0.700 -2.51 -3.13e+0 -0.386 coeffici… #> 4 stypeM -0.619 0.310 -2.00 -1.23e+0 -0.0123 coeffici… #> 5 (0,25]|(25,50] -8.86 3.69 -2.40 -1.61e+1 -1.63 scale #> 6 (25,50]|(50,7… -6.59 3.11 -2.12 -1.27e+1 -0.493 scale #> 7 (50,75]|(75,1… -4.92 2.86 -1.72 -1.05e+1 0.687 scale"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) systemfit object — tidy.systemfit","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"","code":"# S3 method for class 'systemfit' tidy(x, conf.int = TRUE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"x systemfit object produced call systemfit::systemfit(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"tidy method works model objects class systemfit. Default returns tibble six columns.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"","code":"set.seed(27) # load libraries for models and data library(systemfit) #> #> Please cite the 'systemfit' package as: #> Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. #> #> If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: #> https://r-forge.r-project.org/projects/systemfit/ # generate data df <- data.frame( X = rnorm(100), Y = rnorm(100), Z = rnorm(100), W = rnorm(100) ) # fit model fit <- systemfit(formula = list(Y ~ Z, W ~ X), data = df, method = \"SUR\") # summarize model fit with tidiers tidy(fit) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 eq1_(Intercept) 0.109 0.0981 1.11 0.269 -0.0857 0.304 #> 2 eq1_Z -0.0808 0.0934 -0.865 0.389 -0.266 0.105 #> 3 eq2_(Intercept) -0.0495 0.110 -0.449 0.655 -0.269 0.170 #> 4 eq2_X -0.133 0.103 -1.30 0.198 -0.337 0.0707 tidy(fit, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 eq1_(Intercept) 0.109 0.0981 1.11 0.269 -0.0857 0.304 #> 2 eq1_Z -0.0808 0.0934 -0.865 0.389 -0.266 0.105 #> 3 eq2_(Intercept) -0.0495 0.110 -0.449 0.655 -0.269 0.170 #> 4 eq2_X -0.133 0.103 -1.30 0.198 -0.337 0.0707"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) table object — tidy.table","title":"Tidy a(n) table object — tidy.table","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. Deprecated. Please use tibble::as_tibble() instead.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) table object — tidy.table","text":"","code":"# S3 method for class 'table' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) table object — tidy.table","text":"x base::table object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) table object — tidy.table","text":"tibble::tibble long-form containing frequency information table Freq column. result much like get tidyr::pivot_longer().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) table object — tidy.table","text":"Directly calls tibble::as_tibble() base::table object.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ts object — tidy.ts","title":"Tidy a(n) ts object — tidy.ts","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ts object — tidy.ts","text":"","code":"# S3 method for class 'ts' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ts object — tidy.ts","text":"x univariate multivariate ts times series object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) ts object — tidy.ts","text":"series column present multivariate ts objects.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ts object — tidy.ts","text":"tibble::tibble() columns: index Index (.e. date time) `ts` `zoo` object. series Name series (present multivariate time series). value value/estimate component. Results data reshaping.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ts object — tidy.ts","text":"","code":"set.seed(678) tidy(ts(1:10, frequency = 4, start = c(1959, 2))) #> # A tibble: 10 × 2 #> index value #> #> 1 1959. 1 #> 2 1960. 2 #> 3 1960. 3 #> 4 1960 4 #> 5 1960. 5 #> 6 1960. 6 #> 7 1961. 7 #> 8 1961 8 #> 9 1961. 9 #> 10 1962. 10 z <- ts(matrix(rnorm(300), 100, 3), start = c(1961, 1), frequency = 12) colnames(z) <- c(\"Aa\", \"Bb\", \"Cc\") tidy(z) #> # A tibble: 300 × 3 #> index series value #> #> 1 1961 Aa -0.773 #> 2 1961 Bb 0.855 #> 3 1961 Cc -1.43 #> 4 1961. Aa 0.933 #> 5 1961. Bb -0.738 #> 6 1961. Cc -2.55 #> 7 1961. Aa 0.466 #> 8 1961. Bb 2.37 #> 9 1961. Cc 1.22 #> 10 1961. Aa -1.08 #> # ℹ 290 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) varest object — tidy.varest","title":"Tidy a(n) varest object — tidy.varest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) varest object — tidy.varest","text":"","code":"# S3 method for class 'varest' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) varest object — tidy.varest","text":"x varest object produced call vars::VAR(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... glance(), additional arguments passed summary(). Otherwise ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) varest object — tidy.varest","text":"tibble one row term regression. component column indicates whether particular term used model either \"mean\" \"precision\". precision inverse variance, often referred phi. least one term used model precision phi. vars package include confint method report confidence intervals varest objects. Setting tidy argument conf.int = TRUE return warning.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) varest object — tidy.varest","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. component Whether particular term used model mean precision regression. See details.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) varest object — tidy.varest","text":"","code":"# load libraries for models and data library(vars) # load data data(\"Canada\", package = \"vars\") # fit models mod <- VAR(Canada, p = 1, type = \"both\") # summarize model fit with tidiers tidy(mod) #> # A tibble: 24 × 6 #> group term estimate std.error statistic p.value #> #> 1 e e.l1 1.24 0.0863 14.4 1.82e-23 #> 2 e prod.l1 0.195 0.0361 5.39 7.49e- 7 #> 3 e rw.l1 -0.0678 0.0283 -2.40 1.90e- 2 #> 4 e U.l1 0.623 0.169 3.68 4.30e- 4 #> 5 e const -279. 75.2 -3.71 3.92e- 4 #> 6 e trend -0.0407 0.0197 -2.06 4.24e- 2 #> 7 prod e.l1 0.0129 0.126 0.103 9.19e- 1 #> 8 prod prod.l1 0.963 0.0527 18.3 9.43e-30 #> 9 prod rw.l1 -0.0391 0.0412 -0.948 3.46e- 1 #> 10 prod U.l1 0.211 0.247 0.855 3.95e- 1 #> # ℹ 14 more rows glance(mod) #> # A tibble: 1 × 4 #> lag.order logLik nobs n #> #> 1 1 -208. 83 84"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) zoo object — tidy.zoo","title":"Tidy a(n) zoo object — tidy.zoo","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) zoo object — tidy.zoo","text":"","code":"# S3 method for class 'zoo' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) zoo object — tidy.zoo","text":"x zoo object created zoo::zoo(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) zoo object — tidy.zoo","text":"tibble::tibble() columns: index Index (.e. date time) `ts` `zoo` object. series Name series (present multivariate time series). value value/estimate component. Results data reshaping.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) zoo object — tidy.zoo","text":"","code":"# load libraries for models and data library(zoo) library(ggplot2) set.seed(1071) # generate data Z.index <- as.Date(sample(12450:12500, 10)) Z.data <- matrix(rnorm(30), ncol = 3) colnames(Z.data) <- c(\"Aa\", \"Bb\", \"Cc\") Z <- zoo(Z.data, Z.index) # summarize model fit with tidiers + visualization tidy(Z) #> # A tibble: 30 × 3 #> index series value #> #> 1 2004-02-02 Aa -0.537 #> 2 2004-02-02 Bb 0.746 #> 3 2004-02-02 Cc -0.634 #> 4 2004-02-06 Aa -0.586 #> 5 2004-02-06 Bb -0.0779 #> 6 2004-02-06 Cc 0.0397 #> 7 2004-02-08 Aa -0.289 #> 8 2004-02-08 Bb -1.11 #> 9 2004-02-08 Cc -0.341 #> 10 2004-02-12 Aa 1.85 #> # ℹ 20 more rows ggplot(tidy(Z), aes(index, value, color = series)) + geom_line() ggplot(tidy(Z), aes(index, value)) + geom_line() + facet_wrap(~series, ncol = 1) Zrolled <- rollmean(Z, 5) ggplot(tidy(Zrolled), aes(index, value, color = series)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) Gam object — tidy.Gam","title":"Tidy a(n) Gam object — tidy.Gam","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) Gam object — tidy.Gam","text":"","code":"# S3 method for class 'Gam' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) Gam object — tidy.Gam","text":"x Gam object returned call gam::gam(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) Gam object — tidy.Gam","text":"Tidy gam objects created calls mgcv::gam() tidy.gam().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) Gam object — tidy.Gam","text":"tibble::tibble() columns: df Degrees freedom used term model. meansq Mean sum squares. Equal total sum squares divided degrees freedom. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. sumsq Sum squares explained term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) Gam object — tidy.Gam","text":"","code":"# load libraries for models and data library(gam) #> Loading required package: splines #> Loading required package: foreach #> #> Attaching package: ‘foreach’ #> The following objects are masked from ‘package:purrr’: #> #> accumulate, when #> Loaded gam 1.22-5 #> #> Attaching package: ‘gam’ #> The following objects are masked from ‘package:mgcv’: #> #> gam, gam.control, gam.fit, s # fit model g <- gam(mpg ~ s(hp, 4) + am + qsec, data = mtcars) # summarize model fit with tidiers tidy(g) #> # A tibble: 4 × 6 #> term df sumsq meansq statistic p.value #> #> 1 s(hp, 4) 1 678. 678. 94.4 5.73e-10 #> 2 am 1 113. 113. 15.7 5.52e- 4 #> 3 qsec 1 0.0263 0.0263 0.00366 9.52e- 1 #> 4 Residuals 25.0 180. 7.19 NA NA glance(g) #> # A tibble: 1 × 7 #> df logLik AIC BIC deviance df.residual nobs #> #> 1 7.00 -76.0 162. 169. 180. 25.0 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) irlba object masquerading as list — tidy_irlba","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"","code":"tidy_irlba(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"x list returned irlba::irlba(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"tibble::tibble columns depending component PCA tidied. matrix \"u\", \"samples\", \"scores\", \"x\" row tidied output corresponds original data PCA space. columns : row ID original observation (.e. rowname original data). PC Integer indicating principal component. value score observation particular principal component. , location observation PCA space. matrix \"v\", \"rotation\", \"loadings\" \"variables\", row tidied output corresponds information principle components original space. columns : row variable labels (colnames) data set PCA performed. PC integer vector indicating principal component. value value eigenvector (axis score) indicated principal component. matrix \"d\", \"eigenvalues\" \"pcs\", columns : PC integer vector indicating principal component. std.dev Standard deviation explained PC. percent Fraction variation explained component (numeric value 0 1). cumulative Cumulative fraction variation explained principle components component (numeric value 0 1).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"thin wrapper around tidy_svd().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"","code":"library(modeldata) data(hpc_data) mat <- scale(as.matrix(hpc_data[, 2:5])) s <- svd(mat) tidy_u <- tidy(s, matrix = \"u\") tidy_u #> # A tibble: 17,324 × 3 #> row PC value #> #> 1 1 1 0.00403 #> 2 2 1 -0.00436 #> 3 3 1 -0.00196 #> 4 4 1 -0.00444 #> 5 5 1 -0.00437 #> 6 6 1 -0.00437 #> 7 7 1 -0.00431 #> 8 8 1 -0.00436 #> 9 9 1 -0.00434 #> 10 10 1 -0.00440 #> # ℹ 17,314 more rows tidy_d <- tidy(s, matrix = \"d\") tidy_d #> # A tibble: 4 × 4 #> PC std.dev percent cumulative #> #> 1 1 69.5 0.279 0.279 #> 2 2 67.0 0.259 0.538 #> 3 3 63.9 0.235 0.774 #> 4 4 62.6 0.226 1 tidy_v <- tidy(s, matrix = \"v\") tidy_v #> # A tibble: 16 × 3 #> column PC value #> #> 1 1 1 0.657 #> 2 2 1 0.409 #> 3 3 1 -0.577 #> 4 4 1 0.262 #> 5 1 2 -0.0142 #> 6 2 2 -0.650 #> 7 3 2 -0.137 #> 8 4 2 0.747 #> 9 1 3 -0.302 #> 10 2 3 -0.332 #> 11 3 3 -0.779 #> 12 4 3 -0.438 #> 13 1 4 -0.690 #> 14 2 4 0.548 #> 15 3 4 -0.205 #> 16 4 4 0.426 library(ggplot2) library(dplyr) ggplot(tidy_d, aes(PC, percent)) + geom_point() + ylab(\"% of variance explained\") tidy_u %>% mutate(class = hpc_data$class[row]) %>% ggplot(aes(class, value)) + geom_boxplot() + facet_wrap(~PC, scale = \"free_y\")"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) optim object masquerading as list — tidy_optim","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"","code":"tidy_optim(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"x list returned stats::optim(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"function assumes provided objective function negative log-likelihood function. Results invalid incorrect function supplied. tidy(o) glance(o)","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"tibble::tibble() columns: parameter parameter modeled. std.error standard error regression term. value value/estimate component. Results data reshaping. std.error provided column Hessian calculated.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"","code":"f <- function(x) (x[1] - 2)^2 + (x[2] - 3)^2 + (x[3] - 8)^2 o <- optim(c(1, 1, 1), f)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) svd object masquerading as list — tidy_svd","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"","code":"tidy_svd(x, matrix = \"u\", ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"x list components u, d, v returned base::svd(). matrix Character specifying component PCA tidied. \"u\", \"samples\", \"scores\", \"x\": returns information map original space principle components space. \"v\", \"rotation\", \"loadings\" \"variables\": returns information map principle components space back original space. \"d\", \"eigenvalues\" \"pcs\": returns information eigenvalues. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"tibble::tibble columns depending component PCA tidied. matrix \"u\", \"samples\", \"scores\", \"x\" row tidied output corresponds original data PCA space. columns : row ID original observation (.e. rowname original data). PC Integer indicating principal component. value score observation particular principal component. , location observation PCA space. matrix \"v\", \"rotation\", \"loadings\" \"variables\", row tidied output corresponds information principle components original space. columns : row variable labels (colnames) data set PCA performed. PC integer vector indicating principal component. value value eigenvector (axis score) indicated principal component. matrix \"d\", \"eigenvalues\" \"pcs\", columns : PC integer vector indicating principal component. std.dev Standard deviation explained PC. percent Fraction variation explained component (numeric value 0 1). cumulative Cumulative fraction variation explained principle components component (numeric value 0 1).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"See https://stats.stackexchange.com/questions/134282/relationship--svd--pca---use-svd--perform-pca information interpret various tidied matrices. Note SVD equivalent PCA centered data.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"","code":"library(modeldata) data(hpc_data) mat <- scale(as.matrix(hpc_data[, 2:5])) s <- svd(mat) tidy_u <- tidy(s, matrix = \"u\") tidy_u #> # A tibble: 17,324 × 3 #> row PC value #> #> 1 1 1 0.00403 #> 2 2 1 -0.00436 #> 3 3 1 -0.00196 #> 4 4 1 -0.00444 #> 5 5 1 -0.00437 #> 6 6 1 -0.00437 #> 7 7 1 -0.00431 #> 8 8 1 -0.00436 #> 9 9 1 -0.00434 #> 10 10 1 -0.00440 #> # ℹ 17,314 more rows tidy_d <- tidy(s, matrix = \"d\") tidy_d #> # A tibble: 4 × 4 #> PC std.dev percent cumulative #> #> 1 1 69.5 0.279 0.279 #> 2 2 67.0 0.259 0.538 #> 3 3 63.9 0.235 0.774 #> 4 4 62.6 0.226 1 tidy_v <- tidy(s, matrix = \"v\") tidy_v #> # A tibble: 16 × 3 #> column PC value #> #> 1 1 1 0.657 #> 2 2 1 0.409 #> 3 3 1 -0.577 #> 4 4 1 0.262 #> 5 1 2 -0.0142 #> 6 2 2 -0.650 #> 7 3 2 -0.137 #> 8 4 2 0.747 #> 9 1 3 -0.302 #> 10 2 3 -0.332 #> 11 3 3 -0.779 #> 12 4 3 -0.438 #> 13 1 4 -0.690 #> 14 2 4 0.548 #> 15 3 4 -0.205 #> 16 4 4 0.426 library(ggplot2) library(dplyr) ggplot(tidy_d, aes(PC, percent)) + geom_point() + ylab(\"% of variance explained\") tidy_u %>% mutate(class = hpc_data$class[row]) %>% ggplot(aes(class, value)) + geom_boxplot() + facet_wrap(~PC, scale = \"free_y\")"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) xyz object masquerading as list — tidy_xyz","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error. xyz lists (lists x y vectors coordinates z matrix values) typically used functions graphics::persp() graphics::image() returned interpolation functions interp::interp().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"","code":"tidy_xyz(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"x list component x, y z, x y vectors z matrix. length x must equal number rows z length y must equal number columns z. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"tibble::tibble vector columns x, y z.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"","code":"A <- list(x = 1:5, y = 1:3, z = matrix(runif(5 * 3), nrow = 5)) image(A) tidy(A) #> # A tibble: 15 × 3 #> x y z #> #> 1 1 1 0.527 #> 2 2 1 0.191 #> 3 3 1 0.355 #> 4 4 1 0.907 #> 5 5 1 0.141 #> 6 1 2 0.911 #> 7 2 2 0.590 #> 8 3 2 0.625 #> 9 4 2 0.225 #> 10 5 2 0.752 #> 11 1 3 0.362 #> 12 2 3 0.674 #> 13 3 3 0.268 #> 14 4 3 0.591 #> 15 5 3 0.443"},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy atomic vectors — tidy.numeric","title":"Tidy atomic vectors — tidy.numeric","text":"Vector tidiers deprecated removed upcoming release broom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy atomic vectors — tidy.numeric","text":"","code":"# S3 method for class 'numeric' tidy(x, ...) # S3 method for class 'character' tidy(x, ...) # S3 method for class 'logical' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy atomic vectors — tidy.numeric","text":"x object class \"numeric\", \"integer\", \"character\", \"logical\". likely named vector ... Extra arguments (used)","code":""},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy atomic vectors — tidy.numeric","text":"Turn atomic vectors data frames, names vector (exist) column values vector column.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy atomic vectors — tidy.numeric","text":"","code":"if (FALSE) { # \\dontrun{ x <- 1:5 names(x) <- letters[1:5] tidy(x) } # }"},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-development-version","dir":"Changelog","previous_headings":"","what":"broom (development version)","title":"broom (development version)","text":"tidy.coeftest now returns non-NA values conf.low conf.high model fitted constant term cluster robust std errors computed using vcovCL sandwich (#1227).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-107","dir":"Changelog","previous_headings":"","what":"broom 1.0.7","title":"broom 1.0.7","text":"CRAN release: 2024-09-26 Corrected nobs entries glance.coxph() output: package used return length(object$linear.predictors) (equal n rather nevent) now uses survival’s method (#1224). Corrected confidence interval values tidy.boot() addressed errors bootstrapping confidence intervals multiple terms (#1212). Reverted deprecation tidiers objects margins package now package back CRAN (#1220). Addressed failure tidy.anova() ahead upcoming car release (#1215). Clarified documentation number cases dots documented unused actually passed internal functions (#1214). Addressed error augment.betareg() augment.betamfx() data = NULL non-null newdata (#1216, #1218). glance.lm() now returns non-NA values statistic, p.value, df models fitted single predictor intercept (@jrob95, #1209).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-106","dir":"Changelog","previous_headings":"","what":"broom 1.0.6","title":"broom 1.0.6","text":"CRAN release: 2024-05-17","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-features-1-0-6","dir":"Changelog","previous_headings":"","what":"New Features","title":"broom 1.0.6","text":"Added support conf.level augment.lm() (#1191 @zietzm). Added support columns adj.r.squared npar glance() method objects outputted mgcv::gam() (#1172).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"deprecations-1-0-6","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"broom 1.0.6","text":"Soft-deprecated tidiers margins objects, package archived CRAN April 2024. case package back CRAN next package release, broom Suggest test support package (#1200). Moved forward deprecation tidiers objects sp package. See resources linked tidymodels/broom#1142 information migration retiring spatial packages.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"bug-fixes-1-0-6","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"broom 1.0.6","text":"broom release contains changes tidy.survfit() method objects survival package, package bumped minimum required version survival. survival 3.6-4, tidy.survfit() propagated “inconsistent” n.censor values survival multi-state models (#1195). Corrected confidence interval values precision components tidy.betareg() output (#1169). Fixed bug tidier car::linearHypothesis() output long formulas (#1171). Corrected coefficient values tidy.varest() output (#1174).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-105","dir":"Changelog","previous_headings":"","what":"broom 1.0.5","title":"broom 1.0.5","text":"CRAN release: 2023-06-09 tidy.coxph() now pass ellipses ... summary() internally (#1151 @ste-tuf). Transitioned deprecation region argument tidy.SpatialPolygonsDataFrame warn- hard-deprecation (#1142). Removed maptools rgeos Suggested packages ahead retirement. sp tidiers removed future release package (#1142). Addressed bug mlogit tidiers augment.mlogit() fail supplied model fitted non-default dfidx() (#1156 @gregmacfarlane). Addressed bug ANOVA tidiers tidy.anova() fail passed model many predictors (#1159 @jwilliman). Addressed warnings ANOVA tidiers unrecognized column names Resid..Df, Resid..Dev, Deviance; columns renamed df.residual, residual.deviance, deviance, respectively (#1159 @jwilliman).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-104","dir":"Changelog","previous_headings":"","what":"broom 1.0.4","title":"broom 1.0.4","text":"CRAN release: 2023-03-10 Added intercept argument tidy.aov(), logical indicating whether include information intercept first row results (#1144 @victor-vscn). Moved forward soft-deprecation tidiers objects sp package ahead retirement rgeos maptools packages later year. sp tidiers removed future release package (#1142). Fixed bug augment.glm() .std.resid column always contained standardized deviance residuals regardless value passed type.residuals argument (#1147).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-103","dir":"Changelog","previous_headings":"","what":"broom 1.0.3","title":"broom 1.0.3","text":"CRAN release: 2023-01-25 Addressed test failures R-devel. Fixed bug tidy.multinom() conf.level argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-102","dir":"Changelog","previous_headings":"","what":"broom 1.0.2","title":"broom 1.0.2","text":"CRAN release: 2022-12-15 default data argument augment.coxph() augment.survreg() transitioned NULL model.frame(x) (#1126 @capnrefsmmat). Migrated ‘ggplot2’ strong weak dependency, .e. moved Imports Suggests. Fixed bug augment() results include residuals response term included function call (#1121, #946, #937, #124).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-101","dir":"Changelog","previous_headings":"","what":"broom 1.0.1","title":"broom 1.0.1","text":"CRAN release: 2022-08-29 Improves performance tidy.lm() tidy.glm() full-rank fits (#1112 @capnrefsmmat). Moves forward deprecation tidiers sparse matrices outputted Matrix package, initially soft-deprecated broom 0.5.0. Matrix tidiers light wrappers around coercion methods now deprecated Matrix upcoming 1.4-2 release. affected methods tidy.sparseMatrix(), tidy.dgCMatrix(), tidy.dgTMatrix(). Note tidy.confusionMatrix(), relevant objects outputted caret package, unaffected (#1113). tidy.anova() works anova objects lme4 package (broken addition terms column previous release)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-100","dir":"Changelog","previous_headings":"","what":"broom 1.0.0","title":"broom 1.0.0","text":"CRAN release: 2022-07-01 broom 1.0.0 first “production” release broom package, includes number notable changes functionality governance. release, broom team following set guidelines clarify scope development package. Given package’s wide use long history, guidelines prioritize backward compatibility internal consistency completeness. can read guidelines ! ’ve also made notable changes error handling release: tidy() methods now warn supplied exponentiate argument ignored. augment() methods now warn supplied newdata argument ignored. warning regarding tidiers maintained via dispatch lm glm now displayed per session, per unique dispatch. , class_a object tidied using (g)lm method, broom warn tidying class_a objects rest session, class_b object tidied using (g)lm method session, broom warn (#1101). fixes improvements: Add exponentiate argument tidy.boot() (#1039). Update tidy.htest() converting matrix-columns vector-columns (#1081). Address failures tidy.glht() conf.int = TRUE (#1103). Address failures tidy.zoo() input data colnames (#1080). Transition tidiers bivariate linear spline-based interpolation—using list tidiers interface objects akima package now considered -label. See interp package FOSS alternative. Address failures tidy.svyolr() p.values = TRUE. Instead aliasing tidy.polr() directly, tidy.svyolr() lightly wraps method warns p.values supplied (#1107). Adds term column introduces support car::lht() output tidy.anova() (#1106 @grantmcdermott). Adds dedicated glance.anova method (previously dispatched deprecated glance.data.frame() tidier, #1106 @grantmcdermott).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-080","dir":"Changelog","previous_headings":"","what":"broom 0.8.0","title":"broom 0.8.0","text":"CRAN release: 2022-04-13 update makes significant improvements documentation, fixes number bugs, brings development flow package date packages tidymodels. big picture, release: tidiers now example code demonstrating usage documentation. Tidiers base packages well selected others also include sample code visualization results ggplot2. Code examples documentation largely now follow consistent style—changes made largely reflect tidyverse style guide, addressing spacing, object naming, commenting, among things. Examples previously marked \\dontrun \\donttest workshopped run reliably. Clarifies errors warnings deprecated unmaintained tidiers. Ensures tidiers placed files named according model-supplying package rather model object class easier navigability source code.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"bug-fixes-and-other-improvements-0-8-0","dir":"Changelog","previous_headings":"","what":"Bug fixes and other improvements","title":"broom 0.8.0","text":"Fix glance.fixest error model includes fixed effects regressors (#1018 @arcruz0, #1088 @vincentarelbundock). Address excessive messaging tidy.speedlm (#1084 @cgoo4, #1087 @vincentarelbundock). Add nobs column output glance.svyglm (#1085 @fschaffner, #1086 @vincentarelbundock). Ensure tidy.prcomp description entries use consistent punctuation (#1072 @PursuitOfDataScience). Address breaking changes glance.fixest tidy.btergm. Simplify handling MASS::polr output corresponding tidy augment methods. Align continuous integration current standards tidymodels packages.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-0712","dir":"Changelog","previous_headings":"","what":"broom 0.7.12","title":"broom 0.7.12","text":"CRAN release: 2022-01-28 Nearly identical source broom 0.7.11—updates maintainer email address address listed CRAN packages maintained person.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-0711","dir":"Changelog","previous_headings":"","what":"broom 0.7.11","title":"broom 0.7.11","text":"CRAN release: 2022-01-03 Addressed issue ordering original observations augment.rqs. Now function preserves original data.frame names also input data.frame one column (#1052 @ilapros). Addressed warning tidy.rma x$ddf length greater 1 (#1064 @wviechtb). Fix errors glance.lavaan anticipation upcoming tidyr release (#1067 @DavisVaughan). Corrected confidence interval tidy.crr(). tidy.crr(conf.level=) argument previously ignored (#1068 @ddsjoberg).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-0710","dir":"Changelog","previous_headings":"","what":"broom 0.7.10","title":"broom 0.7.10","text":"CRAN release: 2021-10-31 Clarifies error pysch::mediate output dispatched tidy.mediate (#1037 @LukasWallrich). Allows user specify confidence level tidy.rma (#1041 @TarenSanders) Clarifies documentation related usage augment_columns(); package users use augment() favor augment_columns(). See ?augment_columns details. Extends support emmeans fixing non-standard column names case asymptotically derived inferential statistics. (#1046 @crsh) Fixes use index columns augment.mlogit adds .resid column output. (#1045, #1053, #1055, #1056 @jamesrrae @gregmacfarlane) Correct column naming standard error measures glance.survfit(). Various bug fixes improvements documentation.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-079","dir":"Changelog","previous_headings":"","what":"broom 0.7.9","title":"broom 0.7.9","text":"CRAN release: 2021-07-27 Fixes confidence intervals tidy.crr(), previously exponentiated exponentiate = FALSE (#1023 @leejasme) Deprecates Rchoice tidiers, newest 0.3-3 release requires R 4.0+ re-export needed generics. Updates ergm tidiers anticipation changes later releases. (#1034 @krivit)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-078","dir":"Changelog","previous_headings":"","what":"broom 0.7.8","title":"broom 0.7.8","text":"CRAN release: 2021-06-24 Fixed bug glance.ergm related handling MCMC details. Address breakages unit tests {fixest} tidiers.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-077","dir":"Changelog","previous_headings":"","what":"broom 0.7.7","title":"broom 0.7.7","text":"CRAN release: 2021-06-13 Fixed bug tidy.epi.2by2 resulted errors new version epiR (#1028 @nt-williams) Added exponentiate argument tidy.gam() tidier applicable parametric terms (#1013 @ddsjoberg) Added exponentiate argument tidy.negbin() tidier (#1011 @ddsjoberg) Fixed failures spdep tidiers following breaking changes recent release Various bug fixes improvements documentation","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-076","dir":"Changelog","previous_headings":"","what":"broom 0.7.6","title":"broom 0.7.6","text":"CRAN release: 2021-04-05 Fixed bug augment tidiers resulting .fitted .se.fit array columns. Fixed bug made column y non-numeric tidy_xyz (#973 @jiho) Added tidiers MASS:glm.nb (#998 @joshyam-k) Fixed bug tidy.fixest sometimes prevented arguments like se used (#1001 @karldw) Fixed bug tidy.fixest resulted errors columns name x present (#1007 @grantmcdermott) Moved forward planned deprecation gamlss tidiers favor provided broom.mixed Various bug fixes improvements documentation","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-075","dir":"Changelog","previous_headings":"","what":"broom 0.7.5","title":"broom 0.7.5","text":"CRAN release: 2021-02-19 Fixed bug nnet::multinom tidier case response variable two levels (#993 @vincentarelbundock @hughjonesd) Various bug fixes improvements documentation","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-074","dir":"Changelog","previous_headings":"","what":"broom 0.7.4","title":"broom 0.7.4","text":"CRAN release: 2021-01-29 broom 0.7.4 introduces tidier support number new model objects improves functionality many existing tidiers!","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-tidiers-0-7-4","dir":"Changelog","previous_headings":"","what":"New Tidiers","title":"broom 0.7.4","text":"Add tidiers Rchoice objects (#961 @vincentarelbundock @Nateme16) Add tidiers objects produced car::leveneTest (#968 @vincentarelbundock @mkirzon) Add tidiers objects produced cmprsk::crr (#971 #552 @vincentarelbundock @margarethannum) Add augment() method gam objects (#975 #645 @vincentarelbundock) Add tidiers vars objects (#979 #161 @vincentarelbundock @Diego-MX) release also restores tidiers felm objects lfe package, recently unarchived CRAN.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"improvements-to-existing-tidiers-0-7-4","dir":"Changelog","previous_headings":"","what":"Improvements to existing tidiers","title":"broom 0.7.4","text":"tidy.emmGrid can now return std.error conf.* columns time. (#962 @vincentarelbundock @jmbarbone) tidy.garch can now produce confidence intervals (#964 @vincentarelbundock @IndrajeetPatil) tidy.coxph can now report confidence intervals models utilizing penalized/clustering terms (#966 @vincentarelbundock @matthieu-faron) augment.lm now works regression weights equal zero (#965 @vincentarelbundock @vnijs) tidy.coxph can now handle models utilizing penalized/clustering terms (#966 #969 @vincentarelbundock, @matthieu-faron, @KZARCA) Fix bug tidy.speedglm R 4.0.0+ (#974 @uqzwang) tidy.multinom works matrix response (#977 #666 @vincentarelbundock @atyre2) Various bug fixes improvements documentation errors.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-073","dir":"Changelog","previous_headings":"","what":"broom 0.7.3","title":"broom 0.7.3","text":"CRAN release: 2020-12-16 broom 0.7.0, introduced error model objects subclassed lm relied tidy.lm(), similarly tidy.glm(). Tidiers objects supported unintentionally, worried tidiers objects silently report inaccurate results. hindsight, change unnecessarily abrupt. ’ve decided roll back change, instead providing following warning allowing objects fall back lm/glm tidier methods: Tidiers objects class {subclass} maintained broom team, supported {dispatched_method} tidier method. Please cautious interpreting reporting broom output.” addition, Restores tidiers summary.lm objects (#953 @grantmcdermott) Deprecate tidiers lfe package, archived CRAN. Various bug fixes improvements documentation errors.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-072","dir":"Changelog","previous_headings":"","what":"broom 0.7.2","title":"broom 0.7.2","text":"CRAN release: 2020-10-20 Various bug fixes improvements documentation errors.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-071","dir":"Changelog","previous_headings":"","what":"broom 0.7.1","title":"broom 0.7.1","text":"CRAN release: 2020-10-01 broom 0.7.1 minor release, includes number exciting new features bug fixes!","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-tidiers-0-7-1","dir":"Changelog","previous_headings":"","what":"New tidiers","title":"broom 0.7.1","text":"Add tidiers margins objects. (#700 @grantmcdermott) Added tidier methods mlogit objects (#887 @gregmacfarlane) Add glance.coeftest() method (#932 @grantmcdermott)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"improvements-to-existing-tidiers-0-7-1","dir":"Changelog","previous_headings":"","what":"Improvements to existing tidiers","title":"broom 0.7.1","text":"One major improvements release addition interval argument augment methods confidence, prediction, credible intervals. columns consistently labeled .lower .upper! (#908 @grantmcdermott, #925 @bwiernik) addition… Extended glance.aov() method include r.squared column! glance.survfit() now passes ... summary.survfit() allow adjustment RMST measures (#880 @vincentarelbundock) Several unsupported model objects subclass glm lm now error informatively. number improvements documentation throughout package.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"bug-fixes-0-7-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"broom 0.7.1","text":"Fixed newdata warning message augment.*() output newdata didn’t contain response variable—augment methods longer expect response variable supplied newdata argument. (#897 @rudeboybert) Fixed bug related tidy.geeglm() sensitive exponentiate argument (#867) Fixed augment.fixest() returning residuals .fitted column. method also now takes type.residuals argument defaults type.predict argument fixest predict() method. (#877 @karldw) Fix tidy.felm confidence interval bug. Replaces “robust” argument “se.type”. (#919 @grantmcdermott; supersedes #818 @kuriwaki) Fix bug tidy.drc() term labels result overwriting entries curve column (#914) Fixed bug related univariate zoo series tidy.zoo() (#916 @WillemVervoort) Fixed bug related tidy.prcomp() assigning wrong PC labels “loadings” “scores” matrices (#910 @tavareshugo) Fixed tidy.polr() bug p-values returned exponentiate = FALSE.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"deprecations-0-7-1","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"broom 0.7.1","text":"followed planned deprecation character vector tidiers release. vector tidiers soft-deprecated 0.7.0 fully deprecated later release.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-070","dir":"Changelog","previous_headings":"","what":"broom 0.7.0","title":"broom 0.7.0","text":"CRAN release: 2020-07-09 broom 0.7.0 major release large number new tidiers, soft-deprecations, planned hard-deprecations functions arguments.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"big-picture-changes-0-7-0","dir":"Changelog","previous_headings":"","what":"Big picture changes","title":"broom 0.7.0","text":"changed report degrees freedom lm objects (#212, #273). especially important instructors statistics courses. Previously df column glance.lm() reported rank design matrix. Now reports degrees freedom numerator overall F-statistic. equal rank model matrix minus one (unless omit intercept column), new df old df minus one. moving away supporting summary.*() objects. particular, removed tidy.summary.lm() part major overhaul internals. Instead calling tidy() summary-like objects, please call tidy() directly model objects moving forward. removed support quick argument tidy() methods. simplify internals maintainability purposes. anticipate influence many users people seemed use . majorly cramps style, let us know, considering new verb return model parameters. meantime, stats::coef() together tibble::enframe() provides functionality tidy(..., quick = TRUE). conf.int arguments now default FALSE, conf.level arguments now default 0.95. primarily affect tidy.survreg(), previously always returned confidence intervals, although others. Tidiers emmeans-objects use arguments conf.int conf.level instead relying argument names native emmeans::summary()-methods (.e., infer level). Similarly, multcomp-tidiers now include call summary() previous behavior akin setting now removed argument quick = TRUE. families tidiers now use adj.p.value column name appropriate. Finally, emmeans-, multcomp-, TukeyHSD-tidiers now consistently use column names contrast null.value instead comparison, level1 level2, lhs rhs (see #692).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"deprecations-0-7-0","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"broom 0.7.0","text":"release broom soft-deprecates following functions tidier methods: Tidier methods data frames, rowwise data frames, vectors matrices bootstrap() confint_tidy() fix_data_frame() finish_glance() augment.glmRob() tidy.table() tidy.ftable() deprecated favor tibble::as_tibble() tidy.summaryDefault() glance.summaryDefault() deprecated favor skimr::skim() also gone forward planned mixed model deprecations, removed following methods, now live broom.mixed: tidy.brmsfit() tidy.merMod(), glance.merMod(), augment.merMod() tidy.lme(), glance.lme(), augment.lme() tidy.stanreg(), glance.stanreg() tidyMCMC(), tidy.rjags(), tidy.stanfit()","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"minor-breaking-changes-0-7-0","dir":"Changelog","previous_headings":"","what":"Minor breaking changes","title":"broom 0.7.0","text":"augment.factanal() now returns tibble columns names .fs1, .fs2, …, instead factor1, factor2, … (#650) renamed output augment.htest(). particular, renamed .residuals column .resid .stdres .std.resid consistency. changes affect chi-squared tests. tidy.ridgelm() now always return GCV column never returns xm column. (#533 @jmuhlenkamp) tidy.dist() longer supports upper argument.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"a-refactoring-of-augment-methods-0-7-0","dir":"Changelog","previous_headings":"","what":"A refactoring of augment() methods","title":"broom 0.7.0","text":"internals augment.*() methods largely overhauled. pass dataset augment() via data newdata arguments, now guaranteed augmented dataset exactly number rows original dataset. differs previous behavior primarily missing values. Previously augment() drop rows containing NA. longer case. augment.*() methods longer accept na.action argument. previous versions, several augment.*() methods inherited augment.lm() method, required additions augment.lm() method . shifted away approach favor re-implementing many augment.*() methods standalone methods making use internal helper functions. result, augment.lm() related methods deprecated (previously unused) arguments. augment() tries give informative error data isn’t original training data. .resid column output augment().* methods now consistently defined y - y_hat","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-tidiers-0-7-0","dir":"Changelog","previous_headings":"","what":"New tidiers","title":"broom 0.7.0","text":"anova objects car package (#754) pam objects cluster package (#637 @abbylsmith) drm objects drc package (#574 @edild) summary_emm objects emmeans package (#691 @crsh) epi.2by2 objects epiR package (#711) fixest objects fixest package (#785 @karldw) regsubsets objects leaps package (#535) lm.beta objects lm.beta package (#545 @mattle24) rma objects metafor package (#674 @malcolmbarrett, @softloud) mfx, logitmfx, negbinmfx, poissonmfx, probitmfx, betamfx objects themfx package (#700 @grantmcdermott) lmrob glmrob objects robustbase package (#205, #505) sarlm objects spatialreg package (#847 @gregmacfarlane @petrhrobar) speedglm objects speedglm package (#685) svyglm objects survey package (#611) systemfit objects systemfit package (@jaspercooper) restored simplified version glance.aov(), used inherit glance.lm() method now contains following columns: logLik, AIC, BIC, deviance, df.residual, nobs (see #212). Note tidy.aov() gives complete information degrees freedom aov object.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"improvements-to-existing-tidiers-0-7-0","dir":"Changelog","previous_headings":"","what":"Improvements to existing tidiers","title":"broom 0.7.0","text":"tidy.felm() now robust = TRUE/FALSE option supports robust cluster standard errors. (#781 @kuriwaki) Make .fitted values respect type.predict argument augment.clm(). (#617) Return factor rather numeric class predictions .fitted augment.polr(). (#619) Add option return p.values tidy.polr(). (#833 @LukasWallrich) tidy.kmeans() now uses names input variables output default. Set col.names = NULL recover old behavior. Previously, F-statistics weak instruments returned glance.ivreg(). F-statistics now returned tidy.ivreg(instruments = TRUE). Default tidy.ivreg(instruments = FALSE). glance.ivreg() still returns Wu-Hausman Sargan test statistics. glance.biglm() now returns df.residual column. tidy.prcomp() argument matrix gained new options \"scores\", \"loadings\", \"eigenvalues\". (#557 @GegznaV) tidy_optim() now provides standard error Hessian present. (#529 @billdenney) tidy.htest() column names now run make.names() ensure syntactic correctness. (#549 @karissawhiting) tidy.lmodel2() now returns p.value column. (#570) tidy.lsmobj() gained conf.int argument consistency tidiers. tidy.polr() now returns p-values p.values set TRUE model contain factors two levels. tidy.zoo() now doesn’t change column names spaces special characters (previously converted data.frame friendly column names make.names.) glance.lavaan() now uses lavaan extractor functions instead subsetting fit object manually. (#835) glance.lm() longer errors intercept provided explanatory variable. (#865)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"bug-fixes-0-7-0","dir":"Changelog","previous_headings":"Improvements to existing tidiers","what":"Bug fixes","title":"broom 0.7.0","text":"Bug fix tidy.survreg() robust set TRUE model fitting (#842, #728) Bug fixes glance.lavaan(): address confidence interval error (#577) correct reported nobs norig (#835) Bug fix muhaz tidiers ensure output always tibble (#824) Several glance.*() methods refactored order return one-row tibble even model matrix rank-deficient (#823) Bug fix return confidence intervals correct tidy.drc() (#798) Added default methods objects subclass glm lm order error informatively. (#749, #736, #708, #186) Bug fix allow augment.kmeans() work masked data (#609) Bug fix allow augment.Mclust() work univariate data (#490) Bug fix allow tidy.htest() supports equal variances (#608) Bug fix better allow tidy.boot() support confidence intervals (#581) Bug fix tidy.polr() passed conf.int = TRUE (#498)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"other-changes-0-7-0","dir":"Changelog","previous_headings":"Improvements to existing tidiers","what":"Other changes","title":"broom 0.7.0","text":"Many glance() methods now return nobs column, contains number data points used fit model! (#597 @vincentarelbundock) tidy() longer checks log logit link exponentiate = TRUE, refactored remove extraneous exponentiate arguments. set exponentiate = TRUE, assume know want exponentiated coefficients (confidence intervals conf.int = TRUE) regardless link function. now use rlang::arg_match() possible instead arg.match() give informative errors argument mismatches. package’s site moved https://broom.tidyverse.org/ https://broom.tidymodels.org/. Revised several vignettes moved tidymodels.org website. existing vignettes now simply link revised versions. Many improvements consistency clarity documentation. Various warnings resulting changes tidyr API v1.0.0 fixed. (#870) Removed dependencies reshape2 superseded functions dplyr. documentation now links help files rather topics.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"for-developers-and-contributors-0-7-0","dir":"Changelog","previous_headings":"","what":"For developers and contributors","title":"broom 0.7.0","text":"Moved core tests modeltests package. Generally, release, broom dev team first ask attempts add tidier methods supporting model object first directed model-owning package. article describing best practices can found {tidymodels} website https://www.tidymodels.org/learn/develop/broom/, continue adding additional resources article develop . case maintainer uninterested taking tidier methods, please note issue PR. Added new vignette discussing implement new tidier methods non-broom packages.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-056","dir":"Changelog","previous_headings":"","what":"broom 0.5.6","title":"broom 0.5.6","text":"CRAN release: 2020-04-20 Fix failing CRAN checks due tibble 3.0.0 release. Removed xergm dependency.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-055","dir":"Changelog","previous_headings":"","what":"broom 0.5.5","title":"broom 0.5.5","text":"CRAN release: 2020-02-29 Remove tidiers robust package drop robust dependency (temporarily)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-054","dir":"Changelog","previous_headings":"","what":"broom 0.5.4","title":"broom 0.5.4","text":"CRAN release: 2020-01-27 Fixes failing CRAN checks joineRML package removed CRAN","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-053","dir":"Changelog","previous_headings":"","what":"broom 0.5.3","title":"broom 0.5.3","text":"CRAN release: 2019-12-14 Fixes failing CRAN checks due new matrix classing R 4.0.0","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-052","dir":"Changelog","previous_headings":"","what":"broom 0.5.2","title":"broom 0.5.2","text":"CRAN release: 2019-04-07 Fixes failing CRAN checks Changes accommodate ergm 3.10 release. tidy.ergm() longer quick argument. old default quick = FALSE now option.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-051","dir":"Changelog","previous_headings":"","what":"broom 0.5.1","title":"broom 0.5.1","text":"CRAN release: 2018-12-05 tidy(), glance() augment() now re-exported generics package.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-050","dir":"Changelog","previous_headings":"","what":"broom 0.5.0","title":"broom 0.5.0","text":"CRAN release: 2018-07-17 Tidiers now return tibble::tibble()s. release also includes several new tidiers, new vignettes large number bug fixes. ’ve also begun rigorously define tidier specifications: ’ve laid part groundwork stricter consistent tidying, new tidier specifications yet complete. appear next release. Additionally, users note process migrating tidying methods mixed models Bayesian models broom.mixed. broom.mixed CRAN yet, mixed model Bayesian tidiers deprecated broom.mixed CRAN. development mixed model tidiers take place broom.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"breaking-changes-0-5-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"broom 0.5.0","text":"Almost tidiers now return tibbles rather data.frames. Deprecated tidying methods, Bayesian mixed model tidiers still return data.frames. Users mostly experience issues using augment situations tibbles stricter data frames. example, specifying model covariates matrix object now error: default data argument data = model.frame(fit) coerced tibble. Another consequence augment.survreg augment.coxph survival package now require user explicitly passes data either data newdata arguments. restrictions relaxed upcoming release broom pending support matrix-columns tibbles. Developers likely experience issues: subsetting tibbles [, returns tibble rather vector. setting rownames tibbles, deprecated. using matrix vector tidiers, now deprecated. handling additional tibble classes tbl_df tbl beyond data.frame class linking defunct documentation files – broom recently moved tidiers roxygen2 template based documentation system.","code":"library(broom) library(quantreg) fit <- rq(stack.loss ~ stack.x, tau = .5) broom::augment(fit) #> Error: Column `stack.x` must be a 1d atomic vector or a list"},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-vignettes-0-5-0","dir":"Changelog","previous_headings":"","what":"New vignettes","title":"broom 0.5.0","text":"version broom includes several new vignettes: vignette(\"available-methods\", package = \"broom\") contains table detailing tidying methods available vignette(\"adding-tidiers\", package = \"broom\") -progress guide contributors add new tidiers broom vignette(\"glossary\", package = \"broom\") contains tables describing acceptable argument names column names -progress new specification. Several old vignettes also updated: vignette(\"bootstrapping\", package = \"broom\") now relies rsample package tidyr::nest-purrr::map-tidyr::unnest workflow. now recommended workflow working multiple models, opposed old dplyr::rowwise-dplyr::based workflow.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"deprecations-0-5-0","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"broom 0.5.0","text":"Matrix vector tidiers deprecated favor tibble::as_tibble tibble::enframe Dataframe tidiers rowwise dataframe tidiers deprecated bootstrap() deprecated favor rsample inflate removed broom","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"other-changes-0-5-0","dir":"Changelog","previous_headings":"","what":"Other changes","title":"broom 0.5.0","text":"alpha argument removed quantreg tidy methods separate.levels argument removed tidy.TukeyHSD. obtain effect separate.levels = TRUE, users may tidyr::separate tidying. consistent multcomp tidier behavior. fe.error argument removed tidy.felm. fixed effects tidier, standard errors now always included. diag argument tidy.dist renamed diagonal Advice help beginners make PRs (#397 @karldw) glance support arima objects fit method = \"CSS\" (#396 @josue-rodriguez) bug fix re-enable tidying glmnet objects family = multinomial (#395 @erleholgersen) bug fix allow tidying quantreg intercept models (#378 @erleholgersen) bug fix aovlist objects (#377 @mvevans89) Support glmnetUtils objects (#352 @Hong-Revo) bug fix allow tidy_emmeans handle column names dashes (#351 @bmannakee) augment.felm longer returns .fe_ .comp columns Support saved formulas augment.felm (#347 @ShreyasSingh) confint_tidy now drops rows NA (#345 @atyre2) new tidier caret::confusionMatrix objects (#344 @mkuehn10) Tidiers Kendall::Kendall objects (#343 @cimentadaj) new tidying method car::durbinWatsonTest objects (#341 @mkuehn10) glance throws informative error quantreg:rq models fit multiple tau values (#338 @bfgray3) tidy.glmnet gains ability retain zero-valued coefficients return_zeros argument defaults FALSE (#337 @bfgray3) tidy.manova now retains Residuals row (#334 @jarvisc1) Tidiers ordinal::clm, ordinal::clmm, survey::svyolr MASS::polr ordinal model objects (#332 @larmarange) Support anova objects car::Anova (#325 @mariusbarth) Tidiers tseries::garch models (#323 @wilsonfreitas) Removed dependency psych package (#313 @nutterb) Improved error messages (#303 @michaelweylandt) Compatibility new rstanarm loo packages (#298 @jgabry) Support tidying lists return irlba::irlba truly huge increase unit tests (#267 @dchiu911) Bug fix tidy.prcomp missing labels (#265 @corybrunson) Added pkgdown site https://broom.tidyverse.org/ (#260 @jayhesselberth) Added tidiers AER::ivreg models (#247 @hughjonesd) Added tidiers lavaan package (#233 @puterleat) Added conf.int argument tidy.coxph (#220 @larmarange) Added augment method chi-squared tests (#138 @larmarange) changed default se.type tidy.rq match quantreg::summary.rq() (#404 @ethchr) Added argument quick tidy.plm tidy.felm (#502 #509 @MatthieuStigler) Many small improvements throughout","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"contributors-0-5-0","dir":"Changelog","previous_headings":"","what":"Contributors","title":"broom 0.5.0","text":"Many many thanks following thoughtful comments design, bug reports PRs! community broom contributors kind, supportive insightful look forward working ! @atyre2, @batpigandme, @bfgray3, @bmannakee, @briatte, @cawoodjm, @cimentadaj, @dan87134, @dgrtwo, @dmenne, @ekatko1, @ellessenne, @erleholgersen, @ethchr, @huftis, @IndrajeetPatil, @jacob-long, @jarvisc1, @jenzopr, @jgabry, @jimhester, @josue-rodriguez, @karldw, @kfeilich, @larmarange, @lboller, @mariusbarth, @michaelweylandt, @mine-cetinkaya-rundel, @mkuehn10, @mvevans89, @nutterb, @ShreyasSingh, @stephlocke, @strengejacke, @topepo, @willbowditch, @WillemSleegers, @wilsonfreitas, @MatthieuStigler.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-044","dir":"Changelog","previous_headings":"","what":"broom 0.4.4","title":"broom 0.4.4","text":"CRAN release: 2018-03-29 Fixed gam tidiers work “Gam” objects, due update gam 1.15. fixes failing CRAN tests Improved test coverage (thanks #267 Derek Chiu)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-043","dir":"Changelog","previous_headings":"","what":"broom 0.4.3","title":"broom 0.4.3","text":"CRAN release: 2017-11-20 Changed deprecated dplyr::failwith purrr::possibly augment glance NULLs now return empty data frame Deprecated inflate() function favor tidyr::crossing Fixed confidence intervals gmm tidier (thanks #242 David Hugh-Jones) Fixed bug bootstrap tidiers (thanks #167 Jeremy Biesanz) Fixed tidy.lm quick = TRUE return terms character rather factor (thanks #191 Matteo Sostero) Added tidiers ivreg objects AER package (thanks #245 David Hugh-Jones) Added tidiers survdiff objects survival package (thanks #147 Michał Bojanowski) Added tidiers emmeans emmeans package (thanks #252 Matthew Kay) Added tidiers speedlm speedglm speedglm package (#685, thanks #248 David Hugh-Jones) Added tidiers muhaz objects muhaz package (thanks #251 Andreas Bender) Added tidiers decompose stl objects stats (thanks #165 Aaron Jacobs)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-042","dir":"Changelog","previous_headings":"","what":"broom 0.4.2","title":"broom 0.4.2","text":"CRAN release: 2017-02-13 Added tidiers lsmobj ref.grid objects lsmeans package Added tidiers betareg objects betareg package Added tidiers lmRob glmRob objects robust package Added tidiers brms objects brms package (thanks #149 Paul Buerkner) Fixed tidiers orcutt 2.0 Changed tidy.glmnet filter rows estimate == 0. Updates rstanarm tidiers (thanks #177 Jonah Gabry) Fixed issue survival package 2.40-1 (thanks #180 Marcus Walz)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-041","dir":"Changelog","previous_headings":"","what":"broom 0.4.1","title":"broom 0.4.1","text":"CRAN release: 2016-06-24 Added AppVeyor, codecov.io, code conduct Changed name “NA’s” column summaryDefault output “na” Fixed tidy.TukeyHSD include term column. Also added separate.levels argument, option separate comparison level1 level2 Fixed tidy.manova use correct column name test (previously, always pillai) Added kde_tidiers tidy kernel density estimates Added orcutt_tidiers tidy results cochrane.orcutt orcutt package Added tidy.dist tidy distance matrix output dist stats package Added tidy glance lmodel2 objects lmodel2 package Added tidiers poLCA objects poLCA package Added tidiers sparse matrices Matrix package Added tidiers prcomp objects Added tidiers Mclust objects Mclust package Added tidiers acf objects Fixed compatible dplyr 0.5, submitted CRAN","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-040","dir":"Changelog","previous_headings":"","what":"broom 0.4.0","title":"broom 0.4.0","text":"CRAN release: 2015-11-30 Added tidiers geeglm, nlrq, roc, boot, bgterm, kappa, binWidth, binDesign, rcorr, stanfit, rjags, gamlss, mle2 objects. Added tidy methods lists, including u, d, v lists svd, x, y, z lists used image persp Added quick argument tidy.lm, tidy.nls, tidy.biglm, create smaller faster version output. Changed rowwise_df_tidiers allow original data saved list column, provided column name augment. required removing data augment S3 signature. Also added tests-rowwise.R Fixed various issues ANOVA output Fixed various issues lme4 output Fixed issues tests caused dev version ggplot2","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-037","dir":"Changelog","previous_headings":"","what":"broom 0.3.7","title":"broom 0.3.7","text":"CRAN release: 2015-05-06 Added tidiers “plm” (panel linear model) objects plm package. Added tidy.coeftest coeftest objects lmtest package. Set tidy.lm work “mlm” (multiple linear model) objects (multiple response columns). Added tidy glance “biglm” “bigglm” objects biglm package. Fixed bug tidy.coxph one-row matrices returned Added tidy.power.htest Added tidy glance summaryDefault objects Added tidiers “lme” (linear mixed effects models) nlme package Added tidy glance multinom objects nnet package.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-036","dir":"Changelog","previous_headings":"","what":"broom 0.3.6","title":"broom 0.3.6","text":"CRAN release: 2015-02-18 Fixed bug tidy.pairwise.htest, now can handle cases grouping variable numeric. Added tidy.aovlist method. added stringr package IMPORTS trim whitespace beginning end term stratum columns. also required adjusting tidy.aov handle strata missing p-values. Set glance.lm work aov objects along lm objects. Added tidy glance matrix objects, tidy.matrix converting matrix data frame rownames included, glance.matrix returning result glance.data.frame. Changed DESCRIPTION Authors@R new format","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-035","dir":"Changelog","previous_headings":"","what":"broom 0.3.5","title":"broom 0.3.5","text":"CRAN release: 2015-01-05 Fixed small bug felm .fitted .resid columns matrices rather vectors. Added tidiers rlm (robust linear model) gam (generalized additive model) objects, including adjustments “lm” tidiers order handle . See ?rlm_tidiers ?gam_tidiers . Removed rownames tidy.cv.glmnet output","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-034","dir":"Changelog","previous_headings":"","what":"broom 0.3.4","title":"broom 0.3.4","text":"CRAN release: 2014-11-23 behavior augment, particularly regard missing data na.exclude argument, use augment_columns function made consistent across following models: lm glm nls merMod (lme4) survreg (survival) coxph (survival) Unit tests tests/testthat/test-augment.R added ensure consistency across models. tidy, augment glance methods added rowwise_df objects, set apply across rows. allows simple patterns : regressions <- mtcars %>% group_by(cyl) %>% (mod = lm(mpg ~ wt, .)) regressions %>% tidy(mod) regressions %>% augment(mod) See ?rowwise_df_tidiers . Added tidy glance methods Arima objects, tidy pairwise.htest objects. Fixes CRAN: change package description title case, removed NOTES, mostly adding globals.R declare global variables. original version published CRAN.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-03","dir":"Changelog","previous_headings":"","what":"broom 0.3","title":"broom 0.3","text":"Tidiers added S3 objects following packages: lme4 glmnet survival zoo felm MASS (ridgelm objects) tidy glance methods data.frames also added, augment.data.frame produces error (rather returning data.frame). stderror changed std.error (affects many functions) consistent broom’s naming conventions columns. function bootstrap added based example, perform common use case bootstrapping models.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-02","dir":"Changelog","previous_headings":"","what":"broom 0.2","title":"broom 0.2","text":"Added “augment” S3 generic various implementations. “augment” something different tidy: adds columns original dataset, including predictions, residuals, cluster assignments. originally described “fortify” ggplot2. Added “glance” S3 generic various implementations. “glance” produces one-row data frame summary, necessary tidy outputs values like R^2 F-statistics. Re-wrote intro broom vignette/README introduce three methods. Wrote new kmeans vignette. Added tidying methods multcomp, sp, map objects (fortify-multcomp, fortify-sp, fortify-map ggplot2). integrates substantial amounts ggplot2 code (permission), added Hadley Wickham author DESCRIPTION.","code":""}] +[{"path":[]},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement codeofconduct@posit.co. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://broom.tidymodels.org/dev/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to broom","title":"Contributing to broom","text":"outlines propose change broom. detailed info contributing package, tidyverse/tidymodels packages, please see development contributing guide. adding new tidiers broom, sure read vignette adding tidying methods.","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to broom","text":"Small typos grammatical errors documentation may edited directly using GitHub web interface, long changes made source file. YES: edit roxygen comment .R file R/. : edit .Rd file man/.","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":"prerequisites","dir":"","previous_headings":"","what":"Prerequisites","title":"Contributing to broom","text":"make substantial pull request, always file issue make sure someone team agrees ’s problem. ’ve found bug, create associated issue illustrate bug minimal reprex.","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"","what":"Pull request process","title":"Contributing to broom","text":"recommend create Git branch pull request (PR). New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code related PR. use roxygen2, Markdown syntax, documentation. use testthat. Contributions test cases included easier accept. See existing unit tests, like , guide unit test broom tidiers. user-facing changes, add bullet top NEWS.md current development version header describing changes made followed GitHub username, links relevant issue(s)/PR(s).","code":""},{"path":"https://broom.tidymodels.org/dev/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to broom","text":"Please note project released Contributor Code Conduct. participating project agree abide terms.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 broom authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/bootstrapping.html","id":"tidy-bootstrapping","dir":"Articles","previous_headings":"","what":"Tidy bootstrapping","title":"Tidy bootstrapping","text":"vignette now article {tidymodels} website.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"broom-lets-tidy-up-a-bit","dir":"Articles","previous_headings":"","what":"broom: let’s tidy up a bit","title":"Introduction to broom","text":"broom package takes messy output built-functions R, lm, nls, t.test, turns tidy tibbles. concept “tidy data”, introduced Hadley Wickham, offers powerful framework data manipulation analysis. paper makes convincing statement problem package tries solve (emphasis mine): model inputs usually require tidy inputs, attention detail doesn’t carry model outputs. Outputs predictions estimated coefficients aren’t always tidy. makes difficult combine results multiple models. example, R, default representation model coefficients tidy explicit variable records variable name estimate, instead recorded row names. R, row names must unique, combining coefficients many models (e.g., bootstrap resamples, subgroups) requires workarounds avoid losing important information. knocks flow analysis makes harder combine results multiple models. ’m currently aware packages resolve problem. broom attempt bridge gap untidy outputs predictions estimations tidy data want work . centers around three S3 methods, take common objects produced R statistical functions (lm, t.test, nls, etc) convert tibble. broom particularly designed work Hadley’s dplyr package (see broom+dplyr vignette ). broom distinguished packages like reshape2 tidyr, rearrange reshape data frames different forms. packages perform critical tasks tidy data analysis focus manipulating data frames one specific format another. contrast, broom designed take format tabular data format (sometimes anywhere close) convert tidy tibble. Tidying model outputs exact science, ’s based judgment kinds values data scientist typically wants tidy analysis (instance, estimates, test statistics, p-values). may lose information original object wanted, keep information need. think tidy output model changed, ’re missing tidying function S3 class ’d like, strongly encourage open issue pull request.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"tidying-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit","what":"Tidying functions","title":"Introduction to broom","text":"package provides three S3 methods three distinct kinds tidying. tidy: constructs tibble summarizes model’s statistical findings. includes coefficients p-values term regression, per-cluster information clustering applications, per-test information multtest functions. augment: add columns original data modeled. includes predictions, residuals, cluster assignments. glance: construct concise one-row summary model. typically contains values R^2, adjusted R^2, residual standard error computed entire model. Note classes may one two methods defined. Consider illustrative example linear fit built-mtcars dataset. summary output useful enough just want read . However, converting tabular data contains information, can combine models analysis, trivial. coef(summary(lmfit)) get matrix coefficients, terms still stored row names, column names inconsistent packages (e.g. Pr(>|t|) compared p.value). Instead, can use tidy function, broom package, fit: gives tabular data representation. Note row names moved column called term, column names simple consistent (can accessed using $). Instead viewing coefficients, might interested fitted values residuals original points regression. , use augment, augments original data information model: Note new columns begins . (avoid overwriting original columns). Finally, several summary statistics computed entire regression, R^2 F-statistic. can accessed glance function: distinction tidy, augment glance functions explored different context k-means vignette.","code":"lmfit <- lm(mpg ~ wt, mtcars) lmfit ## ## Call: ## lm(formula = mpg ~ wt, data = mtcars) ## ## Coefficients: ## (Intercept) wt ## 37.285 -5.344 summary(lmfit) ## ## Call: ## lm(formula = mpg ~ wt, data = mtcars) ## ## Residuals: ## Min 1Q Median 3Q Max ## -4.5432 -2.3647 -0.1252 1.4096 6.8727 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 37.2851 1.8776 19.858 < 2e-16 *** ## wt -5.3445 0.5591 -9.559 1.29e-10 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 3.046 on 30 degrees of freedom ## Multiple R-squared: 0.7528, Adjusted R-squared: 0.7446 ## F-statistic: 91.38 on 1 and 30 DF, p-value: 1.294e-10 library(broom) tidy(lmfit) ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## ## 1 (Intercept) 37.3 1.88 19.9 8.24e-19 ## 2 wt -5.34 0.559 -9.56 1.29e-10 augment(lmfit) ## # A tibble: 32 × 9 ## .rownames mpg wt .fitted .resid .hat .sigma .cooksd .std.resid ## ## 1 Mazda RX4 21 2.62 23.3 -2.28 0.0433 3.07 1.33e-2 -0.766 ## 2 Mazda RX4 … 21 2.88 21.9 -0.920 0.0352 3.09 1.72e-3 -0.307 ## 3 Datsun 710 22.8 2.32 24.9 -2.09 0.0584 3.07 1.54e-2 -0.706 ## 4 Hornet 4 D… 21.4 3.22 20.1 1.30 0.0313 3.09 3.02e-3 0.433 ## 5 Hornet Spo… 18.7 3.44 18.9 -0.200 0.0329 3.10 7.60e-5 -0.0668 ## 6 Valiant 18.1 3.46 18.8 -0.693 0.0332 3.10 9.21e-4 -0.231 ## 7 Duster 360 14.3 3.57 18.2 -3.91 0.0354 3.01 3.13e-2 -1.31 ## 8 Merc 240D 24.4 3.19 20.2 4.16 0.0313 3.00 3.11e-2 1.39 ## 9 Merc 230 22.8 3.15 20.5 2.35 0.0314 3.07 9.96e-3 0.784 ## 10 Merc 280 19.2 3.44 18.9 0.300 0.0329 3.10 1.71e-4 0.100 ## # ℹ 22 more rows glance(lmfit) ## # A tibble: 1 × 12 ## r.squared adj.r.squared sigma statistic p.value df logLik AIC ## ## 1 0.753 0.745 3.05 91.4 1.29e-10 1 -80.0 166. ## # ℹ 4 more variables: BIC , deviance , df.residual , ## # nobs "},{"path":[]},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"generalized-linear-and-non-linear-models","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Other Examples","what":"Generalized linear and non-linear models","title":"Introduction to broom","text":"functions apply equally well output glm: Note statistics computed glance different glm objects lm (e.g. deviance rather R^2): functions also work fits, nonlinear models (nls):","code":"glmfit <- glm(am ~ wt, mtcars, family = \"binomial\") tidy(glmfit) ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## ## 1 (Intercept) 12.0 4.51 2.67 0.00759 ## 2 wt -4.02 1.44 -2.80 0.00509 augment(glmfit) ## # A tibble: 32 × 9 ## .rownames am wt .fitted .resid .hat .sigma .cooksd .std.resid ## ## 1 Mazda RX4 1 2.62 1.50 0.635 0.126 0.803 0.0184 0.680 ## 2 Mazda RX4 … 1 2.88 0.471 0.985 0.108 0.790 0.0424 1.04 ## 3 Datsun 710 1 2.32 2.70 0.360 0.0963 0.810 0.00394 0.379 ## 4 Hornet 4 D… 0 3.22 -0.897 -0.827 0.0744 0.797 0.0177 -0.860 ## 5 Hornet Spo… 0 3.44 -1.80 -0.553 0.0681 0.806 0.00647 -0.572 ## 6 Valiant 0 3.46 -1.88 -0.532 0.0674 0.807 0.00590 -0.551 ## 7 Duster 360 0 3.57 -2.33 -0.432 0.0625 0.809 0.00348 -0.446 ## 8 Merc 240D 0 3.19 -0.796 -0.863 0.0755 0.796 0.0199 -0.897 ## 9 Merc 230 0 3.15 -0.635 -0.922 0.0776 0.793 0.0242 -0.960 ## 10 Merc 280 0 3.44 -1.80 -0.553 0.0681 0.806 0.00647 -0.572 ## # ℹ 22 more rows glance(glmfit) ## # A tibble: 1 × 8 ## null.deviance df.null logLik AIC BIC deviance df.residual nobs ## ## 1 43.2 31 -9.59 23.2 26.1 19.2 30 32 nlsfit <- nls(mpg ~ k / wt + b, mtcars, start = list(k = 1, b = 0)) tidy(nlsfit) ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## ## 1 k 45.8 4.25 10.8 7.64e-12 ## 2 b 4.39 1.54 2.85 7.74e- 3 augment(nlsfit, mtcars) ## # A tibble: 32 × 14 ## .rownames mpg cyl disp hp drat wt qsec vs am gear ## ## 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 ## 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 ## 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 ## 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 ## 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 ## 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 ## 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 ## 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 ## 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 ## 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 ## # ℹ 22 more rows ## # ℹ 3 more variables: carb , .fitted , .resid glance(nlsfit) ## # A tibble: 1 × 9 ## sigma isConv finTol logLik AIC BIC deviance df.residual nobs ## ## 1 2.77 TRUE 0.0000000197 -77.0 160. 164. 231. 30 32"},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"hypothesis-testing","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Other Examples","what":"Hypothesis testing","title":"Introduction to broom","text":"tidy function can also applied htest objects, output popular built-functions like t.test, cor.test, wilcox.test. cases might fewer columns (example, confidence interval): Since tidy output already one row, glance returns output: augment method defined chi-squared tests, since meaningful sense, tests, hypothesis test produces output initial data point.","code":"tt <- t.test(wt ~ am, mtcars) tidy(tt) ## # A tibble: 1 × 10 ## estimate estimate1 estimate2 statistic p.value parameter conf.low ## ## 1 1.36 3.77 2.41 5.49 0.00000627 29.2 0.853 ## # ℹ 3 more variables: conf.high , method , alternative wt <- wilcox.test(wt ~ am, mtcars) tidy(wt) ## # A tibble: 1 × 4 ## statistic p.value method alternative ## ## 1 230. 0.0000435 Wilcoxon rank sum test with continuity … two.sided glance(tt) ## # A tibble: 1 × 10 ## estimate estimate1 estimate2 statistic p.value parameter conf.low ## ## 1 1.36 3.77 2.41 5.49 0.00000627 29.2 0.853 ## # ℹ 3 more variables: conf.high , method , alternative glance(wt) ## # A tibble: 1 × 4 ## statistic p.value method alternative ## ## 1 230. 0.0000435 Wilcoxon rank sum test with continuity … two.sided chit <- chisq.test(xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic) )) tidy(chit) ## # A tibble: 1 × 4 ## statistic p.value parameter method ## ## 1 350. 1.56e-75 3 Pearson's Chi-squared test augment(chit) ## # A tibble: 8 × 9 ## Sex Class .observed .prop .row.prop .col.prop .expected .resid ## ## 1 Male 1st 180 0.0818 0.104 0.554 256. -4.73 ## 2 Female 1st 145 0.0659 0.309 0.446 69.4 9.07 ## 3 Male 2nd 179 0.0813 0.103 0.628 224. -3.02 ## 4 Female 2nd 106 0.0482 0.226 0.372 60.9 5.79 ## 5 Male 3rd 510 0.232 0.295 0.722 555. -1.92 ## 6 Female 3rd 196 0.0891 0.417 0.278 151. 3.68 ## 7 Male Crew 862 0.392 0.498 0.974 696. 6.29 ## 8 Female Crew 23 0.0104 0.0489 0.0260 189. -12.1 ## # ℹ 1 more variable: .std.resid "},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"conventions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit","what":"Conventions","title":"Introduction to broom","text":"order maintain consistency, attempt follow conventions regarding structure returned data.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"all-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Conventions","what":"All functions","title":"Introduction to broom","text":"output tidy, augment glance functions always tibble. output never rownames. ensures can combine tidy outputs without fear losing information (since rownames R contain duplicates). column names kept consistent, can combined across different models know expect (contrast asking “pval PValue?” every time). examples possible column names, tidy output contain even columns.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"tidy-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Conventions","what":"tidy functions","title":"Introduction to broom","text":"row tidy output typically represents well-defined concept, one term regression, one test, one cluster/class. meaning varies across models usually self-evident. one thing row represent point initial data (, use augment method). term“” term regression model estimated. p.value: spelling chosen (common alternatives pvalue, PValue, pval) consistent functions R’s built-stats package statistic test statistic, usually one used compute p-value. Combining across many sub-groups reliable way perform (e.g.) bootstrap hypothesis testing estimate conf.low low end confidence interval estimate conf.high high end confidence interval estimate df degrees freedom","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"augment-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Conventions","what":"augment functions","title":"Introduction to broom","text":"data argument missing, augment attempts reconstruct data model (note may always possible, usually won’t contain columns used model). row augment output matches corresponding row original data. original data contained rownames, augment turns column called .rownames. Newly added column names begin . avoid overwriting columns original data. .fitted: predicted values, scale data. .resid: residuals: actual y values minus fitted values .cluster: cluster assignments","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom.html","id":"glance-functions","dir":"Articles","previous_headings":"broom: let’s tidy up a bit > Conventions","what":"glance functions","title":"Introduction to broom","text":"exception glance(NULL) returns empty tibble. avoid including arguments given modeling function. example, glm glance output need contain field family, since decided user calling glm rather modeling function . r.squared fraction variance explained model adj.r.squared R2R^2 adjusted based degrees freedom sigma square root estimated variance residuals","code":""},{"path":"https://broom.tidymodels.org/dev/articles/broom_and_dplyr.html","id":"broom-and-dplyr","dir":"Articles","previous_headings":"","what":"broom and dplyr","title":"broom and dplyr","text":"broom useful summarizing result single analysis consistent format, really designed high-throughput applications, must combine results multiple analyses. subgroups data, analyses using different models, bootstrap replicates, permutations, . particular, plays well nest/unnest functions tidyr map function purrr. First, loading necessary packages setting defaults: Let’s try simple dataset, built-Orange. start coercing Orange tibble. gives nicer print method especially useful later start working list-columns. contains 35 observations three variables: Tree, age, circumference. Tree factor five levels describing five trees. might expected, age circumference correlated: Suppose want test correlations individually within tree. can dplyr’s group_by: (Note correlations much higher aggregated one, furthermore can now see similar across trees). Suppose instead simply estimating correlation, want perform hypothesis test cor.test: contains multiple values want output. vectors length 1, p-value estimate, longer, confidence interval. can get nicely organized tibble using tidy function: Often, want perform multiple tests fit multiple models, different part data. case, recommend nest-map-unnest workflow. example, suppose want perform correlation tests different tree. start nesting data based group interest: run correlation test nested tibble using purrr::map: results list-column S3 objects. want tidy objects, can also map. Finally, want unnest tidied data frames can see results flat tibble. together, looks like: workflow becomes even useful applied regressions. Untidy output regression looks like: tidy results, get multiple rows output model: Now can handle multiple regressions using exactly workflow : can just easily use multiple predictors regressions, shown mtcars dataset. nest data automatic manual cars (column), perform regression within nested tibble. want just tidy output, augment glance outputs well, still performing regression ? Since ’re using list-columns, can just fit model use multiple list-columns store tidied, glanced augmented outputs. combining estimates p-values across groups tidy data frame (instead list output model objects), new class analyses visualizations becomes straightforward. includes Sorting p-value estimate find significant terms across tests P-value histograms Volcano plots comparing p-values effect size estimates cases, can easily filter, facet, distinguish based term column. short, makes tools tidy data analysis available results data analysis models, just inputs.","code":"library(broom) library(tibble) library(ggplot2) library(dplyr) library(tidyr) library(purrr) theme_set(theme_minimal()) data(Orange) Orange <- as_tibble(Orange) Orange ## # A tibble: 35 × 3 ## Tree age circumference ## ## 1 1 118 30 ## 2 1 484 58 ## 3 1 664 87 ## 4 1 1004 115 ## 5 1 1231 120 ## 6 1 1372 142 ## 7 1 1582 145 ## 8 2 118 33 ## 9 2 484 69 ## 10 2 664 111 ## # ℹ 25 more rows cor(Orange$age, Orange$circumference) ## [1] 0.9135189 ggplot(Orange, aes(age, circumference, color = Tree)) + geom_line() Orange %>% group_by(Tree) %>% summarize(correlation = cor(age, circumference)) ## # A tibble: 5 × 2 ## Tree correlation ## ## 1 3 0.988 ## 2 1 0.985 ## 3 5 0.988 ## 4 2 0.987 ## 5 4 0.984 ct <- cor.test(Orange$age, Orange$circumference) ct ## ## Pearson's product-moment correlation ## ## data: Orange$age and Orange$circumference ## t = 12.9, df = 33, p-value = 1.931e-14 ## alternative hypothesis: true correlation is not equal to 0 ## 95 percent confidence interval: ## 0.8342364 0.9557955 ## sample estimates: ## cor ## 0.9135189 tidy(ct) ## # A tibble: 1 × 8 ## estimate statistic p.value parameter conf.low conf.high method ## ## 1 0.914 12.9 1.93e-14 33 0.834 0.956 Pearson's prod… ## # ℹ 1 more variable: alternative nested <- Orange %>% nest(data = -Tree) nested %>% mutate(test = map(data, ~ cor.test(.x$age, .x$circumference))) ## # A tibble: 5 × 3 ## Tree data test ## ## 1 1 ## 2 2 ## 3 3 ## 4 4 ## 5 5 nested %>% mutate( test = map(data, ~ cor.test(.x$age, .x$circumference)), # S3 list-col tidied = map(test, tidy) ) ## # A tibble: 5 × 4 ## Tree data test tidied ## ## 1 1 ## 2 2 ## 3 3 ## 4 4 ## 5 5 Orange %>% nest(data = -Tree) %>% mutate( test = map(data, ~ cor.test(.x$age, .x$circumference)), # S3 list-col tidied = map(test, tidy) ) %>% unnest(tidied) ## # A tibble: 5 × 11 ## Tree data test estimate statistic p.value parameter conf.low ## ## 1 1 0.985 13.0 0.0000485 5 0.901 ## 2 2 0.987 13.9 0.0000343 5 0.914 ## 3 3 0.988 14.4 0.0000290 5 0.919 ## 4 4 0.984 12.5 0.0000573 5 0.895 ## 5 5 0.988 14.1 0.0000318 5 0.916 ## # ℹ 3 more variables: conf.high , method , alternative lm_fit <- lm(age ~ circumference, data = Orange) summary(lm_fit) ## ## Call: ## lm(formula = age ~ circumference, data = Orange) ## ## Residuals: ## Min 1Q Median 3Q Max ## -317.88 -140.90 -17.20 96.54 471.16 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 16.6036 78.1406 0.212 0.833 ## circumference 7.8160 0.6059 12.900 1.93e-14 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 203.1 on 33 degrees of freedom ## Multiple R-squared: 0.8345, Adjusted R-squared: 0.8295 ## F-statistic: 166.4 on 1 and 33 DF, p-value: 1.931e-14 tidy(lm_fit) ## # A tibble: 2 × 5 ## term estimate std.error statistic p.value ## ## 1 (Intercept) 16.6 78.1 0.212 8.33e- 1 ## 2 circumference 7.82 0.606 12.9 1.93e-14 Orange %>% nest(data = -Tree) %>% mutate( fit = map(data, ~ lm(age ~ circumference, data = .x)), tidied = map(fit, tidy) ) %>% unnest(tidied) ## # A tibble: 10 × 8 ## Tree data fit term estimate std.error statistic p.value ## ## 1 1 (Int… -265. 98.6 -2.68 4.36e-2 ## 2 1 circ… 11.9 0.919 13.0 4.85e-5 ## 3 2 (Int… -132. 83.1 -1.59 1.72e-1 ## 4 2 circ… 7.80 0.560 13.9 3.43e-5 ## 5 3 (Int… -210. 85.3 -2.46 5.74e-2 ## 6 3 circ… 12.0 0.835 14.4 2.90e-5 ## 7 4 (Int… -76.5 88.3 -0.867 4.26e-1 ## 8 4 circ… 7.17 0.572 12.5 5.73e-5 ## 9 5 (Int… -54.5 76.9 -0.709 5.10e-1 ## 10 5 circ… 8.79 0.621 14.1 3.18e-5 data(mtcars) mtcars <- as_tibble(mtcars) # to play nicely with list-cols mtcars ## # A tibble: 32 × 11 ## mpg cyl disp hp drat wt qsec vs am gear carb ## ## 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 ## 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 ## 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 ## 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 ## 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 ## 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 ## 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 ## 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 ## 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 ## 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 ## # ℹ 22 more rows mtcars %>% nest(data = -am) %>% mutate( fit = map(data, ~ lm(wt ~ mpg + qsec + gear, data = .x)), # S3 list-col tidied = map(fit, tidy) ) %>% unnest(tidied) ## # A tibble: 8 × 8 ## am data fit term estimate std.error statistic p.value ## ## 1 1 (Intercept) 4.28 3.46 1.24 0.247 ## 2 1 mpg -0.101 0.0294 -3.43 0.00750 ## 3 1 qsec 0.0398 0.151 0.264 0.798 ## 4 1 gear -0.0229 0.349 -0.0656 0.949 ## 5 0 (Intercept) 4.92 1.40 3.52 0.00309 ## 6 0 mpg -0.192 0.0443 -4.33 0.000591 ## 7 0 qsec 0.0919 0.0983 0.935 0.365 ## 8 0 gear 0.147 0.368 0.398 0.696 regressions <- mtcars %>% nest(data = -am) %>% mutate( fit = map(data, ~ lm(wt ~ mpg + qsec + gear, data = .x)), tidied = map(fit, tidy), glanced = map(fit, glance), augmented = map(fit, augment) ) regressions %>% unnest(tidied) ## # A tibble: 8 × 10 ## am data fit term estimate std.error statistic p.value glanced ## ## 1 1 (Int… 4.28 3.46 1.24 2.47e-1 ## 2 1 mpg -0.101 0.0294 -3.43 7.50e-3 ## 3 1 qsec 0.0398 0.151 0.264 7.98e-1 ## 4 1 gear -0.0229 0.349 -0.0656 9.49e-1 ## 5 0 (Int… 4.92 1.40 3.52 3.09e-3 ## 6 0 mpg -0.192 0.0443 -4.33 5.91e-4 ## 7 0 qsec 0.0919 0.0983 0.935 3.65e-1 ## 8 0 gear 0.147 0.368 0.398 6.96e-1 ## # ℹ 1 more variable: augmented regressions %>% unnest(glanced) ## # A tibble: 2 × 17 ## am data fit tidied r.squared adj.r.squared sigma statistic ## ## 1 1 0.833 0.778 0.291 15.0 ## 2 0 0.625 0.550 0.522 8.32 ## # ℹ 9 more variables: p.value , df , logLik , AIC , ## # BIC , deviance , df.residual , nobs , ## # augmented regressions %>% unnest(augmented) ## # A tibble: 32 × 15 ## am data fit tidied glanced wt mpg qsec gear .fitted ## ## 1 1 2.62 21 16.5 4 2.73 ## 2 1 2.88 21 17.0 4 2.75 ## 3 1 2.32 22.8 18.6 4 2.63 ## 4 1 2.2 32.4 19.5 4 1.70 ## 5 1 1.62 30.4 18.5 4 1.86 ## 6 1 1.84 33.9 19.9 4 1.56 ## 7 1 1.94 27.3 18.9 4 2.19 ## 8 1 2.14 26 16.7 5 2.21 ## 9 1 1.51 30.4 16.9 5 1.77 ## 10 1 3.17 15.8 14.5 5 3.15 ## # ℹ 22 more rows ## # ℹ 5 more variables: .resid , .hat , .sigma , ## # .cooksd , .std.resid "},{"path":"https://broom.tidymodels.org/dev/articles/kmeans.html","id":"tidying-k-means-clustering","dir":"Articles","previous_headings":"","what":"Tidying k-means clustering","title":"kmeans with dplyr and broom","text":"vignette now article {tidymodels} website.","code":""},{"path":"https://broom.tidymodels.org/dev/articles/maintenance.html","id":"motivation","dir":"Articles","previous_headings":"","what":"Motivation","title":"Maintenance guidelines","text":"packages tidymodels, broom oldest, one largest codebases, likely widely used. writing tidyup, package downloaded 30 million times, directly depended 200 CRAN packages -knows--many research analyses. package grew organically course many years—thanks contributions hundreds community members—now supplies hundreds methods summarizing model objects: factors mention cause celebration, time, mean maintaining broom approach tidymodels packages lead significant breaking changes scope creep.","code":"library(broom) length(methods(\"tidy\")) ## [1] 133 length(methods(\"glance\")) ## [1] 82 length(methods(\"augment\")) ## [1] 50"},{"path":"https://broom.tidymodels.org/dev/articles/maintenance.html","id":"guidelines","dir":"Articles","previous_headings":"","what":"Guidelines","title":"Maintenance guidelines","text":"light challenges, broom team look following guidelines determining scope new development package: New methods: broom longer accept new tidier methods package, instead asking maintained model-supplying package. can read tooling help make happen “Writing new tidier methods” vignette! Internal consistency: feel improvement interface gained enforcing internal consistency (e.g. argument order, column names) worth potential breaking change dependencies, merge changes. Ellipsis handling: tidier methods pass ellipses modeling functions others take ellipses documented unused. first setting, wide variety modeling functions wrap handle ellipses, thus feel principled way “vet” ellipses passing along. second case, feel improvement interface failing unused dots worth breaking change dependencies. Note guidelines largely reflect maintenance practice years preceding 1.0.0 version. introduction guidelines isn’t change much reflection approach maintaining broom 2017-2022. Communicating approach clearly also allows us clearly define issue within scope package’s development. examples cases: Visible failures: tidier visibly fails (e.g. raises error) currently unsupported use cases modeling function, accept/implement changes accommodate usage. doesn’t apply prompts raised broom . Silent failures: tidier silently fails (e.g. sensitive documented argument dispatches method return incorrect results), accept/implement changes address failures. Breaking changes dependencies: accept/implement changes address new errors, warnings, messages introduced dependencies. ’re sure whether change ’d like see within scope package’s development, please feel free open issue broom GitHub repository discussion!","code":""},{"path":"https://broom.tidymodels.org/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"David Robinson. Author. Alex Hayes. Author. Simon Couch. Author, maintainer. . Copyright holder, funder. Indrajeet Patil. Contributor. Derek Chiu. Contributor. Matthieu Gomez. Contributor. Boris Demeshev. Contributor. Dieter Menne. Contributor. Benjamin Nutter. Contributor. Luke Johnston. Contributor. Ben Bolker. Contributor. Francois Briatte. Contributor. Jeffrey Arnold. Contributor. Jonah Gabry. Contributor. Luciano Selzer. Contributor. Gavin Simpson. Contributor. Jens Preussner. Contributor. Jay Hesselberth. Contributor. Hadley Wickham. Contributor. Matthew Lincoln. Contributor. Alessandro Gasparini. Contributor. Lukasz Komsta. Contributor. Frederick Novometsky. Contributor. Wilson Freitas. Contributor. Michelle Evans. Contributor. Jason Cory Brunson. Contributor. Simon Jackson. Contributor. Ben Whalley. Contributor. Karissa Whiting. Contributor. Yves Rosseel. Contributor. Michael Kuehn. Contributor. Jorge Cimentada. Contributor. Erle Holgersen. Contributor. Karl Dunkle Werner. Contributor. Ethan Christensen. Contributor. Steven Pav. Contributor. Paul PJ. Contributor. Ben Schneider. Contributor. Patrick Kennedy. Contributor. Lily Medina. Contributor. Brian Fannin. Contributor. Jason Muhlenkamp. Contributor. Matt Lehman. Contributor. Bill Denney. Contributor. Nic Crane. Contributor. Andrew Bates. Contributor. Vincent Arel-Bundock. Contributor. Hideaki Hayashi. Contributor. Luis Tobalina. Contributor. Annie Wang. Contributor. Wei Yang Tham. Contributor. Clara Wang. Contributor. Abby Smith. Contributor. Jasper Cooper. Contributor. E Auden Krauska. Contributor. Alex Wang. Contributor. Malcolm Barrett. Contributor. Charles Gray. Contributor. Jared Wilber. Contributor. Vilmantas Gegzna. Contributor. Eduard Szoecs. Contributor. Frederik Aust. Contributor. Angus Moore. Contributor. Nick Williams. Contributor. Marius Barth. Contributor. Bruna Wundervald. Contributor. Joyce Cahoon. Contributor. Grant McDermott. Contributor. Kevin Zarca. Contributor. Shiro Kuriwaki. Contributor. Lukas Wallrich. Contributor. James Martherus. Contributor. Chuliang Xiao. Contributor. Joseph Larmarange. Contributor. Max Kuhn. Contributor. Michal Bojanowski. Contributor. Hakon Malmedal. Contributor. Clara Wang. Contributor. Sergio Oller. Contributor. Luke Sonnet. Contributor. Jim Hester. Contributor. Ben Schneider. Contributor. Bernie Gray. Contributor. Mara Averick. Contributor. Aaron Jacobs. Contributor. Andreas Bender. Contributor. Sven Templer. Contributor. Paul-Christian Buerkner. Contributor. Matthew Kay. Contributor. Erwan Le Pennec. Contributor. Johan Junkka. Contributor. Hao Zhu. Contributor. Benjamin Soltoff. Contributor. Zoe Wilkinson Saldana. Contributor. Tyler Littlefield. Contributor. Charles T. Gray. Contributor. Shabbh E. Banks. Contributor. Serina Robinson. Contributor. Roger Bivand. Contributor. Riinu Ots. Contributor. Nicholas Williams. Contributor. Nina Jakobsen. Contributor. Michael Weylandt. Contributor. Lisa Lendway. Contributor. Karl Hailperin. Contributor. Josue Rodriguez. Contributor. Jenny Bryan. Contributor. Chris Jarvis. Contributor. Greg Macfarlane. Contributor. Brian Mannakee. Contributor. Drew Tyre. Contributor. Shreyas Singh. Contributor. Laurens Geffert. Contributor. Hong Ooi. Contributor. Henrik Bengtsson. Contributor. Eduard Szocs. Contributor. David Hugh-Jones. Contributor. Matthieu Stigler. Contributor. Hugo Tavares. Contributor. R. Willem Vervoort. Contributor. Brenton M. Wiernik. Contributor. Josh Yamamoto. Contributor. Jasme Lee. Contributor. Taren Sanders. Contributor. Ilaria Prosdocimi. Contributor. Daniel D. Sjoberg. Contributor. Alex Reinhart. Contributor.","code":""},{"path":"https://broom.tidymodels.org/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Robinson D, Hayes , Couch S (2024). broom: Convert Statistical Objects Tidy Tibbles. R package version 1.0.7.9000, https://github.com/tidymodels/broom, https://broom.tidymodels.org/.","code":"@Manual{, title = {broom: Convert Statistical Objects into Tidy Tibbles}, author = {David Robinson and Alex Hayes and Simon Couch}, year = {2024}, note = {R package version 1.0.7.9000, https://github.com/tidymodels/broom}, url = {https://broom.tidymodels.org/}, }"},{"path":[]},{"path":"https://broom.tidymodels.org/dev/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Convert Statistical Objects into Tidy Tibbles","text":"broom summarizes key information models tidy tibble()s. broom provides three verbs make convenient interact model objects: tidy() summarizes information model components glance() reports information entire model augment() adds informations observations dataset detailed introduction, please see vignette(\"broom\"). broom tidies 100+ models popular modelling packages almost model objects stats package comes base R. vignette(\"available-methods\") lists method availability. aren’t familiar tidy data structures want know can make life easier, highly recommend reading Hadley Wickham’s Tidy Data.","code":""},{"path":"https://broom.tidymodels.org/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Convert Statistical Objects into Tidy Tibbles","text":"find bug, please file minimal reproducible example issues.","code":"# we recommend installing the entire tidyverse # modeling set, which includes broom: install.packages(\"tidymodels\") # alternatively, to install just broom: install.packages(\"broom\") # to get the development version from GitHub: install.packages(\"pak\") pak::pak(\"tidymodels/broom\")"},{"path":"https://broom.tidymodels.org/dev/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Convert Statistical Objects into Tidy Tibbles","text":"tidy() produces tibble() row contains information important component model. regression models, often corresponds regression coefficients. can useful want inspect model create custom visualizations. glance() returns tibble exactly one row goodness fitness measures related statistics. useful check model misspecification compare many models. augment adds columns dataset, containing information fitted values, residuals cluster assignments. columns added dataset . prefix prevent existing columns overwritten.","code":"library(broom) fit <- lm(Volume ~ Girth + Height, trees) tidy(fit) #> # A tibble: 3 x 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -58.0 8.64 -6.71 2.75e- 7 #> 2 Girth 4.71 0.264 17.8 8.22e-17 #> 3 Height 0.339 0.130 2.61 1.45e- 2 glance(fit) #> # A tibble: 1 x 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC BIC #> #> 1 0.948 0.944 3.88 255. 1.07e-18 2 -84.5 177. 183. #> # … with 3 more variables: deviance , df.residual , nobs augment(fit, data = trees) #> # A tibble: 31 x 9 #> Girth Height Volume .fitted .resid .std.resid .hat .sigma .cooksd #> #> 1 8.3 70 10.3 4.84 5.46 1.50 0.116 3.79 0.0978 #> 2 8.6 65 10.3 4.55 5.75 1.60 0.147 3.77 0.148 #> 3 8.8 63 10.2 4.82 5.38 1.53 0.177 3.78 0.167 #> 4 10.5 72 16.4 15.9 0.526 0.140 0.0592 3.95 0.000409 #> 5 10.7 81 18.8 19.9 -1.07 -0.294 0.121 3.95 0.00394 #> 6 10.8 83 19.7 21.0 -1.32 -0.370 0.156 3.94 0.00840 #> 7 11 66 15.6 16.2 -0.593 -0.162 0.115 3.95 0.00114 #> 8 11 75 18.2 19.2 -1.05 -0.277 0.0515 3.95 0.00138 #> 9 11.1 80 22.6 21.4 1.19 0.321 0.0920 3.95 0.00348 #> 10 11.2 75 19.9 20.2 -0.288 -0.0759 0.0480 3.95 0.0000968 #> # … with 21 more rows"},{"path":"https://broom.tidymodels.org/dev/index.html","id":"contributing","dir":"","previous_headings":"Usage","what":"Contributing","title":"Convert Statistical Objects into Tidy Tibbles","text":"welcome contributions types! questions discussions tidymodels packages, modeling, machine learning, please post Posit Community. think encountered bug, please submit issue. Either way, learn create share reprex (minimal, reproducible example), clearly communicate code. Check details contributing guidelines tidymodels packages get help. never directly contributed R package , broom excellent place start. Find issue Beginner Friendly tag comment ’d like take ’ll help get started. Generally, , encourage typo corrections, bug reports, bug fixes feature requests. Feedback clarity documentation especially valuable! interested adding tidier methods new model objects, please read article tidymodels website. Contributor Code Conduct. participating broom agree abide terms.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) Mclust object — augment.Mclust","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"","code":"# S3 method for class 'Mclust' augment(x, data = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"x Mclust object return mclust::Mclust(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"tibble::tibble() columns: .class Predicted class. .uncertainty uncertainty associated classification. Equal one minus model class probability.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.Mclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) Mclust object — augment.Mclust","text":"","code":"# load library for models and data library(mclust) #> Package 'mclust' version 6.1.1 #> Type 'citation(\"mclust\")' for citing this R package in publications. # load data manipulation libraries library(dplyr) #> #> Attaching package: ‘dplyr’ #> The following objects are masked from ‘package:stats’: #> #> filter, lag #> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union library(tibble) library(purrr) #> #> Attaching package: ‘purrr’ #> The following object is masked from ‘package:mclust’: #> #> map library(tidyr) set.seed(27) centers <- tibble( cluster = factor(1:3), # number points in each cluster num_points = c(100, 150, 50), # x1 coordinate of cluster center x1 = c(5, 0, -3), # x2 coordinate of cluster center x2 = c(-1, 1, -2) ) points <- centers %>% mutate( x1 = map2(num_points, x1, rnorm), x2 = map2(num_points, x2, rnorm) ) %>% select(-num_points, -cluster) %>% unnest(c(x1, x2)) # fit model m <- Mclust(points) # summarize model fit with tidiers tidy(m) #> # A tibble: 3 × 6 #> component size proportion variance mean.x1 mean.x2 #> #> 1 1 101 0.335 1.12 5.01 -1.04 #> 2 2 150 0.503 1.12 0.0594 1.00 #> 3 3 49 0.161 1.12 -3.20 -2.06 augment(m, points) #> # A tibble: 300 × 4 #> x1 x2 .class .uncertainty #> #> 1 6.91 -2.74 1 3.98e-11 #> 2 6.14 -2.45 1 1.99e- 9 #> 3 4.24 -0.946 1 1.47e- 4 #> 4 3.54 0.287 1 2.94e- 2 #> 5 3.91 0.408 1 7.48e- 3 #> 6 5.30 -1.58 1 4.22e- 7 #> 7 5.01 -1.77 1 1.06e- 6 #> 8 6.16 -1.68 1 7.64e- 9 #> 9 7.13 -2.17 1 4.16e-11 #> 10 5.24 -2.42 1 1.16e- 7 #> # ℹ 290 more rows glance(m) #> # A tibble: 1 × 7 #> model G BIC logLik df hypvol nobs #> #> 1 EII 3 -2402. -1175. 9 NA 300"},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) betamfx object — augment.betamfx","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"","code":"# S3 method for class 'betamfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"response\", \"link\", \"precision\", \"variance\", \"quantile\"), type.residuals = c(\"sweighted2\", \"deviance\", \"pearson\", \"response\", \"weighted\", \"sweighted\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"x betamfx object. data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument betareg::predict.betareg(). Defaults \"response\". type.residuals Character indicating type residuals use. Passed type argument betareg::residuals.betareg(). Defaults \"sweighted2. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"augment method wraps augment.betareg() mfx::betamfx() objects.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) betamfx object — augment.betamfx","text":"","code":"library(mfx) #> Loading required package: sandwich #> Loading required package: lmtest #> Loading required package: zoo #> #> Attaching package: ‘zoo’ #> The following objects are masked from ‘package:base’: #> #> as.Date, as.Date.numeric #> Loading required package: MASS #> #> Attaching package: ‘MASS’ #> The following object is masked from ‘package:dplyr’: #> #> select #> Loading required package: betareg # Simulate some data set.seed(12345) n <- 1000 x <- rnorm(n) # Beta outcome y <- rbeta(n, shape1 = plogis(1 + 0.5 * x), shape2 = (abs(0.2 * x))) # Use Smithson and Verkuilen correction y <- (y * (n - 1) + 0.5) / n d <- data.frame(y, x) mod_betamfx <- betamfx(y ~ x | x, data = d) tidy(mod_betamfx, conf.int = TRUE) #> # A tibble: 1 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 x TRUE 0.0226 0.00801 2.82 0.00483 0.00686 0.0383 # Compare with the naive model coefficients of the equivalent betareg call (not run) # tidy(betamfx(y ~ x | x, data = d), conf.int = TRUE) augment(mod_betamfx) #> # A tibble: 1,000 × 4 #> y x .fitted .cooksd #> #> 1 0.951 0.586 0.809 0.000189 #> 2 0.714 0.709 0.811 0.0000993 #> 3 0.999 -0.109 0.793 0.000273 #> 4 0.998 -0.453 0.785 0.000334 #> 5 0.999 0.606 0.809 0.000342 #> 6 0.562 -1.82 0.751 0.000878 #> 7 0.999 0.630 0.810 0.000348 #> 8 0.999 -0.276 0.789 0.000294 #> 9 0.744 -0.284 0.789 0.0000134 #> 10 0.999 -0.919 0.774 0.000551 #> # ℹ 990 more rows glance(mod_betamfx) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.00726 998 1897. -3787. -3767. 996 1000"},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) betareg object — augment.betareg","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"","code":"# S3 method for class 'betareg' augment( x, data = model.frame(x), newdata = NULL, type.predict, type.residuals, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"x betareg object produced call betareg::betareg(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"additional details Cook's distance, see stats::cooks.distance().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.betareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) betareg object — augment.betareg","text":"","code":"# load libraries for models and data library(betareg) # load dats data(\"GasolineYield\", package = \"betareg\") # fit model mod <- betareg(yield ~ batch + temp, data = GasolineYield) mod #> #> Call: #> betareg(formula = yield ~ batch + temp, data = GasolineYield) #> #> Coefficients (mean model with logit link): #> (Intercept) batch1 batch2 batch3 batch4 #> -6.15957 1.72773 1.32260 1.57231 1.05971 #> batch5 batch6 batch7 batch8 batch9 #> 1.13375 1.04016 0.54369 0.49590 0.38579 #> temp #> 0.01097 #> #> Phi coefficients (precision model with identity link): #> (phi) #> 440.3 #> # summarize model fit with tidiers tidy(mod) #> # A tibble: 12 × 6 #> component term estimate std.error statistic p.value #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 tidy(mod, conf.int = TRUE) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.52 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.53 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.09 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.34 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.859 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.931 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.832 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.330 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.282 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.153 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.0102 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 225. #> # ℹ 1 more variable: conf.high tidy(mod, conf.int = TRUE, conf.level = .99) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.63 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.47 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.02 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.27 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.796 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.867 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.767 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.263 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.215 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.0803 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.00990 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 157. #> # ℹ 1 more variable: conf.high augment(mod) #> # A tibble: 32 × 6 #> yield batch temp .fitted .resid .cooksd #> #> 1 0.122 1 205 0.101 1.41 0.0791 #> 2 0.223 1 275 0.195 1.44 0.0917 #> 3 0.347 1 345 0.343 0.170 0.00155 #> 4 0.457 1 407 0.508 -2.14 0.606 #> 5 0.08 2 218 0.0797 0.0712 0.0000168 #> 6 0.131 2 273 0.137 -0.318 0.00731 #> 7 0.266 2 347 0.263 0.169 0.00523 #> 8 0.074 3 212 0.0943 -1.52 0.0805 #> 9 0.182 3 272 0.167 0.831 0.0441 #> 10 0.304 3 340 0.298 0.304 0.0170 #> # ℹ 22 more rows glance(mod) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.962 30 84.8 -146. -128. 20 32"},{"path":"https://broom.tidymodels.org/dev/reference/augment.clm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) clm object — augment.clm","title":"Augment data with information from a(n) clm object — augment.clm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.clm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) clm object — augment.clm","text":"","code":"# S3 method for class 'clm' augment( x, data = model.frame(x), newdata = NULL, type.predict = c(\"prob\", \"class\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.clm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) clm object — augment.clm","text":"x clm object returned ordinal::clm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict type prediction compute, either \"prob\" \"class\", passed ordinal::predict.clm(). Defaults \"prob\". ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.clm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) clm object — augment.clm","text":"","code":"# load libraries for models and data library(ordinal) #> #> Attaching package: ‘ordinal’ #> The following object is masked from ‘package:dplyr’: #> #> slice # fit model fit <- clm(rating ~ temp * contact, data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 7 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 intercept #> 5 tempwarm 2.32 0.701 3.31 9.28e- 4 location #> 6 contactyes 1.35 0.660 2.04 4.13e- 2 location #> 7 tempwarm:contactyes 0.360 0.924 0.389 6.97e- 1 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 NA NA intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 NA NA intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 NA NA intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 NA NA intercept #> 5 temp… 2.32 0.701 3.31 9.28e- 4 1.20 3.52 location #> 6 cont… 1.35 0.660 2.04 4.13e- 2 0.284 2.47 location #> 7 temp… 0.360 0.924 0.389 6.97e- 1 -1.17 1.89 location tidy(fit, conf.int = TRUE, conf.type = \"Wald\", exponentiate = TRUE) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.244 0.545 -2.59 9.66e- 3 0.0837 0.710 intercept #> 2 2|3 3.14 0.510 2.24 2.48e- 2 1.16 8.52 intercept #> 3 3|4 29.3 0.638 5.29 1.21e- 7 8.38 102. intercept #> 4 4|5 140. 0.751 6.58 4.66e-11 32.1 610. intercept #> 5 temp… 10.2 0.701 3.31 9.28e- 4 2.58 40.2 location #> 6 cont… 3.85 0.660 2.04 4.13e- 2 1.05 14.0 location #> 7 temp… 1.43 0.924 0.389 6.97e- 1 0.234 8.76 location glance(fit) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 7 187. 203. -86.4162 65 72 augment(fit, type.predict = \"prob\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 0.562 #> 2 3 cold no 0.209 #> 3 3 cold yes 0.435 #> 4 4 cold yes 0.0894 #> 5 4 warm no 0.190 #> 6 4 warm no 0.190 #> 7 5 warm yes 0.286 #> 8 5 warm yes 0.286 #> 9 1 cold no 0.196 #> 10 2 cold no 0.562 #> # ℹ 62 more rows augment(fit, type.predict = \"class\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 2 #> 2 3 cold no 2 #> 3 3 cold yes 3 #> 4 4 cold yes 3 #> 5 4 warm no 3 #> 6 4 warm no 3 #> 7 5 warm yes 4 #> 8 5 warm yes 4 #> 9 1 cold no 2 #> 10 2 cold no 2 #> # ℹ 62 more rows # ...and again with another model specification fit2 <- clm(rating ~ temp, nominal = ~contact, data = wine) tidy(fit2) #> # A tibble: 9 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2.(Intercept) -1.32 0.562 -2.35 0.0186 intercept #> 2 2|3.(Intercept) 1.25 0.475 2.63 0.00866 intercept #> 3 3|4.(Intercept) 3.55 0.656 5.41 0.0000000625 intercept #> 4 4|5.(Intercept) 4.66 0.860 5.42 0.0000000608 intercept #> 5 1|2.contactyes -1.62 1.16 -1.39 0.164 intercept #> 6 2|3.contactyes -1.51 0.591 -2.56 0.0105 intercept #> 7 3|4.contactyes -1.67 0.649 -2.58 0.00985 intercept #> 8 4|5.contactyes -1.05 0.897 -1.17 0.241 intercept #> 9 tempwarm 2.52 0.535 4.71 0.00000250 location glance(fit2) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 9 190. 211. -86.20855 63 72"},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) coxph object — augment.coxph","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"","code":"# S3 method for class 'coxph' augment( x, data = model.frame(x), newdata = NULL, type.predict = \"lp\", type.residuals = \"martingale\", ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"x coxph object returned survival::coxph(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"modeling performed na.action = \"na.omit\" (typical default), rows NA initial data omitted entirely augmented data frame. modeling performed na.action = \"na.exclude\", one provide original data second argument, point augmented data contain rows (typically NAs place new columns). original data provided augment() na.action = \"na.exclude\", warning raised incomplete rows dropped.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values. .se.fit Standard errors fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.coxph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) coxph object — augment.coxph","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) # summarize model fit with tidiers tidy(cfit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 0.0170 0.00922 1.85 0.0646 #> 2 sex -0.513 0.167 -3.06 0.00218 tidy(cfit, exponentiate = TRUE) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 1.02 0.00922 1.85 0.0646 #> 2 sex 0.599 0.167 -3.06 0.00218 lp <- augment(cfit, lung) risks <- augment(cfit, lung, type.predict = \"risk\") expected <- augment(cfit, lung, type.predict = \"expected\") glance(cfit) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 228 165 14.1 0.000857 13.7 0.00105 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs # also works on clogit models resp <- levels(logan$occupation) n <- nrow(logan) indx <- rep(1:n, length(resp)) logan2 <- data.frame( logan[indx, ], id = indx, tocc = factor(rep(resp, each = n)) ) logan2$case <- (logan2$occupation == logan2$tocc) cl <- clogit(case ~ tocc + tocc:education + strata(id), logan2) tidy(cl) #> # A tibble: 9 × 5 #> term estimate std.error statistic p.value #> #> 1 toccfarm -1.90 1.38 -1.37 1.70e- 1 #> 2 toccoperatives 1.17 0.566 2.06 3.91e- 2 #> 3 toccprofessional -8.10 0.699 -11.6 4.45e-31 #> 4 toccsales -5.03 0.770 -6.53 6.54e-11 #> 5 tocccraftsmen:education -0.332 0.0569 -5.84 5.13e- 9 #> 6 toccfarm:education -0.370 0.116 -3.18 1.47e- 3 #> 7 toccoperatives:education -0.422 0.0584 -7.23 4.98e-13 #> 8 toccprofessional:education 0.278 0.0510 5.45 4.94e- 8 #> 9 toccsales:education NA 0 NA NA glance(cl) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 4190 838 666. 1.90e-138 682. 5.01e-142 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs library(ggplot2) ggplot(lp, aes(age, .fitted, color = sex)) + geom_point() ggplot(risks, aes(age, .fitted, color = sex)) + geom_point() ggplot(expected, aes(time, .fitted, color = sex)) + geom_point()"},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"","code":"# S3 method for class 'decomposed.ts' augment(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"x decomposed.ts object returned stats::decompose(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"tibble::tibble one row observation original times series: .seasonal seasonal component decomposition. .trend trend component decomposition. .remainder remainder, \"random\" component decomposition. .weight final robust weights (stl ). .seasadj seasonally adjusted (\"deseasonalised\") series.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.decomposed.ts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) decomposed.ts object — augment.decomposed.ts","text":"","code":"# time series of temperatures in Nottingham, 1920-1939: nottem #> Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec #> 1920 40.6 40.8 44.4 46.7 54.1 58.5 57.7 56.4 54.3 50.5 42.9 39.8 #> 1921 44.2 39.8 45.1 47.0 54.1 58.7 66.3 59.9 57.0 54.2 39.7 42.8 #> 1922 37.5 38.7 39.5 42.1 55.7 57.8 56.8 54.3 54.3 47.1 41.8 41.7 #> 1923 41.8 40.1 42.9 45.8 49.2 52.7 64.2 59.6 54.4 49.2 36.3 37.6 #> 1924 39.3 37.5 38.3 45.5 53.2 57.7 60.8 58.2 56.4 49.8 44.4 43.6 #> 1925 40.0 40.5 40.8 45.1 53.8 59.4 63.5 61.0 53.0 50.0 38.1 36.3 #> 1926 39.2 43.4 43.4 48.9 50.6 56.8 62.5 62.0 57.5 46.7 41.6 39.8 #> 1927 39.4 38.5 45.3 47.1 51.7 55.0 60.4 60.5 54.7 50.3 42.3 35.2 #> 1928 40.8 41.1 42.8 47.3 50.9 56.4 62.2 60.5 55.4 50.2 43.0 37.3 #> 1929 34.8 31.3 41.0 43.9 53.1 56.9 62.5 60.3 59.8 49.2 42.9 41.9 #> 1930 41.6 37.1 41.2 46.9 51.2 60.4 60.1 61.6 57.0 50.9 43.0 38.8 #> 1931 37.1 38.4 38.4 46.5 53.5 58.4 60.6 58.2 53.8 46.6 45.5 40.6 #> 1932 42.4 38.4 40.3 44.6 50.9 57.0 62.1 63.5 56.3 47.3 43.6 41.8 #> 1933 36.2 39.3 44.5 48.7 54.2 60.8 65.5 64.9 60.1 50.2 42.1 35.8 #> 1934 39.4 38.2 40.4 46.9 53.4 59.6 66.5 60.4 59.2 51.2 42.8 45.8 #> 1935 40.0 42.6 43.5 47.1 50.0 60.5 64.6 64.0 56.8 48.6 44.2 36.4 #> 1936 37.3 35.0 44.0 43.9 52.7 58.6 60.0 61.1 58.1 49.6 41.6 41.3 #> 1937 40.8 41.0 38.4 47.4 54.1 58.6 61.4 61.8 56.3 50.9 41.4 37.1 #> 1938 42.1 41.2 47.3 46.6 52.4 59.0 59.6 60.4 57.0 50.7 47.8 39.2 #> 1939 39.4 40.9 42.4 47.8 52.4 58.0 60.7 61.8 58.2 46.7 46.6 37.8 # perform seasonal decomposition on the data with both decompose # and stl: d1 <- decompose(nottem) d2 <- stl(nottem, s.window = \"periodic\", robust = TRUE) # compare the original series to its decompositions. cbind( tidy(nottem), augment(d1), augment(d2) ) #> index value .seasonal .trend .remainder .seasadj .seasonal #> 1 1920.000 40.6 -9.3393640 NA NA 49.93936 -9.3419811 #> 2 1920.083 40.8 -9.8998904 NA NA 50.69989 -9.5256227 #> 3 1920.167 44.4 -6.9466009 NA NA 51.34660 -7.0008077 #> 4 1920.250 46.7 -2.7573465 NA NA 49.45735 -2.8175429 #> 5 1920.333 54.1 3.4533991 NA NA 50.64660 3.3639836 #> 6 1920.417 58.5 8.9865132 NA NA 49.51349 9.0952310 #> 7 1920.500 57.7 12.9672149 49.04167 -4.308881579 44.73279 12.8624908 #> 8 1920.583 56.4 11.4591009 49.15000 -4.209100877 44.94090 11.7116742 #> 9 1920.667 54.3 7.4001096 49.13750 -2.237609649 46.89989 7.4288506 #> 10 1920.750 50.5 0.6547149 49.17917 0.666118421 49.84529 0.3474728 #> 11 1920.833 42.9 -6.6176535 49.19167 0.325986842 49.51765 -6.5449727 #> 12 1920.917 39.8 -9.3601974 49.20000 -0.039802632 49.16020 -9.5787757 #> 13 1921.000 44.2 -9.3393640 49.56667 3.972697368 53.53936 -9.3419811 #> 14 1921.083 39.8 -9.8998904 50.07083 -0.370942982 49.69989 -9.5256227 #> 15 1921.167 45.1 -6.9466009 50.32917 1.717434211 52.04660 -7.0008077 #> 16 1921.250 47.0 -2.7573465 50.59583 -0.838486842 49.75735 -2.8175429 #> 17 1921.333 54.1 3.4533991 50.61667 0.029934211 50.64660 3.3639836 #> 18 1921.417 58.7 8.9865132 50.60833 -0.894846491 49.71349 9.0952310 #> 19 1921.500 66.3 12.9672149 50.45417 2.878618421 53.33279 12.8624908 #> 20 1921.583 59.9 11.4591009 50.12917 -1.688267544 48.44090 11.7116742 #> 21 1921.667 57.0 7.4001096 49.85000 -0.250109649 49.59989 7.4288506 #> 22 1921.750 54.2 0.6547149 49.41250 4.132785088 53.54529 0.3474728 #> 23 1921.833 39.7 -6.6176535 49.27500 -2.957346491 46.31765 -6.5449727 #> 24 1921.917 42.8 -9.3601974 49.30417 2.856030702 52.16020 -9.5787757 #> 25 1922.000 37.5 -9.3393640 48.87083 -2.031469298 46.83936 -9.3419811 #> 26 1922.083 38.7 -9.8998904 48.24167 0.358223684 48.59989 -9.5256227 #> 27 1922.167 39.5 -6.9466009 47.89583 -1.449232456 46.44660 -7.0008077 #> 28 1922.250 42.1 -2.7573465 47.48750 -2.630153509 44.85735 -2.8175429 #> 29 1922.333 55.7 3.4533991 47.27917 4.967434211 52.24660 3.3639836 #> 30 1922.417 57.8 8.9865132 47.32083 1.492653509 48.81349 9.0952310 #> 31 1922.500 56.8 12.9672149 47.45417 -3.621381579 43.83279 12.8624908 #> 32 1922.583 54.3 11.4591009 47.69167 -4.850767544 42.84090 11.7116742 #> 33 1922.667 54.3 7.4001096 47.89167 -0.991776316 46.89989 7.4288506 #> 34 1922.750 47.1 0.6547149 48.18750 -1.742214912 46.44529 0.3474728 #> 35 1922.833 41.8 -6.6176535 48.07083 0.346820175 48.41765 -6.5449727 #> 36 1922.917 41.7 -9.3601974 47.58750 3.472697368 51.06020 -9.5787757 #> 37 1923.000 41.8 -9.3393640 47.68333 3.456030702 51.13936 -9.3419811 #> 38 1923.083 40.1 -9.8998904 48.21250 1.787390351 49.99989 -9.5256227 #> 39 1923.167 42.9 -6.9466009 48.43750 1.409100877 49.84660 -7.0008077 #> 40 1923.250 45.8 -2.7573465 48.52917 0.028179825 48.55735 -2.8175429 #> 41 1923.333 49.2 3.4533991 48.38750 -2.640899123 45.74660 3.3639836 #> 42 1923.417 52.7 8.9865132 47.98750 -4.274013158 43.71349 9.0952310 #> 43 1923.500 64.2 12.9672149 47.71250 3.520285088 51.23279 12.8624908 #> 44 1923.583 59.6 11.4591009 47.50000 0.640899123 48.14090 11.7116742 #> 45 1923.667 54.4 7.4001096 47.20000 -0.200109649 46.99989 7.4288506 #> 46 1923.750 49.2 0.6547149 46.99583 1.549451754 48.54529 0.3474728 #> 47 1923.833 36.3 -6.6176535 47.15000 -4.232346491 42.91765 -6.5449727 #> 48 1923.917 37.6 -9.3601974 47.52500 -0.564802632 46.96020 -9.5787757 #> 49 1924.000 39.3 -9.3393640 47.59167 1.047697368 48.63936 -9.3419811 #> 50 1924.083 37.5 -9.8998904 47.39167 0.008223684 47.39989 -9.5256227 #> 51 1924.167 38.3 -6.9466009 47.41667 -2.170065789 45.24660 -7.0008077 #> 52 1924.250 45.5 -2.7573465 47.52500 0.732346491 48.25735 -2.8175429 #> 53 1924.333 53.2 3.4533991 47.88750 1.859100877 49.74660 3.3639836 #> 54 1924.417 57.7 8.9865132 48.47500 0.238486842 48.71349 9.0952310 #> 55 1924.500 60.8 12.9672149 48.75417 -0.921381579 47.83279 12.8624908 #> 56 1924.583 58.2 11.4591009 48.90833 -2.167434211 46.74090 11.7116742 #> 57 1924.667 56.4 7.4001096 49.13750 -0.137609649 48.99989 7.4288506 #> 58 1924.750 49.8 0.6547149 49.22500 -0.079714912 49.14529 0.3474728 #> 59 1924.833 44.4 -6.6176535 49.23333 1.784320175 51.01765 -6.5449727 #> 60 1924.917 43.6 -9.3601974 49.32917 3.631030702 52.96020 -9.5787757 #> 61 1925.000 40.0 -9.3393640 49.51250 -0.173135965 49.33936 -9.3419811 #> 62 1925.083 40.5 -9.8998904 49.74167 0.658223684 50.39989 -9.5256227 #> 63 1925.167 40.8 -6.9466009 49.71667 -1.970065789 47.74660 -7.0008077 #> 64 1925.250 45.1 -2.7573465 49.58333 -1.725986842 47.85735 -2.8175429 #> 65 1925.333 53.8 3.4533991 49.32917 1.017434211 50.34660 3.3639836 #> 66 1925.417 59.4 8.9865132 48.76250 1.650986842 50.41349 9.0952310 #> 67 1925.500 63.5 12.9672149 48.42500 2.107785088 50.53279 12.8624908 #> 68 1925.583 61.0 11.4591009 48.51250 1.028399123 49.54090 11.7116742 #> 69 1925.667 53.0 7.4001096 48.74167 -3.141776316 45.59989 7.4288506 #> 70 1925.750 50.0 0.6547149 49.00833 0.336951754 49.34529 0.3474728 #> 71 1925.833 38.1 -6.6176535 49.03333 -4.315679825 44.71765 -6.5449727 #> 72 1925.917 36.3 -9.3601974 48.79167 -3.131469298 45.66020 -9.5787757 #> 73 1926.000 39.2 -9.3393640 48.64167 -0.102302632 48.53936 -9.3419811 #> 74 1926.083 43.4 -9.8998904 48.64167 4.658223684 53.29989 -9.5256227 #> 75 1926.167 43.4 -6.9466009 48.87083 1.475767544 50.34660 -7.0008077 #> 76 1926.250 48.9 -2.7573465 48.92083 2.736513158 51.65735 -2.8175429 #> 77 1926.333 50.6 3.4533991 48.92917 -1.782565789 47.14660 3.3639836 #> 78 1926.417 56.8 8.9865132 49.22083 -1.407346491 47.81349 9.0952310 #> 79 1926.500 62.5 12.9672149 49.37500 0.157785088 49.53279 12.8624908 #> 80 1926.583 62.0 11.4591009 49.17917 1.361732456 50.54090 11.7116742 #> 81 1926.667 57.5 7.4001096 49.05417 1.045723684 50.09989 7.4288506 #> 82 1926.750 46.7 0.6547149 49.05833 -3.013048246 46.04529 0.3474728 #> 83 1926.833 41.6 -6.6176535 49.02917 -0.811513158 48.21765 -6.5449727 #> 84 1926.917 39.8 -9.3601974 49.00000 0.160197368 49.16020 -9.5787757 #> 85 1927.000 39.4 -9.3393640 48.83750 -0.098135965 48.73936 -9.3419811 #> 86 1927.083 38.5 -9.8998904 48.68750 -0.287609649 48.39989 -9.5256227 #> 87 1927.167 45.3 -6.9466009 48.50833 3.738267544 52.24660 -7.0008077 #> 88 1927.250 47.1 -2.7573465 48.54167 1.315679825 49.85735 -2.8175429 #> 89 1927.333 51.7 3.4533991 48.72083 -0.474232456 48.24660 3.3639836 #> 90 1927.417 55.0 8.9865132 48.55833 -2.544846491 46.01349 9.0952310 #> 91 1927.500 60.4 12.9672149 48.42500 -0.992214912 47.43279 12.8624908 #> 92 1927.583 60.5 11.4591009 48.59167 0.449232456 49.04090 11.7116742 #> 93 1927.667 54.7 7.4001096 48.59583 -1.295942982 47.29989 7.4288506 #> 94 1927.750 50.3 0.6547149 48.50000 1.145285088 49.64529 0.3474728 #> 95 1927.833 42.3 -6.6176535 48.47500 0.442653509 48.91765 -6.5449727 #> 96 1927.917 35.2 -9.3601974 48.50000 -3.939802632 44.56020 -9.5787757 #> 97 1928.000 40.8 -9.3393640 48.63333 1.506030702 50.13936 -9.3419811 #> 98 1928.083 41.1 -9.8998904 48.70833 2.291557018 50.99989 -9.5256227 #> 99 1928.167 42.8 -6.9466009 48.73750 1.009100877 49.74660 -7.0008077 #> 100 1928.250 47.3 -2.7573465 48.76250 1.294846491 50.05735 -2.8175429 #> 101 1928.333 50.9 3.4533991 48.78750 -1.340899123 47.44660 3.3639836 #> 102 1928.417 56.4 8.9865132 48.90417 -1.490679825 47.41349 9.0952310 #> 103 1928.500 62.2 12.9672149 48.74167 0.491118421 49.23279 12.8624908 #> 104 1928.583 60.5 11.4591009 48.08333 0.957565789 49.04090 11.7116742 #> 105 1928.667 55.4 7.4001096 47.60000 0.399890351 47.99989 7.4288506 #> 106 1928.750 50.2 0.6547149 47.38333 2.161951754 49.54529 0.3474728 #> 107 1928.833 43.0 -6.6176535 47.33333 2.284320175 49.61765 -6.5449727 #> 108 1928.917 37.3 -9.3601974 47.44583 -0.785635965 46.66020 -9.5787757 #> 109 1929.000 34.8 -9.3393640 47.47917 -3.339802632 44.13936 -9.3419811 #> 110 1929.083 31.3 -9.8998904 47.48333 -6.283442982 41.19989 -9.5256227 #> 111 1929.167 41.0 -6.9466009 47.65833 0.288267544 47.94660 -7.0008077 #> 112 1929.250 43.9 -2.7573465 47.80000 -1.142653509 46.65735 -2.8175429 #> 113 1929.333 53.1 3.4533991 47.75417 1.892434211 49.64660 3.3639836 #> 114 1929.417 56.9 8.9865132 47.94167 -0.028179825 47.91349 9.0952310 #> 115 1929.500 62.5 12.9672149 48.41667 1.116118421 49.53279 12.8624908 #> 116 1929.583 60.3 11.4591009 48.94167 -0.100767544 48.84090 11.7116742 #> 117 1929.667 59.8 7.4001096 49.19167 3.208223684 52.39989 7.4288506 #> 118 1929.750 49.2 0.6547149 49.32500 -0.779714912 48.54529 0.3474728 #> 119 1929.833 42.9 -6.6176535 49.37083 0.146820175 49.51765 -6.5449727 #> 120 1929.917 41.9 -9.3601974 49.43750 1.822697368 51.26020 -9.5787757 #> 121 1930.000 41.6 -9.3393640 49.48333 1.456030702 50.93936 -9.3419811 #> 122 1930.083 37.1 -9.8998904 49.43750 -2.437609649 46.99989 -9.5256227 #> 123 1930.167 41.2 -6.9466009 49.37500 -1.228399123 48.14660 -7.0008077 #> 124 1930.250 46.9 -2.7573465 49.32917 0.328179825 49.65735 -2.8175429 #> 125 1930.333 51.2 3.4533991 49.40417 -1.657565789 47.74660 3.3639836 #> 126 1930.417 60.4 8.9865132 49.27917 2.134320175 51.41349 9.0952310 #> 127 1930.500 60.1 12.9672149 48.96250 -1.829714912 47.13279 12.8624908 #> 128 1930.583 61.6 11.4591009 48.82917 1.311732456 50.14090 11.7116742 #> 129 1930.667 57.0 7.4001096 48.76667 0.833223684 49.59989 7.4288506 #> 130 1930.750 50.9 0.6547149 48.63333 1.611951754 50.24529 0.3474728 #> 131 1930.833 43.0 -6.6176535 48.71250 0.905153509 49.61765 -6.5449727 #> 132 1930.917 38.8 -9.3601974 48.72500 -0.564802632 48.16020 -9.5787757 #> 133 1931.000 37.1 -9.3393640 48.66250 -2.223135965 46.43936 -9.3419811 #> 134 1931.083 38.4 -9.8998904 48.54167 -0.241776316 48.29989 -9.5256227 #> 135 1931.167 38.4 -6.9466009 48.26667 -2.920065789 45.34660 -7.0008077 #> 136 1931.250 46.5 -2.7573465 47.95417 1.303179825 49.25735 -2.8175429 #> 137 1931.333 53.5 3.4533991 47.87917 2.167434211 50.04660 3.3639836 #> 138 1931.417 58.4 8.9865132 48.05833 1.355153509 49.41349 9.0952310 #> 139 1931.500 60.6 12.9672149 48.35417 -0.721381579 47.63279 12.8624908 #> 140 1931.583 58.2 11.4591009 48.57500 -1.834100877 46.74090 11.7116742 #> 141 1931.667 53.8 7.4001096 48.65417 -2.254276316 46.39989 7.4288506 #> 142 1931.750 46.6 0.6547149 48.65417 -2.708881579 45.94529 0.3474728 #> 143 1931.833 45.5 -6.6176535 48.46667 3.650986842 52.11765 -6.5449727 #> 144 1931.917 40.6 -9.3601974 48.30000 1.660197368 49.96020 -9.5787757 #> 145 1932.000 42.4 -9.3393640 48.30417 3.435197368 51.73936 -9.3419811 #> 146 1932.083 38.4 -9.8998904 48.58750 -0.287609649 48.29989 -9.5256227 #> 147 1932.167 40.3 -6.9466009 48.91250 -1.665899123 47.24660 -7.0008077 #> 148 1932.250 44.6 -2.7573465 49.04583 -1.688486842 47.35735 -2.8175429 #> 149 1932.333 50.9 3.4533991 48.99583 -1.549232456 47.44660 3.3639836 #> 150 1932.417 57.0 8.9865132 48.96667 -0.953179825 48.01349 9.0952310 #> 151 1932.500 62.1 12.9672149 48.75833 0.374451754 49.13279 12.8624908 #> 152 1932.583 63.5 11.4591009 48.53750 3.503399123 52.04090 11.7116742 #> 153 1932.667 56.3 7.4001096 48.75000 0.149890351 48.89989 7.4288506 #> 154 1932.750 47.3 0.6547149 49.09583 -2.450548246 46.64529 0.3474728 #> 155 1932.833 43.6 -6.6176535 49.40417 0.813486842 50.21765 -6.5449727 #> 156 1932.917 41.8 -9.3601974 49.70000 1.460197368 51.16020 -9.5787757 #> 157 1933.000 36.2 -9.3393640 50.00000 -4.460635965 45.53936 -9.3419811 #> 158 1933.083 39.3 -9.8998904 50.20000 -1.000109649 49.19989 -9.5256227 #> 159 1933.167 44.5 -6.9466009 50.41667 1.029934211 51.44660 -7.0008077 #> 160 1933.250 48.7 -2.7573465 50.69583 0.761513158 51.45735 -2.8175429 #> 161 1933.333 54.2 3.4533991 50.75417 -0.007565789 50.74660 3.3639836 #> 162 1933.417 60.8 8.9865132 50.44167 1.371820175 51.81349 9.0952310 #> 163 1933.500 65.5 12.9672149 50.32500 2.207785088 52.53279 12.8624908 #> 164 1933.583 64.9 11.4591009 50.41250 3.028399123 53.44090 11.7116742 #> 165 1933.667 60.1 7.4001096 50.19583 2.504057018 52.69989 7.4288506 #> 166 1933.750 50.2 0.6547149 49.95000 -0.404714912 49.54529 0.3474728 #> 167 1933.833 42.1 -6.6176535 49.84167 -1.124013158 48.71765 -6.5449727 #> 168 1933.917 35.8 -9.3601974 49.75833 -4.598135965 45.16020 -9.5787757 #> 169 1934.000 39.4 -9.3393640 49.75000 -1.010635965 48.73936 -9.3419811 #> 170 1934.083 38.2 -9.8998904 49.60417 -1.504276316 48.09989 -9.5256227 #> 171 1934.167 40.4 -6.9466009 49.37917 -2.032565789 47.34660 -7.0008077 #> 172 1934.250 46.9 -2.7573465 49.38333 0.274013158 49.65735 -2.8175429 #> 173 1934.333 53.4 3.4533991 49.45417 0.492434211 49.94660 3.3639836 #> 174 1934.417 59.6 8.9865132 49.90000 0.713486842 50.61349 9.0952310 #> 175 1934.500 66.5 12.9672149 50.34167 3.191118421 53.53279 12.8624908 #> 176 1934.583 60.4 11.4591009 50.55000 -1.609100877 48.94090 11.7116742 #> 177 1934.667 59.2 7.4001096 50.86250 0.937390351 51.79989 7.4288506 #> 178 1934.750 51.2 0.6547149 51.00000 -0.454714912 50.54529 0.3474728 #> 179 1934.833 42.8 -6.6176535 50.86667 -1.449013158 49.41765 -6.5449727 #> 180 1934.917 45.8 -9.3601974 50.76250 4.397697368 55.16020 -9.5787757 #> 181 1935.000 40.0 -9.3393640 50.72083 -1.381469298 49.33936 -9.3419811 #> 182 1935.083 42.6 -9.8998904 50.79167 1.708223684 52.49989 -9.5256227 #> 183 1935.167 43.5 -6.9466009 50.84167 -0.395065789 50.44660 -7.0008077 #> 184 1935.250 47.1 -2.7573465 50.63333 -0.775986842 49.85735 -2.8175429 #> 185 1935.333 50.0 3.4533991 50.58333 -4.036732456 46.54660 3.3639836 #> 186 1935.417 60.5 8.9865132 50.25000 1.263486842 51.51349 9.0952310 #> 187 1935.500 64.6 12.9672149 49.74583 1.886951754 51.63279 12.8624908 #> 188 1935.583 64.0 11.4591009 49.31667 3.224232456 52.54090 11.7116742 #> 189 1935.667 56.8 7.4001096 49.02083 0.379057018 49.39989 7.4288506 #> 190 1935.750 48.6 0.6547149 48.90833 -0.963048246 47.94529 0.3474728 #> 191 1935.833 44.2 -6.6176535 48.88750 1.930153509 50.81765 -6.5449727 #> 192 1935.917 36.4 -9.3601974 48.92083 -3.160635965 45.76020 -9.5787757 #> 193 1936.000 37.3 -9.3393640 48.65000 -2.010635965 46.63936 -9.3419811 #> 194 1936.083 35.0 -9.8998904 48.33750 -3.437609649 44.89989 -9.5256227 #> 195 1936.167 44.0 -6.9466009 48.27083 2.675767544 50.94660 -7.0008077 #> 196 1936.250 43.9 -2.7573465 48.36667 -1.709320175 46.65735 -2.8175429 #> 197 1936.333 52.7 3.4533991 48.30000 0.946600877 49.24660 3.3639836 #> 198 1936.417 58.6 8.9865132 48.39583 1.217653509 49.61349 9.0952310 #> 199 1936.500 60.0 12.9672149 48.74583 -1.713048246 47.03279 12.8624908 #> 200 1936.583 61.1 11.4591009 49.14167 0.499232456 49.64090 11.7116742 #> 201 1936.667 58.1 7.4001096 49.15833 1.541557018 50.69989 7.4288506 #> 202 1936.750 49.6 0.6547149 49.07083 -0.125548246 48.94529 0.3474728 #> 203 1936.833 41.6 -6.6176535 49.27500 -1.057346491 48.21765 -6.5449727 #> 204 1936.917 41.3 -9.3601974 49.33333 1.326864035 50.66020 -9.5787757 #> 205 1937.000 40.8 -9.3393640 49.39167 0.747697368 50.13936 -9.3419811 #> 206 1937.083 41.0 -9.8998904 49.47917 1.420723684 50.89989 -9.5256227 #> 207 1937.167 38.4 -6.9466009 49.43333 -4.086732456 45.34660 -7.0008077 #> 208 1937.250 47.4 -2.7573465 49.41250 0.744846491 50.15735 -2.8175429 #> 209 1937.333 54.1 3.4533991 49.45833 1.188267544 50.64660 3.3639836 #> 210 1937.417 58.6 8.9865132 49.27500 0.338486842 49.61349 9.0952310 #> 211 1937.500 61.4 12.9672149 49.15417 -0.721381579 48.43279 12.8624908 #> 212 1937.583 61.8 11.4591009 49.21667 1.124232456 50.34090 11.7116742 #> 213 1937.667 56.3 7.4001096 49.59583 -0.695942982 48.89989 7.4288506 #> 214 1937.750 50.9 0.6547149 49.93333 0.311951754 50.24529 0.3474728 #> 215 1937.833 41.4 -6.6176535 49.82917 -1.811513158 48.01765 -6.5449727 #> 216 1937.917 37.1 -9.3601974 49.77500 -3.314802632 46.46020 -9.5787757 #> 217 1938.000 42.1 -9.3393640 49.71667 1.722697368 51.43936 -9.3419811 #> 218 1938.083 41.2 -9.8998904 49.58333 1.516557018 51.09989 -9.5256227 #> 219 1938.167 47.3 -6.9466009 49.55417 4.692434211 54.24660 -7.0008077 #> 220 1938.250 46.6 -2.7573465 49.57500 -0.217653509 49.35735 -2.8175429 #> 221 1938.333 52.4 3.4533991 49.83333 -0.886732456 48.94660 3.3639836 #> 222 1938.417 59.0 8.9865132 50.18750 -0.174013158 50.01349 9.0952310 #> 223 1938.500 59.6 12.9672149 50.16250 -3.529714912 46.63279 12.8624908 #> 224 1938.583 60.4 11.4591009 50.03750 -1.096600877 48.94090 11.7116742 #> 225 1938.667 57.0 7.4001096 49.82083 -0.220942982 49.59989 7.4288506 #> 226 1938.750 50.7 0.6547149 49.66667 0.378618421 50.04529 0.3474728 #> 227 1938.833 47.8 -6.6176535 49.71667 4.700986842 54.41765 -6.5449727 #> 228 1938.917 39.2 -9.3601974 49.67500 -1.114802632 48.56020 -9.5787757 #> 229 1939.000 39.4 -9.3393640 49.67917 -0.939802632 48.73936 -9.3419811 #> 230 1939.083 40.9 -9.8998904 49.78333 1.016557018 50.79989 -9.5256227 #> 231 1939.167 42.4 -6.9466009 49.89167 -0.545065789 49.34660 -7.0008077 #> 232 1939.250 47.8 -2.7573465 49.77500 0.782346491 50.55735 -2.8175429 #> 233 1939.333 52.4 3.4533991 49.55833 -0.611732456 48.94660 3.3639836 #> 234 1939.417 58.0 8.9865132 49.45000 -0.436513158 49.01349 9.0952310 #> 235 1939.500 60.7 12.9672149 NA NA 47.73279 12.8624908 #> 236 1939.583 61.8 11.4591009 NA NA 50.34090 11.7116742 #> 237 1939.667 58.2 7.4001096 NA NA 50.79989 7.4288506 #> 238 1939.750 46.7 0.6547149 NA NA 46.04529 0.3474728 #> 239 1939.833 46.6 -6.6176535 NA NA 53.21765 -6.5449727 #> 240 1939.917 37.8 -9.3601974 NA NA 47.16020 -9.5787757 #> .trend .remainder .weight .seasadj #> 1 50.01420 -0.07222032 0.9998117442 49.94198 #> 2 49.92165 0.40397500 0.9941070247 50.32562 #> 3 49.82909 1.57171369 0.9126802010 51.40081 #> 4 49.76684 -0.24930092 0.9977553984 49.51754 #> 5 49.70459 1.03142281 0.9619042613 50.73602 #> 6 49.66925 -0.26447916 0.9974748211 49.40477 #> 7 49.63390 -4.79639351 0.3412380823 44.83751 #> 8 49.59154 -4.90321001 0.3197191080 44.68833 #> 9 49.54917 -2.67801942 0.7575428238 46.87115 #> 10 49.53142 0.62110779 0.9860987725 50.15253 #> 11 49.51367 -0.06869727 0.9998295734 49.44497 #> 12 49.67527 -0.29648970 0.9968240120 49.37878 #> 13 49.83686 3.70512025 0.5652530794 53.54198 #> 14 50.01995 -0.69432647 0.9826486724 49.32562 #> 15 50.20304 1.89777018 0.8740330207 52.10081 #> 16 50.21930 -0.40175826 0.9941717811 49.81754 #> 17 50.23556 0.50045164 0.9909689604 50.73602 #> 18 50.08369 -0.47892462 0.9917222061 49.60477 #> 19 49.93182 3.50568674 0.6050590645 53.43751 #> 20 49.64468 -1.45635323 0.9247811015 48.18833 #> 21 49.35754 0.21361388 0.9983531664 49.57115 #> 22 49.04307 4.80945774 0.3386139271 53.85253 #> 23 48.72860 -2.48363068 0.7893864291 46.24497 #> 24 48.41063 3.96814679 0.5117966525 52.37878 #> 25 48.09265 -1.25067337 0.9442359375 46.84198 #> 26 47.78527 0.44034827 0.9930065146 48.22562 #> 27 47.47789 -0.97708673 0.9657717152 46.50081 #> 28 47.32123 -2.40368684 0.8020068621 44.91754 #> 29 47.16456 5.17145139 0.2668499980 52.33602 #> 30 47.25341 1.45135602 0.9252972241 48.70477 #> 31 47.34226 -3.40475173 0.6248069424 43.93751 #> 32 47.54890 -4.96057839 0.3082343237 42.58833 #> 33 47.75555 -0.88439797 0.9719230049 46.87115 #> 34 47.94715 -1.19461825 0.9490683389 46.75253 #> 35 48.13874 0.20622919 0.9984634649 48.34497 #> 36 48.29300 2.98577154 0.7036777265 51.27878 #> 37 48.44726 2.69471628 0.7546879672 51.14198 #> 38 48.54072 1.08490473 0.9578945067 49.62562 #> 39 48.63417 1.26663654 0.9428345049 49.90081 #> 40 48.56948 0.04806673 0.9999163166 48.61754 #> 41 48.50478 -2.66876475 0.7590860969 45.83602 #> 42 48.29876 -4.69399240 0.3620667289 43.60477 #> 43 48.09274 3.24476757 0.6555667956 51.33751 #> 44 47.88957 -0.00124428 1.0000000000 47.88833 #> 45 47.68640 -0.71524905 0.9815940273 46.97115 #> 46 47.63720 1.21532552 0.9473121845 48.85253 #> 47 47.58800 -4.74303219 0.3520504143 42.84497 #> 48 47.62960 -0.45082633 0.9926638286 47.17878 #> 49 47.67120 0.97078191 0.9662141749 48.64198 #> 50 47.71188 -0.68625939 0.9830480211 47.02562 #> 51 47.75257 -2.45175731 0.7944868364 45.30081 #> 52 47.91295 0.40459740 0.9940901051 48.31754 #> 53 48.07333 1.76269045 0.8908237990 49.83602 #> 54 48.34262 0.26214603 0.9975164909 48.60477 #> 55 48.61192 -0.67441076 0.9836242049 47.93751 #> 56 48.81156 -2.32323163 0.8143918072 46.48833 #> 57 49.01119 -0.04004542 0.9999420200 48.97115 #> 58 49.12549 0.32703709 0.9961383276 49.45253 #> 59 49.23979 1.70518732 0.8976499774 50.94497 #> 60 49.35392 3.82485679 0.5410514810 53.17878 #> 61 49.46805 -0.12607135 0.9994255569 49.34198 #> 62 49.52972 0.49590417 0.9911290425 50.02562 #> 63 49.59138 -1.79057694 0.8874418517 47.80081 #> 64 49.45273 -1.53518313 0.9166077211 47.91754 #> 65 49.31407 1.12194902 0.9550103719 50.43602 #> 66 49.10862 1.19614862 0.9489389693 50.30477 #> 67 48.90317 1.73433583 0.8942072882 50.63751 #> 68 48.89233 0.39599547 0.9943367859 49.28833 #> 69 48.88149 -3.31033782 0.6430636675 45.57115 #> 70 48.91397 0.73855880 0.9803781333 49.65253 #> 71 48.94645 -4.30147685 0.4429222034 44.64497 #> 72 48.90282 -3.02404619 0.6966932090 45.87878 #> 73 48.85919 -0.31721315 0.9963661650 48.54198 #> 74 48.89413 4.03149740 0.4987159288 52.92562 #> 75 48.92906 1.47175131 0.9232248776 50.40081 #> 76 49.03010 2.68744640 0.7559341735 51.71754 #> 77 49.13114 -1.89512018 0.8743670152 47.23602 #> 78 49.14031 -1.43554225 0.9268852631 47.70477 #> 79 49.14949 0.48802331 0.9914078255 49.63751 #> 80 49.07881 1.20951191 0.9478052716 50.28833 #> 81 49.00814 1.06300760 0.9595633931 50.07115 #> 82 48.97150 -2.61897582 0.7673895643 46.35253 #> 83 48.93486 -0.78989152 0.9775667489 48.14497 #> 84 48.86818 0.51059666 0.9906000832 49.37878 #> 85 48.80149 -0.05951278 0.9998720920 48.74198 #> 86 48.70096 -0.67533648 0.9835797380 48.02562 #> 87 48.60042 3.70038320 0.5662269876 52.30081 #> 88 48.56807 1.34947559 0.9352460403 49.91754 #> 89 48.53571 -0.19969368 0.9985585123 48.33602 #> 90 48.52398 -2.61921491 0.7673600584 45.90477 #> 91 48.51226 -0.97474852 0.9659450343 47.53751 #> 92 48.54413 0.24419096 0.9978443356 48.78833 #> 93 48.57601 -1.30486248 0.9393918863 47.27115 #> 94 48.64185 1.31067824 0.9388599059 49.95253 #> 95 48.70769 0.13728668 0.9993192008 48.84497 #> 96 48.78245 -4.00367641 0.5044250461 44.77878 #> 97 48.85722 1.28476289 0.9412111825 50.14198 #> 98 48.89771 1.72791339 0.8949676412 50.62562 #> 99 48.93820 0.86260727 0.9732797776 49.80081 #> 100 48.94613 1.17141777 0.9510048139 50.11754 #> 101 48.95405 -1.41803340 0.9286221314 47.53602 #> 102 48.84896 -1.54418747 0.9156534095 47.30477 #> 103 48.74386 0.59364608 0.9872985476 49.33751 #> 104 48.54573 0.24259718 0.9978720183 48.78833 #> 105 48.34759 -0.37644464 0.9948844472 47.97115 #> 106 48.24623 1.60629421 0.9088932779 49.85253 #> 107 48.14487 1.40010078 0.9303867756 49.54497 #> 108 48.15934 -1.28056361 0.9415880523 46.87878 #> 109 48.17381 -4.03182561 0.4986653502 44.14198 #> 110 48.21910 -7.39348007 0.0001410611 40.82562 #> 111 48.26440 -0.26359115 0.9974900911 48.00081 #> 112 48.35951 -1.64196854 0.9049062600 46.71754 #> 113 48.45462 1.28139240 0.9415175359 49.73602 #> 114 48.67785 -0.87308338 0.9726337710 47.80477 #> 115 48.90108 0.73642845 0.9804880657 49.63751 #> 116 49.09419 -0.50586696 0.9907719650 48.58833 #> 117 49.28730 3.08384471 0.6857277896 52.37115 #> 118 49.34557 -0.49304083 0.9912296487 48.85253 #> 119 49.40383 0.04114136 0.9999389708 49.44497 #> 120 49.40282 2.07595514 0.8502744159 51.47878 #> 121 49.40181 1.54017131 0.9160740197 50.94198 #> 122 49.37361 -2.74798299 0.7456279645 46.62562 #> 123 49.34540 -1.14459392 0.9531961859 48.20081 #> 124 49.30543 0.41211746 0.9938690055 49.71754 #> 125 49.26545 -1.42943281 0.9274919729 47.83602 #> 126 49.18880 2.11597148 0.8446745881 51.30477 #> 127 49.11215 -1.87463661 0.8769857050 47.23751 #> 128 49.00675 0.88157510 0.9720955921 49.88833 #> 129 48.90136 0.66979390 0.9838451572 49.57115 #> 130 48.83104 1.72148929 0.8957307927 50.55253 #> 131 48.76072 0.78425241 0.9778898297 49.54497 #> 132 48.68865 -0.30987458 0.9965298006 48.37878 #> 133 48.61658 -2.17459917 0.8363490822 46.44198 #> 134 48.45541 -0.52979050 0.9898793425 47.92562 #> 135 48.29425 -2.89343846 0.7202274168 45.40081 #> 136 48.16174 1.15580354 0.9522865331 49.31754 #> 137 48.02923 2.10678389 0.8459719861 50.13602 #> 138 48.11025 1.19451432 0.9490780631 49.30477 #> 139 48.19128 -0.45376763 0.9925693662 47.73751 #> 140 48.28599 -1.79766513 0.8865827207 46.48833 #> 141 48.38070 -2.00955555 0.8593276261 46.37115 #> 142 48.33674 -2.08421321 0.8491078381 46.25253 #> 143 48.29278 3.75219686 0.5557873995 52.04497 #> 144 48.28919 1.88958246 0.8750956552 50.17878 #> 145 48.28561 3.45637045 0.6147301243 51.74198 #> 146 48.41723 -0.49161070 0.9912807969 47.92562 #> 147 48.54886 -1.24804849 0.9444757336 47.30081 #> 148 48.62483 -1.20728397 0.9479970261 47.41754 #> 149 48.70080 -1.16478111 0.9515491014 47.53602 #> 150 48.72498 -0.82021192 0.9758272720 47.90477 #> 151 48.74916 0.48834488 0.9913958496 49.23751 #> 152 48.90068 2.88764978 0.7212401964 51.78833 #> 153 49.05219 -0.18103825 0.9988160917 48.87115 #> 154 49.30960 -2.35707551 0.8092259009 46.95253 #> 155 49.56702 0.57795496 0.9879606342 50.14497 #> 156 49.83909 1.53968834 0.9161343536 51.37878 #> 157 50.11116 -4.56917590 0.3876547579 45.54198 #> 158 50.36702 -1.54139691 0.9159538098 48.82562 #> 159 50.62288 0.87792544 0.9723268320 51.50081 #> 160 50.78526 0.73228255 0.9807054171 51.51754 #> 161 50.94764 -0.11162200 0.9995497433 50.83602 #> 162 50.89302 0.81174825 0.9763159822 51.70477 #> 163 50.83840 1.79910611 0.8863986646 52.63751 #> 164 50.61542 2.57290085 0.7749790813 53.18833 #> 165 50.39245 2.27870268 0.8210810117 52.67115 #> 166 50.16815 -0.31561873 0.9964011804 49.85253 #> 167 49.94385 -1.29887241 0.9399319885 48.64497 #> 168 49.76381 -4.38503285 0.4256237643 45.37878 #> 169 49.58377 -0.84179092 0.9745475926 48.74198 #> 170 49.49997 -1.77435174 0.8894181190 47.72562 #> 171 49.41618 -2.01536920 0.8585443585 47.40081 #> 172 49.51935 0.19819417 0.9985805427 49.71754 #> 173 49.62252 0.41349587 0.9938289408 50.03602 #> 174 49.86562 0.63914438 0.9852855184 50.50477 #> 175 50.10873 3.52878051 0.6004799186 53.63751 #> 176 50.30759 -1.61926856 0.9074527330 48.68833 #> 177 50.50646 1.26468946 0.9430139300 51.77115 #> 178 50.56288 0.28964243 0.9969710616 50.85253 #> 179 50.61931 -1.27433689 0.9421411984 49.34497 #> 180 50.60801 4.77076099 0.3464437038 55.37878 #> 181 50.59672 -1.25473874 0.9438903719 49.34198 #> 182 50.58026 1.54536684 0.9155261150 52.12562 #> 183 50.56379 -0.06298420 0.9998563787 50.50081 #> 184 50.48101 -0.56347034 0.9885529916 49.91754 #> 185 50.39823 -3.76221813 0.5537331235 46.63602 #> 186 50.17364 1.23113289 0.9459516122 51.40477 #> 187 49.94904 1.78847153 0.8876995218 51.73751 #> 188 49.67770 2.61062346 0.7687682152 52.28833 #> 189 49.40637 -0.03521753 0.9999552490 49.37115 #> 190 49.20639 -0.95386492 0.9673753542 48.25253 #> 191 49.00642 1.73855541 0.8937126444 50.74497 #> 192 48.83367 -2.85489600 0.7270306698 45.97878 #> 193 48.66093 -2.01894503 0.8580717515 46.64198 #> 194 48.54482 -4.01919856 0.5012586635 44.52562 #> 195 48.42872 2.57209128 0.7751200799 51.00081 #> 196 48.46736 -1.74981759 0.8923691510 46.71754 #> 197 48.50600 0.83001189 0.9752479203 49.33602 #> 198 48.68877 0.81599782 0.9760694451 49.50477 #> 199 48.87154 -1.73402862 0.8942494353 47.13751 #> 200 49.06001 0.32831580 0.9961051216 49.38833 #> 201 49.24848 1.42266730 0.9281619459 50.67115 #> 202 49.36046 -0.10793320 0.9995787408 49.25253 #> 203 49.47244 -1.32746597 0.9373027598 48.14497 #> 204 49.53805 1.34072499 0.9360748588 50.87878 #> 205 49.60366 0.53831833 0.9895484886 50.14198 #> 206 49.62887 0.89674911 0.9711359461 50.52562 #> 207 49.65408 -4.25327673 0.4529118759 45.40081 #> 208 49.61740 0.60014021 0.9870205102 50.21754 #> 209 49.58072 1.15529549 0.9523277817 50.73602 #> 210 49.53425 -0.02948220 0.9999686594 49.50477 #> 211 49.48778 -0.95027228 0.9676207494 48.53751 #> 212 49.50857 0.57975352 0.9878829547 50.08833 #> 213 49.52936 -0.65821360 0.9843982323 48.87115 #> 214 49.57767 0.97485321 0.9659406952 50.55253 #> 215 49.62598 -1.68101226 0.9004371545 47.94497 #> 216 49.59498 -2.91620283 0.7161544741 46.67878 #> 217 49.56397 1.87800899 0.8765541165 51.44198 #> 218 49.53556 1.19006148 0.9494547021 50.72562 #> 219 49.50715 4.79365735 0.3417807348 54.30081 #> 220 49.53811 -0.12056488 0.9994741681 49.41754 #> 221 49.56907 -0.53304877 0.9897514479 49.03602 #> 222 49.57742 0.32735314 0.9961300420 49.90477 #> 223 49.58577 -2.84825734 0.7282020458 46.73751 #> 224 49.53627 -0.84794729 0.9741745765 48.68833 #> 225 49.48678 0.08436985 0.9997428525 49.57115 #> 226 49.48966 0.86286796 0.9732679392 50.35253 #> 227 49.49254 4.85243380 0.3299127676 54.34497 #> 228 49.51944 -0.74066544 0.9802586379 48.77878 #> 229 49.54634 -0.80436230 0.9767456685 48.74198 #> 230 49.54330 0.88232445 0.9720537415 50.42562 #> 231 49.54025 -0.13944543 0.9992967282 49.40081 #> 232 49.46247 1.15507606 0.9523490606 50.61754 #> 233 49.38468 -0.34866410 0.9956083428 49.03602 #> 234 49.28384 -0.37907304 0.9948109879 48.90477 #> 235 49.18300 -1.34549436 0.9356161725 47.83751 #> 236 49.07716 1.01116267 0.9633774008 50.08833 #> 237 48.97132 1.79982679 0.8863220646 50.77115 #> 238 48.86598 -2.51344847 0.7846257080 46.35253 #> 239 48.76063 4.38434399 0.4258156270 53.14497 #> 240 48.65426 -1.27547980 0.9420313503 47.37878 # visually compare seasonal decompositions in tidy data frames. library(tibble) library(dplyr) library(tidyr) library(ggplot2) decomps <- tibble( # turn the ts objects into data frames. series = list(as.data.frame(nottem), as.data.frame(nottem)), # add the models in, one for each row. decomp = c(\"decompose\", \"stl\"), model = list(d1, d2) ) %>% rowwise() %>% # pull out the fitted data using broom::augment. mutate(augment = list(broom::augment(model))) %>% ungroup() %>% # unnest the data frames into a tidy arrangement of # the series next to its seasonal decomposition, grouped # by the method (stl or decompose). group_by(decomp) %>% unnest(c(series, augment)) %>% mutate(index = 1:n()) %>% ungroup() %>% select(decomp, index, x, adjusted = .seasadj) #> Error in select(., decomp, index, x, adjusted = .seasadj): unused arguments (decomp, index, x, adjusted = .seasadj) ggplot(decomps) + geom_line(aes(x = index, y = x), colour = \"black\") + geom_line(aes( x = index, y = adjusted, colour = decomp, group = decomp )) #> Error: object 'decomps' not found"},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) drc object — augment.drc","title":"Augment data with information from a(n) drc object — augment.drc","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) drc object — augment.drc","text":"","code":"# S3 method for class 'drc' augment( x, data = NULL, newdata = NULL, se_fit = FALSE, conf.int = FALSE, conf.level = 0.95, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) drc object — augment.drc","text":"x drc object produced call drc::drm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) drc object — augment.drc","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .lower Lower bound interval fitted values. .resid difference observed fitted values. .se.fit Standard errors fitted values. .upper Upper bound interval fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.drc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) drc object — augment.drc","text":"","code":"# load libraries for models and data library(drc) #> #> 'drc' has been loaded. #> Please cite R and 'drc' if used for a publication, #> for references type 'citation()' and 'citation('drc')'. #> #> Attaching package: ‘drc’ #> The following objects are masked from ‘package:stats’: #> #> gaussian, getInitial # fit model mod <- drm(dead / total ~ conc, type, weights = total, data = selenium, fct = LL.2(), type = \"binomial\" ) # summarize model fit with tidiers tidy(mod) #> # A tibble: 8 × 6 #> term curve estimate std.error statistic p.value #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 #> 5 e 1 252. 13.8 18.2 1.16e-74 #> 6 e 2 378. 39.4 9.61 3.53e-22 #> 7 e 3 120. 5.91 20.3 1.14e-91 #> 8 e 4 88.8 8.62 10.3 3.28e-25 tidy(mod, conf.int = TRUE) #> # A tibble: 8 × 8 #> term curve estimate std.error statistic p.value conf.low conf.high #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 -1.81 -1.20 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 -1.12 -0.571 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 -2.43 -1.89 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 -1.78 -1.12 #> 5 e 1 252. 13.8 18.2 1.16e-74 225. 279. #> 6 e 2 378. 39.4 9.61 3.53e-22 301. 456. #> 7 e 3 120. 5.91 20.3 1.14e-91 108. 131. #> 8 e 4 88.8 8.62 10.3 3.28e-25 71.9 106. glance(mod) #> # A tibble: 1 × 4 #> AIC BIC logLik df.residual #> #> 1 768. 778. -376.2099 17 augment(mod, selenium) #> # A tibble: 25 × 7 #> type conc total dead .fitted .resid .cooksd #> #> 1 1 0 151 3 0 0.0199 0 #> 2 1 100 146 40 0.199 0.0748 0.0000909 #> 3 1 200 116 31 0.414 -0.146 0.000104 #> 4 1 300 159 85 0.565 -0.0302 0.00000516 #> 5 1 400 150 102 0.667 0.0133 0.00000220 #> 6 1 500 140 112 0.737 0.0633 0.0000720 #> 7 2 0 141 2 0 0.0142 0 #> 8 2 100 153 30 0.246 -0.0495 0.000168 #> 9 2 200 142 59 0.369 0.0468 0.0000347 #> 10 2 300 139 82 0.451 0.139 0.0000430 #> # ℹ 15 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/augment.factanal.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) factanal object — augment.factanal","title":"Augment data with information from a(n) factanal object — augment.factanal","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.factanal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) factanal object — augment.factanal","text":"","code":"# S3 method for class 'factanal' augment(x, data, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.factanal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) factanal object — augment.factanal","text":"x factanal object created stats::factanal(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.factanal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) factanal object — augment.factanal","text":"data supplied augment.factanal returns one row observation, factor score column added factor X, (.fsX). stats::factanal(), unlike stats methods like stats::lm(), retain original data. data supplied, augment.factanal returns one row observation, factor score column added factor X, (.fsX).","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) felm object — augment.felm","title":"Augment data with information from a(n) felm object — augment.felm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) felm object — augment.felm","text":"","code":"# S3 method for class 'felm' augment(x, data = model.frame(x), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) felm object — augment.felm","text":"x felm object returned lfe::felm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) felm object — augment.felm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.felm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) felm object — augment.felm","text":"","code":"# load libraries for models and data library(lfe) #> Loading required package: Matrix #> #> Attaching package: ‘Matrix’ #> The following objects are masked from ‘package:tidyr’: #> #> expand, pack, unpack #> #> Attaching package: ‘lfe’ #> The following object is masked from ‘package:lmtest’: #> #> waldtest # use built-in `airquality` dataset head(airquality) #> Ozone Solar.R Wind Temp Month Day #> 1 41 190 7.4 67 5 1 #> 2 36 118 8.0 72 5 2 #> 3 12 149 12.6 74 5 3 #> 4 18 313 11.5 62 5 4 #> 5 NA NA 14.3 56 5 5 #> 6 28 NA 14.9 66 5 6 # no FEs; same as lm() est0 <- felm(Ozone ~ Temp + Wind + Solar.R, airquality) # summarize model fit with tidiers tidy(est0) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -64.3 23.1 -2.79 0.00623 #> 2 Temp 1.65 0.254 6.52 0.00000000242 #> 3 Wind -3.33 0.654 -5.09 0.00000152 #> 4 Solar.R 0.0598 0.0232 2.58 0.0112 augment(est0) #> # A tibble: 111 × 7 #> .rownames Ozone Temp Wind Solar.R .fitted .resid #> #> 1 1 41 67 7.4 190 33.0 7.95 #> 2 2 36 72 8 118 35.0 1.00 #> 3 3 12 74 12.6 149 24.8 -12.8 #> 4 4 18 62 11.5 313 18.5 -0.475 #> 5 7 23 65 8.6 299 32.3 -9.26 #> 6 8 19 59 13.8 99 -6.95 25.9 #> 7 9 8 61 20.1 19 -29.4 37.4 #> 8 12 16 69 9.7 256 32.6 -16.6 #> 9 13 11 66 9.2 290 31.4 -20.4 #> 10 14 14 68 10.9 274 28.1 -14.1 #> # ℹ 101 more rows # add month fixed effects est1 <- felm(Ozone ~ Temp + Wind + Solar.R | Month, airquality) # summarize model fit with tidiers tidy(est1) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, fe = TRUE) #> # A tibble: 8 × 7 #> term estimate std.error statistic p.value N comp #> #> 1 Temp 1.88 0.341 5.50 0.000000274 NA NA #> 2 Wind -3.11 0.660 -4.71 0.00000778 NA NA #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 NA NA #> 4 Month.5 -74.2 4.23 -17.5 2.00 24 1 #> 5 Month.6 -89.0 6.91 -12.9 2.00 9 1 #> 6 Month.7 -83.0 4.06 -20.4 2 26 1 #> 7 Month.8 -78.4 4.32 -18.2 2.00 23 1 #> 8 Month.9 -90.2 3.85 -23.4 2 29 1 augment(est1) #> # A tibble: 111 × 8 #> .rownames Ozone Temp Wind Solar.R Month .fitted .resid #> #> 1 1 41 67 7.4 190 5 38.3 2.69 #> 2 2 36 72 8 118 5 42.1 -6.07 #> 3 3 12 74 12.6 149 5 33.1 -21.1 #> 4 4 18 62 11.5 313 5 22.6 -4.62 #> 5 7 23 65 8.6 299 5 36.5 -13.5 #> 6 8 19 59 13.8 99 5 -1.33 20.3 #> 7 9 8 61 20.1 19 5 -21.3 29.3 #> 8 12 16 69 9.7 256 5 38.4 -22.4 #> 9 13 11 66 9.2 290 5 36.1 -25.1 #> 10 14 14 68 10.9 274 5 33.7 -19.7 #> # ℹ 101 more rows glance(est1) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.637 0.612 20.7 25.8 4.57e-20 103 103 111 # the \"se.type\" argument can be used to switch out different standard errors # types on the fly. In turn, this can be useful exploring the effect of # different error structures on model inference. tidy(est1, se.type = \"iid\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, se.type = \"robust\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.344 5.45 0.000000344 #> 2 Wind -3.11 0.903 -3.44 0.000834 #> 3 Solar.R 0.0522 0.0226 2.31 0.0227 # add clustered SEs (also by month) est2 <- felm(Ozone ~ Temp + Wind + Solar.R | Month | 0 | Month, airquality) # summarize model fit with tidiers tidy(est2, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"cluster\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"robust\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.344 5.45 0.00550 0.920 2.83 #> 2 Wind -3.11 0.903 -3.44 0.0262 -5.62 -0.602 #> 3 Solar.R 0.0522 0.0226 2.31 0.0817 -0.0104 0.115 tidy(est2, conf.int = TRUE, se.type = \"iid\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.341 5.50 0.00532 0.929 2.82 #> 2 Wind -3.11 0.660 -4.71 0.00924 -4.94 -1.28 #> 3 Solar.R 0.0522 0.0237 2.21 0.0920 -0.0135 0.118"},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) fixest object — augment.fixest","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"","code":"# S3 method for class 'fixest' augment( x, data = NULL, newdata = NULL, type.predict = c(\"link\", \"response\"), type.residuals = c(\"response\", \"deviance\", \"pearson\", \"working\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"x fixest object returned fixest estimators data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Passed predict.fixest type argument. Defaults \"link\" (like predict.glm). type.residuals Passed predict.fixest type argument. Defaults \"response\" (like residuals.lm, unlike residuals.glm). ... Additional arguments passed summary confint. Important arguments se cluster. arguments dof, exact_dof, forceCovariance, keepBounded. See summary.fixest.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"Important note: fixest models include copy input data, must provide manually. augment.fixest works fixest::feols(), fixest::feglm(), fixest::femlm() models. work results fixest::fenegbin(), fixest::feNmlm(), fixest::fepois().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.fixest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) fixest object — augment.fixest","text":"","code":"# load libraries for models and data library(fixest) #> #> Attaching package: ‘fixest’ #> The following object is masked from ‘package:lfe’: #> #> fepois gravity <- feols( log(Euros) ~ log(dist_km) | Origin + Destination + Product + Year, trade ) tidy(gravity) #> # A tibble: 1 × 5 #> term estimate std.error statistic p.value #> #> 1 log(dist_km) -2.17 0.154 -14.1 0.00000000119 glance(gravity) #> # A tibble: 1 × 9 #> r.squared adj.r.squared within.r.squared pseudo.r.squared sigma nobs #> #> 1 0.706 0.705 0.219 NA 1.74 38325 #> # ℹ 3 more variables: AIC , BIC , logLik augment(gravity, trade) #> # A tibble: 38,325 × 9 #> .rownames Destination Origin Product Year dist_km Euros .fitted #> #> 1 1 LU BE 1 2007 140. 2966697 14.1 #> 2 2 BE LU 1 2007 140. 6755030 13.0 #> 3 3 LU BE 2 2007 140. 57078782 16.9 #> 4 4 BE LU 2 2007 140. 7117406 15.8 #> 5 5 LU BE 3 2007 140. 17379821 16.3 #> 6 6 BE LU 3 2007 140. 2622254 15.2 #> 7 7 LU BE 4 2007 140. 64867588 17.4 #> 8 8 BE LU 4 2007 140. 10731757 16.3 #> 9 9 LU BE 5 2007 140. 330702 14.1 #> 10 10 BE LU 5 2007 140. 7706 13.0 #> # ℹ 38,315 more rows #> # ℹ 1 more variable: .resid # to get robust or clustered SEs, users can either: # 1) specify the arguments directly in the `tidy()` call tidy(gravity, conf.int = TRUE, cluster = c(\"Product\", \"Year\")) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 tidy(gravity, conf.int = TRUE, se = \"threeway\") #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.175 -12.4 6.08e-9 -2.54 -1.79 # 2) or, feed tidy() a summary.fixest object that has already accepted # these arguments gravity_summ <- summary(gravity, cluster = c(\"Product\", \"Year\")) tidy(gravity_summ, conf.int = TRUE) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 # approach (1) is preferred."},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) gam object — augment.gam","title":"Augment data with information from a(n) gam object — augment.gam","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) gam object — augment.gam","text":"","code":"# S3 method for class 'gam' augment( x, data = model.frame(x), newdata = NULL, type.predict, type.residuals, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) gam object — augment.gam","text":"x gam object returned call mgcv::gam(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) gam object — augment.gam","text":"additional details Cook's distance, see stats::cooks.distance().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) gam object — augment.gam","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .hat Diagonal hat matrix. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.gam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) gam object — augment.gam","text":"","code":"# load libraries for models and data library(mgcv) #> Loading required package: nlme #> #> Attaching package: ‘nlme’ #> The following object is masked from ‘package:dplyr’: #> #> collapse #> This is mgcv 1.9-1. For overview type 'help(\"mgcv-package\")'. #> #> Attaching package: ‘mgcv’ #> The following object is masked from ‘package:mclust’: #> #> mvn # fit model g <- gam(mpg ~ s(hp) + am + qsec, data = mtcars) # summarize model fit with tidiers tidy(g) #> # A tibble: 1 × 5 #> term edf ref.df statistic p.value #> #> 1 s(hp) 2.36 3.02 6.34 0.00218 tidy(g, parametric = TRUE) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 16.7 9.83 1.70 0.101 #> 2 am 4.37 1.56 2.81 0.00918 #> 3 qsec 0.0904 0.525 0.172 0.865 glance(g) #> # A tibble: 1 × 9 #> df logLik AIC BIC deviance df.residual nobs adj.r.squared npar #> #> 1 5.36 -74.4 162. 171. 196. 26.6 32 0.797 12 augment(g) #> # A tibble: 32 × 11 #> .rownames mpg am qsec hp .fitted .se.fit .resid .hat .sigma #> #> 1 Mazda RX4 21 1 16.5 110 24.3 1.03 -3.25 0.145 NA #> 2 Mazda RX4… 21 1 17.0 110 24.3 0.925 -3.30 0.116 NA #> 3 Datsun 710 22.8 1 18.6 93 26.0 0.894 -3.22 0.109 NA #> 4 Hornet 4 … 21.4 0 19.4 110 20.2 0.827 1.25 0.0930 NA #> 5 Hornet Sp… 18.7 0 17.0 175 15.7 0.815 3.02 0.0902 NA #> 6 Valiant 18.1 0 20.2 105 20.7 0.914 -2.56 0.113 NA #> 7 Duster 360 14.3 0 15.8 245 12.7 1.11 1.63 0.167 NA #> 8 Merc 240D 24.4 0 20 62 25.0 1.45 -0.618 0.287 NA #> 9 Merc 230 22.8 0 22.9 95 21.8 1.81 0.959 0.446 NA #> 10 Merc 280 19.2 0 18.3 123 19.0 0.864 0.211 0.102 NA #> # ℹ 22 more rows #> # ℹ 1 more variable: .cooksd "},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) glm object — augment.glm","title":"Augment data with information from a(n) glm object — augment.glm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) glm object — augment.glm","text":"","code":"# S3 method for class 'glm' augment( x, data = model.frame(x), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) glm object — augment.glm","text":"x glm object returned stats::glm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Passed stats::predict.glm() type argument. Defaults \"link\". type.residuals Passed stats::residuals.glm() stats::rstandard.glm() type arguments. Defaults \"deviance\". se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) glm object — augment.glm","text":"weights observations model 0, columns \".infl\" \".hat\" result 0 observations. .resid column calculated data specified via newdata argument.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) glm object — augment.glm","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .hat Diagonal hat matrix. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model. .std.resid Standardised residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.glmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) glmRob object — augment.glmRob","title":"Augment data with information from a(n) glmRob object — augment.glmRob","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.glmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) glmRob object — augment.glmRob","text":"","code":"# S3 method for class 'glmRob' augment(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.glmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) glmRob object — augment.glmRob","text":"x Unused. ... Unused.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) htest object — augment.htest","title":"Augment data with information from a(n) htest object — augment.htest","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) htest object — augment.htest","text":"","code":"# S3 method for class 'htest' augment(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) htest object — augment.htest","text":"x htest objected, created stats::cor.test(), stats::t.test(), stats::wilcox.test(), stats::chisq.test(), etc. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) htest object — augment.htest","text":"See stats::chisq.test() details residuals computed.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) htest object — augment.htest","text":"tibble::tibble() exactly one row columns: .observed Observed count. .prop Proportion total. .row.prop Row proportion (2 dimensions table ). .col.prop Column proportion (2 dimensions table ). .expected Expected count null hypothesis. .resid Pearson residuals. .std.resid Standardized residual.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) htest object — augment.htest","text":"","code":"tt <- t.test(rnorm(10)) tidy(tt) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.177 -0.539 0.603 9 -0.918 0.565 One Sample t-te… #> # ℹ 1 more variable: alternative # the glance output will be the same for each of the below tests glance(tt) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.177 -0.539 0.603 9 -0.918 0.565 One Sample t-te… #> # ℹ 1 more variable: alternative tt <- t.test(mpg ~ am, data = mtcars) tidy(tt) #> # A tibble: 1 × 10 #> estimate estimate1 estimate2 statistic p.value parameter conf.low #> #> 1 -7.24 17.1 24.4 -3.77 0.00137 18.3 -11.3 #> # ℹ 3 more variables: conf.high , method , alternative wt <- wilcox.test(mpg ~ am, data = mtcars, conf.int = TRUE, exact = FALSE) tidy(wt) #> # A tibble: 1 × 7 #> estimate statistic p.value conf.low conf.high method alternative #> #> 1 -6.80 42 0.00187 -11.7 -2.90 Wilcoxon rank… two.sided ct <- cor.test(mtcars$wt, mtcars$mpg) tidy(ct) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.868 -9.56 1.29e-10 30 -0.934 -0.744 Pearson's prod… #> # ℹ 1 more variable: alternative chit <- chisq.test(xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic))) tidy(chit) #> # A tibble: 1 × 4 #> statistic p.value parameter method #> #> 1 350. 1.56e-75 3 Pearson's Chi-squared test augment(chit) #> # A tibble: 8 × 9 #> Sex Class .observed .prop .row.prop .col.prop .expected .resid #> #> 1 Male 1st 180 0.0818 0.104 0.554 256. -4.73 #> 2 Female 1st 145 0.0659 0.309 0.446 69.4 9.07 #> 3 Male 2nd 179 0.0813 0.103 0.628 224. -3.02 #> 4 Female 2nd 106 0.0482 0.226 0.372 60.9 5.79 #> 5 Male 3rd 510 0.232 0.295 0.722 555. -1.92 #> 6 Female 3rd 196 0.0891 0.417 0.278 151. 3.68 #> 7 Male Crew 862 0.392 0.498 0.974 696. 6.29 #> 8 Female Crew 23 0.0104 0.0489 0.0260 189. -12.1 #> # ℹ 1 more variable: .std.resid "},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) ivreg object — augment.ivreg","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"","code":"# S3 method for class 'ivreg' augment(x, data = model.frame(x), newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"x ivreg object created call AER::ivreg(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"tidier currently supports ivreg-classed objects outputted AER package. ivreg package also outputs objects class ivreg, supported later release.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.ivreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) ivreg object — augment.ivreg","text":"","code":"# load libraries for models and data library(AER) #> Loading required package: car #> Loading required package: carData #> #> Attaching package: ‘car’ #> The following object is masked from ‘package:purrr’: #> #> some #> The following object is masked from ‘package:dplyr’: #> #> recode # load data data(\"CigarettesSW\", package = \"AER\") # fit model ivr <- ivreg( log(packs) ~ income | population, data = CigarettesSW, subset = year == \"1995\" ) # summarize model fit with tidiers tidy(ivr) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 tidy(ivr, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 4.52e+0 4.70e+ 0 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 -1.03e-9 -1.13e-10 tidy(ivr, conf.int = TRUE, instruments = TRUE) #> # A tibble: 1 × 5 #> term num.df den.df statistic p.value #> #> 1 income 1 46 3329. 1.46e-44 augment(ivr) #> # A tibble: 48 × 6 #> .rownames `log(packs)` income population .fitted .resid #> #> 1 49 4.62 83903280 4262731 4.56 0.0522 #> 2 50 4.71 45995496 2480121 4.59 0.124 #> 3 51 4.28 88870496 4306908 4.56 -0.285 #> 4 52 4.04 771470144 31493524 4.17 -0.131 #> 5 53 4.41 92946544 3738061 4.56 -0.145 #> 6 54 4.38 104315120 3265293 4.55 -0.177 #> 7 55 4.82 18237436 718265 4.60 0.223 #> 8 56 4.53 333525344 14185403 4.42 0.112 #> 9 57 4.58 159800448 7188538 4.52 0.0591 #> 10 58 4.53 60170928 2840860 4.58 -0.0512 #> # ℹ 38 more rows augment(ivr, data = CigarettesSW) #> # A tibble: 96 × 11 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.56 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.59 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.56 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.17 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.56 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.55 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.60 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.42 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.52 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.58 #> # ℹ 86 more rows #> # ℹ 1 more variable: .resid augment(ivr, newdata = CigarettesSW) #> # A tibble: 96 × 10 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.59 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.60 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.59 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.36 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.58 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.58 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.61 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.52 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.57 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.59 #> # ℹ 86 more rows glance(ivr) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.131 0.112 0.229 5.98 0.0184 2 46 48"},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) kmeans object — augment.kmeans","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"","code":"# S3 method for class 'kmeans' augment(x, data, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"x kmeans object created stats::kmeans(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"tibble::tibble() columns: .cluster Cluster assignment.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.kmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) kmeans object — augment.kmeans","text":"","code":"library(cluster) library(modeldata) library(dplyr) data(hpc_data) x <- hpc_data[, 2:5] fit <- pam(x, k = 4) tidy(fit) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(fit) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(fit, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) lm object — augment.lm","title":"Augment data with information from a(n) lm object — augment.lm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) lm object — augment.lm","text":"","code":"# S3 method for class 'lm' augment( x, data = model.frame(x), newdata = NULL, se_fit = FALSE, interval = c(\"none\", \"confidence\", \"prediction\"), conf.level = 0.95, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) lm object — augment.lm","text":"x lm object created stats::lm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. interval Character indicating type confidence interval columns added augmented output. Passed predict() defaults \"none\". conf.level confidence level use interval created interval \"confidence\" \"prediction\". Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence/prediction interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) lm object — augment.lm","text":"modeling performed na.action = \"na.omit\" (typical default), rows NA initial data omitted entirely augmented data frame. modeling performed na.action = \"na.exclude\", one provide original data second argument, point augmented data contain rows (typically NAs place new columns). original data provided augment() na.action = \"na.exclude\", warning raised incomplete rows dropped. unusual lm objects, rlm MASS, may omit .cooksd .std.resid. gam mgcv omits .sigma. newdata supplied, returns .fitted, .resid .se.fit columns.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) lm object — augment.lm","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .hat Diagonal hat matrix. .lower Lower bound interval fitted values. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model. .std.resid Standardised residuals. .upper Upper bound interval fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) lm object — augment.lm","text":"","code":"library(ggplot2) library(dplyr) mod <- lm(mpg ~ wt + qsec, data = mtcars) tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # coefficient plot d <- tidy(mod, conf.int = TRUE) ggplot(d, aes(estimate, term, xmin = conf.low, xmax = conf.high, height = 0)) + geom_point() + geom_vline(xintercept = 0, lty = 4) + geom_errorbarh() # aside: There are tidy() and glance() methods for lm.summary objects too. # this can be useful when you want to conserve memory by converting large lm # objects into their leaner summary.lm equivalents. s <- summary(mod) tidy(s, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(s) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32 augment(mod) #> # A tibble: 32 × 10 #> .rownames mpg wt qsec .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 0.0693 2.64 2.63e-3 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 0.0444 2.64 5.59e-6 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 0.0607 2.60 2.17e-2 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 0.0576 2.64 1.05e-4 #> 5 Hornet Sportab… 18.7 3.44 17.0 18.2 0.504 0.0389 2.64 5.29e-4 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 0.0957 2.58 5.10e-2 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 0.0729 2.61 1.93e-2 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 0.0791 2.61 2.18e-2 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 0.295 2.59 1.59e-1 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 0.0358 2.64 6.55e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid augment(mod, mtcars, interval = \"confidence\") #> # A tibble: 32 × 20 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 9 more variables: carb , .fitted , .lower , #> # .upper , .resid , .hat , .sigma , .cooksd , #> # .std.resid # predict on new data newdata <- mtcars %>% head(6) %>% mutate(wt = wt + 1) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid # ggplot2 example where we also construct 95% prediction interval # simpler bivariate model since we're plotting in 2D mod2 <- lm(mpg ~ wt, data = mtcars) au <- augment(mod2, newdata = newdata, interval = \"prediction\") ggplot(au, aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) + geom_ribbon(aes(ymin = .lower, ymax = .upper), col = NA, alpha = 0.3) # predict on new data without outcome variable. Output does not include .resid newdata <- newdata %>% select(-mpg) #> Error in select(., -mpg): unused argument (-mpg) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + geom_vline(size = 2, colour = \"white\", xintercept = 0) + geom_hline(size = 2, colour = \"white\", yintercept = 0) + geom_point() + geom_smooth(se = FALSE) #> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0. #> ℹ Please use `linewidth` instead. #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' plot(mod, which = 6) ggplot(au, aes(.hat, .cooksd)) + geom_vline(xintercept = 0, colour = NA) + geom_abline(slope = seq(0, 3, by = 0.5), colour = \"white\") + geom_smooth(se = FALSE) + geom_point() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # column-wise models a <- matrix(rnorm(20), nrow = 10) b <- a + rnorm(length(a)) result <- lm(b ~ a) tidy(result) #> # A tibble: 6 × 6 #> response term estimate std.error statistic p.value #> #> 1 Y1 (Intercept) -0.292 0.280 -1.04 0.332 #> 2 Y1 a1 1.28 0.232 5.50 0.000903 #> 3 Y1 a2 -0.519 0.187 -2.78 0.0274 #> 4 Y2 (Intercept) -0.0923 0.259 -0.357 0.732 #> 5 Y2 a1 -0.231 0.214 -1.08 0.317 #> 6 Y2 a2 0.768 0.172 4.45 0.00296"},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) lmRob object — augment.lmRob","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"","code":"# S3 method for class 'lmRob' augment(x, data = model.frame(x), newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"x lmRob object returned robust::lmRob(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.lmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) lmRob object — augment.lmRob","text":"","code":"# load modeling library library(robust) #> Loading required package: fit.models # fit model m <- lmRob(mpg ~ wt, data = mtcars) # summarize model fit with tidiers tidy(m) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 35.6 3.58 9.93 5.37e-11 #> 2 wt -4.91 1.09 -4.49 9.67e- 5 augment(m) #> # A tibble: 32 × 4 #> .rownames mpg wt .fitted #> #> 1 Mazda RX4 21 2.62 22.7 #> 2 Mazda RX4 Wag 21 2.88 21.4 #> 3 Datsun 710 22.8 2.32 24.2 #> 4 Hornet 4 Drive 21.4 3.22 19.8 #> 5 Hornet Sportabout 18.7 3.44 18.7 #> 6 Valiant 18.1 3.46 18.6 #> 7 Duster 360 14.3 3.57 18.0 #> 8 Merc 240D 24.4 3.19 19.9 #> 9 Merc 230 22.8 3.15 20.1 #> 10 Merc 280 19.2 3.44 18.7 #> # ℹ 22 more rows glance(m) #> # A tibble: 1 × 5 #> r.squared deviance sigma df.residual nobs #> #> 1 0.567 136. 2.95 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) loess object — augment.loess","title":"Tidy a(n) loess object — augment.loess","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) loess object — augment.loess","text":"","code":"# S3 method for class 'loess' augment(x, data = model.frame(x), newdata = NULL, se_fit = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) loess object — augment.loess","text":"x loess objects returned stats::loess(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) loess object — augment.loess","text":"modeling performed na.action = \"na.omit\" (typical default), rows NA initial data omitted entirely augmented data frame. modeling performed na.action = \"na.exclude\", one provide original data second argument, point augmented data contain rows (typically NAs place new columns). original data provided augment() na.action = \"na.exclude\", warning raised incomplete rows dropped. Note loess objects default predict data outside bounding hypercube defined training data unless original loess object fit control = loess.control(surface = \\\"direct\\\")). See stats::predict.loess() details.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) loess object — augment.loess","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values. .se.fit Standard errors fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.loess.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) loess object — augment.loess","text":"","code":"lo <- loess( mpg ~ hp + wt, mtcars, control = loess.control(surface = \"direct\") ) augment(lo) #> # A tibble: 32 × 6 #> .rownames mpg hp wt .fitted .resid #> #> 1 Mazda RX4 21 110 2.62 21.4 -0.435 #> 2 Mazda RX4 Wag 21 110 2.88 20.9 0.0976 #> 3 Datsun 710 22.8 93 2.32 24.7 -1.88 #> 4 Hornet 4 Drive 21.4 110 3.22 19.6 1.76 #> 5 Hornet Sportabout 18.7 175 3.44 16.7 2.02 #> 6 Valiant 18.1 105 3.46 18.9 -0.833 #> 7 Duster 360 14.3 245 3.57 14.9 -0.641 #> 8 Merc 240D 24.4 62 3.19 25.1 -0.695 #> 9 Merc 230 22.8 95 3.15 21.4 1.43 #> 10 Merc 280 19.2 123 3.44 18.4 0.801 #> # ℹ 22 more rows # with all columns of original data augment(lo, mtcars) #> # A tibble: 32 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 3 more variables: carb , .fitted , .resid # with a new dataset augment(lo, newdata = head(mtcars)) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid "},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) mfx object — augment.mfx","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"","code":"# S3 method for class 'mfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... ) # S3 method for class 'logitmfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... ) # S3 method for class 'negbinmfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... ) # S3 method for class 'poissonmfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... ) # S3 method for class 'probitmfx' augment( x, data = model.frame(x$fit), newdata = NULL, type.predict = c(\"link\", \"response\", \"terms\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"x logitmfx, negbinmfx, poissonmfx, probitmfx object. (Note betamfx objects receive set tidiers.) data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Passed stats::predict.glm() type argument. Defaults \"link\". type.residuals Passed stats::residuals.glm() stats::rstandard.glm() type arguments. Defaults \"deviance\". se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"generic augment method wraps augment.glm() applicable objects mfx package.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"tibble::tibble() columns: .cooksd Cooks distance. .fitted Fitted predicted value. .hat Diagonal hat matrix. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model. .std.resid Standardised residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) mfx object — augment.mfx","text":"","code":"# load libraries for models and data library(mfx) # get the marginal effects from a logit regression mod_logmfx <- logitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) tidy(mod_logmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0538 0.113 0.475 0.635 -0.178 0.286 #> 2 hp TRUE 0.00359 0.00290 1.24 0.216 -0.00236 0.00954 #> 3 wt TRUE -1.01 0.668 -1.51 0.131 -2.38 0.359 # compare with the naive model coefficients of the same logit call tidy( glm(am ~ cyl + hp + wt, family = binomial, data = mtcars), conf.int = TRUE ) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 8.56 44.3 #> 2 cyl 0.488 1.07 0.455 0.649 -1.53 3.12 #> 3 hp 0.0326 0.0189 1.73 0.0840 0.00332 0.0884 #> 4 wt -9.15 4.15 -2.20 0.0276 -21.4 -3.48 augment(mod_logmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_logmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # another example, this time using probit regression mod_probmfx <- probitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred tidy(mod_probmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0616 0.112 0.548 0.583 -0.169 0.292 #> 2 hp TRUE 0.00383 0.00282 1.36 0.174 -0.00194 0.00960 #> 3 wt TRUE -1.06 0.594 -1.78 0.0753 -2.27 0.160 augment(mod_probmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 1.21 0.490 0.308 0.585 2.05e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.129 1.27 0.249 0.526 1.36e-1 #> 3 Datsun 7… 1 4 93 2.32 1.85 0.256 0.134 0.594 1.48e-3 #> 4 Hornet 4… 0 6 110 3.22 -1.92 -0.237 0.116 0.594 1.05e-3 #> 5 Hornet S… 0 8 175 3.44 -1.25 -0.474 0.236 0.587 1.20e-2 #> 6 Valiant 0 6 105 3.46 -3.30 -0.0312 0.0111 0.596 1.39e-6 #> 7 Duster 3… 0 8 245 3.57 -0.595 -0.804 0.285 0.567 5.32e-2 #> 8 Merc 240D 0 4 62 3.19 -3.31 -0.0304 0.0179 0.596 2.15e-6 #> 9 Merc 230 0 4 95 3.15 -2.47 -0.116 0.130 0.596 2.89e-4 #> 10 Merc 280 0 6 123 3.44 -2.85 -0.0662 0.0315 0.596 1.84e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_probmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.80 17.6 23.5 9.59 28 32"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) mjoint object — augment.mjoint","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"","code":"# S3 method for class 'mjoint' augment(x, data = x$data, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"x mjoint object returned joineRML::mjoint(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"tibble::tibble() one row original observation addition columns: .fitted_j_0 population-level fitted values j-th longitudinal process .fitted_j_1 individuals-level fitted values j-th longitudinal process .resid_j_0 population-level residuals j-th longitudinal process .resid_j_1 individual-level residuals j-th longitudinal process","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"See joineRML::fitted.mjoint() joineRML::residuals.mjoint() information difference population-level individual-level fitted values residuals. fitting joint model single longitudinal process, make sure using named list define formula fixed random effects longitudinal submodel.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mjoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) mjoint object — augment.mjoint","text":"","code":"# broom only skips running these examples because the example models take a # while to generate—they should run just fine, though! if (FALSE) { # \\dontrun{ # load libraries for models and data library(joineRML) # fit a joint model with bivariate longitudinal outcomes data(heart.valve) hvd <- heart.valve[!is.na(heart.valve$log.grad) & !is.na(heart.valve$log.lvmi) & heart.valve$num <= 50, ] fit <- mjoint( formLongFixed = list( \"grad\" = log.grad ~ time + sex + hs, \"lvmi\" = log.lvmi ~ time + sex ), formLongRandom = list( \"grad\" = ~ 1 | num, \"lvmi\" = ~ time | num ), formSurv = Surv(fuyrs, status) ~ age, data = hvd, inits = list(\"gamma\" = c(0.11, 1.51, 0.80)), timeVar = \"time\" ) # extract the survival fixed effects tidy(fit) # extract the longitudinal fixed effects tidy(fit, component = \"longitudinal\") # extract the survival fixed effects with confidence intervals tidy(fit, ci = TRUE) # extract the survival fixed effects with confidence intervals based # on bootstrapped standard errors bSE <- bootSE(fit, nboot = 5, safe.boot = TRUE) tidy(fit, boot_se = bSE, ci = TRUE) # augment original data with fitted longitudinal values and residuals hvd2 <- augment(fit) # extract model statistics glance(fit) } # }"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) mlogit object — augment.mlogit","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"","code":"# S3 method for class 'mlogit' augment(x, data = x$model, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"x object returned mlogit::mlogit(). data currently used ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"moment works estimation dataset. Need set predict another dataset.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"tibble::tibble() columns: .fitted Fitted predicted value. .probability Class probability modal class. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.mlogit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) mlogit object — augment.mlogit","text":"","code":"# load libraries for models and data library(mlogit) #> Loading required package: dfidx #> #> Attaching package: ‘dfidx’ #> The following object is masked from ‘package:ordinal’: #> #> slice #> The following object is masked from ‘package:MASS’: #> #> select #> The following object is masked from ‘package:stats’: #> #> filter #> #> Attaching package: ‘mlogit’ #> The following object is masked from ‘package:lfe’: #> #> waldtest data(\"Fishing\", package = \"mlogit\") Fish <- dfidx(Fishing, varying = 2:9, shape = \"wide\", choice = \"mode\") # fit model m <- mlogit(mode ~ price + catch | income, data = Fish) # summarize model fit with tidiers tidy(m) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept):boat 0.527 0.223 2.37 1.79e- 2 #> 2 (Intercept):charter 1.69 0.224 7.56 3.95e-14 #> 3 (Intercept):pier 0.778 0.220 3.53 4.18e- 4 #> 4 price -0.0251 0.00173 -14.5 0 #> 5 catch 0.358 0.110 3.26 1.12e- 3 #> 6 income:boat 0.0000894 0.0000501 1.79 7.40e- 2 #> 7 income:charter -0.0000333 0.0000503 -0.661 5.08e- 1 #> 8 income:pier -0.000128 0.0000506 -2.52 1.18e- 2 augment(m) #> # A tibble: 4,728 × 9 #> id alternative chosen price catch income .probability .fitted #> #> 1 1 beach FALSE 158. 0.0678 7083. 0.125 -3.94 #> 2 1 boat FALSE 158. 0.260 7083. 0.427 -2.71 #> 3 1 charter TRUE 183. 0.539 7083. 0.339 -2.94 #> 4 1 pier FALSE 158. 0.0503 7083. 0.109 -4.07 #> 5 2 beach FALSE 15.1 0.105 1250. 0.116 -0.342 #> 6 2 boat FALSE 10.5 0.157 1250. 0.251 0.431 #> 7 2 charter TRUE 34.5 0.467 1250. 0.423 0.952 #> 8 2 pier FALSE 15.1 0.0451 1250. 0.210 0.255 #> 9 3 beach FALSE 162. 0.533 3750. 0.00689 -3.87 #> 10 3 boat TRUE 24.3 0.241 3750. 0.465 0.338 #> # ℹ 4,718 more rows #> # ℹ 1 more variable: .resid glance(m) #> # A tibble: 1 × 6 #> logLik rho2 rho20 AIC BIC nobs #> #> 1 -1215. 0.189 0.258 2446. NA 1182"},{"path":"https://broom.tidymodels.org/dev/reference/augment.nlrq.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) nlrq object — augment.nlrq","title":"Tidy a(n) nlrq object — augment.nlrq","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.nlrq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) nlrq object — augment.nlrq","text":"","code":"# S3 method for class 'nlrq' augment(x, data = NULL, newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.nlrq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) nlrq object — augment.nlrq","text":"x nlrq object returned quantreg::nlrq(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.nlrq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) nlrq object — augment.nlrq","text":"","code":"# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 k 49.7 3.79 13.1 5.96e-14 #> 2 e 0.746 0.0199 37.5 8.86e-27 augment(n) #> # A tibble: 32 × 4 #> mpg wt .fitted .resid #> #> 1 21 2.62 23.0 -2.01 #> 2 21 2.88 21.4 -0.352 #> 3 22.8 2.32 25.1 -2.33 #> 4 21.4 3.22 19.3 2.08 #> 5 18.7 3.44 18.1 0.611 #> 6 18.1 3.46 18.0 0.117 #> 7 14.3 3.57 17.4 -3.11 #> 8 24.4 3.19 19.5 4.93 #> 9 22.8 3.15 19.7 3.10 #> 10 19.2 3.44 18.1 1.11 #> # ℹ 22 more rows glance(n) #> # A tibble: 1 × 9 #> sigma isConv finTol logLik AIC BIC deviance df.residual nobs #> #> 1 2.67 TRUE 0.00000204 -75.8 158. 162. 214. 30 32 library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata) #> # A tibble: 6 × 13 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 2 more variables: carb , .fitted "},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) nls object — augment.nls","title":"Augment data with information from a(n) nls object — augment.nls","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) nls object — augment.nls","text":"","code":"# S3 method for class 'nls' augment(x, data = NULL, newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) nls object — augment.nls","text":"x nls object returned stats::nls(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) nls object — augment.nls","text":"augment.nls currently support confidence intervals due lack support stats::predict.nls().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) nls object — augment.nls","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.nls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) nls object — augment.nls","text":"","code":"# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 k 49.7 3.79 13.1 5.96e-14 #> 2 e 0.746 0.0199 37.5 8.86e-27 augment(n) #> # A tibble: 32 × 4 #> mpg wt .fitted .resid #> #> 1 21 2.62 23.0 -2.01 #> 2 21 2.88 21.4 -0.352 #> 3 22.8 2.32 25.1 -2.33 #> 4 21.4 3.22 19.3 2.08 #> 5 18.7 3.44 18.1 0.611 #> 6 18.1 3.46 18.0 0.117 #> 7 14.3 3.57 17.4 -3.11 #> 8 24.4 3.19 19.5 4.93 #> 9 22.8 3.15 19.7 3.10 #> 10 19.2 3.44 18.1 1.11 #> # ℹ 22 more rows glance(n) #> # A tibble: 1 × 9 #> sigma isConv finTol logLik AIC BIC deviance df.residual nobs #> #> 1 2.67 TRUE 0.00000204 -75.8 158. 162. 214. 30 32 library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata) #> # A tibble: 6 × 13 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 2 more variables: carb , .fitted "},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) pam object — augment.pam","title":"Augment data with information from a(n) pam object — augment.pam","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) pam object — augment.pam","text":"","code":"# S3 method for class 'pam' augment(x, data = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) pam object — augment.pam","text":"x pam object returned cluster::pam() data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) pam object — augment.pam","text":"tibble::tibble() columns: .cluster Cluster assignment. .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.pam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) pam object — augment.pam","text":"","code":"# load libraries for models and data library(dplyr) library(ggplot2) library(cluster) library(modeldata) data(hpc_data) x <- hpc_data[, 2:5] p <- pam(x, k = 4) # summarize model fit with tidiers + visualization tidy(p) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(p) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(p, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows augment(p, x) %>% ggplot(aes(compounds, input_fields)) + geom_point(aes(color = .cluster)) + geom_text(aes(label = cluster), data = tidy(p), size = 10)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) plm object — augment.plm","title":"Augment data with information from a(n) plm object — augment.plm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) plm object — augment.plm","text":"","code":"# S3 method for class 'plm' augment(x, data = model.frame(x), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) plm object — augment.plm","text":"x plm objected returned plm::plm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) plm object — augment.plm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.plm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) plm object — augment.plm","text":"","code":"# load libraries for models and data library(plm) #> #> Attaching package: ‘plm’ #> The following object is masked from ‘package:mlogit’: #> #> has.intercept #> The following object is masked from ‘package:lfe’: #> #> sargan #> The following objects are masked from ‘package:dplyr’: #> #> between, lag, lead # load data data(\"Produc\", package = \"plm\") # fit model zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, index = c(\"state\", \"year\") ) # summarize model fit with tidiers summary(zz) #> Oneway (individual) effect Within Model #> #> Call: #> plm(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, #> data = Produc, index = c(\"state\", \"year\")) #> #> Balanced Panel: n = 48, T = 17, N = 816 #> #> Residuals: #> Min. 1st Qu. Median 3rd Qu. Max. #> -0.120456 -0.023741 -0.002041 0.018144 0.174718 #> #> Coefficients: #> Estimate Std. Error t-value Pr(>|t|) #> log(pcap) -0.02614965 0.02900158 -0.9017 0.3675 #> log(pc) 0.29200693 0.02511967 11.6246 < 2.2e-16 *** #> log(emp) 0.76815947 0.03009174 25.5273 < 2.2e-16 *** #> unemp -0.00529774 0.00098873 -5.3582 1.114e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Total Sum of Squares: 18.941 #> Residual Sum of Squares: 1.1112 #> R-Squared: 0.94134 #> Adj. R-Squared: 0.93742 #> F-statistic: 3064.81 on 4 and 764 DF, p-value: < 2.22e-16 tidy(zz) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 tidy(zz, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0830 0.0307 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.243 0.341 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.709 0.827 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00724 -0.00336 tidy(zz, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0739 0.0216 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.251 0.333 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.719 0.818 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00692 -0.00367 augment(zz) #> # A tibble: 816 × 7 #> `log(gsp)` `log(pcap)` `log(pc)` `log(emp)` unemp .fitted .resid #> #> 1 10.25478 9.617981 10.48553 6.918201 4.7 10.3 -0.046561413 #> 2 10.28790 9.648720 10.52675 6.929419 5.2 10.3 -0.030640422 #> 3 10.35147 9.678618 10.56283 6.977561 4.7 10.4 -0.016454312 #> 4 10.41721 9.705418 10.59873 7.034828 3.9 10.4 -0.008726974 #> 5 10.42671 9.726910 10.64679 7.064588 5.5 10.5 -0.027084312 #> 6 10.42240 9.759401 10.69130 7.052202 7.7 10.4 -0.022368930 #> 7 10.48470 9.783175 10.82420 7.095893 6.8 10.5 -0.036587629 #> 8 10.53111 9.804326 10.84125 7.146142 7.4 10.6 -0.030020604 #> 9 10.59573 9.824430 10.87055 7.197810 6.3 10.6 -0.018942497 #> 10 10.62082 9.845937 10.90643 7.216709 7.1 10.6 -0.014057170 #> # ℹ 806 more rows glance(zz) #> # A tibble: 1 × 7 #> r.squared adj.r.squared statistic p.value deviance df.residual nobs #> #> 1 0.941 0.937 3065. 0 1.11 764 816"},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) poLCA object — augment.poLCA","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"","code":"# S3 method for class 'poLCA' augment(x, data = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"x poLCA object returned poLCA::poLCA(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"data argument given, columns included output (rows predictions made). Otherwise, y element poLCA object, contains manifest variables used fit model, used, along covariates, present, x. Note probability classes (just predicted modal class) can found posterior element, included augmented output.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"tibble::tibble() columns: .class Predicted class. .probability Class probability modal class.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.poLCA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) poLCA object — augment.poLCA","text":"","code":"# load libraries for models and data library(poLCA) #> Loading required package: scatterplot3d library(dplyr) # generate data data(values) f <- cbind(A, B, C, D) ~ 1 # fit model M1 <- poLCA(f, values, nclass = 2, verbose = FALSE) M1 #> Conditional item response (column) probabilities, #> by outcome variable, for each class (row) #> #> $A #> Pr(1) Pr(2) #> class 1: 0.2864 0.7136 #> class 2: 0.0068 0.9932 #> #> $B #> Pr(1) Pr(2) #> class 1: 0.6704 0.3296 #> class 2: 0.0602 0.9398 #> #> $C #> Pr(1) Pr(2) #> class 1: 0.6460 0.3540 #> class 2: 0.0735 0.9265 #> #> $D #> Pr(1) Pr(2) #> class 1: 0.8676 0.1324 #> class 2: 0.2309 0.7691 #> #> Estimated class population shares #> 0.7208 0.2792 #> #> Predicted class memberships (by modal posterior prob.) #> 0.6713 0.3287 #> #> ========================================================= #> Fit for 2 latent classes: #> ========================================================= #> number of observations: 216 #> number of estimated parameters: 9 #> residual degrees of freedom: 6 #> maximum log-likelihood: -504.4677 #> #> AIC(2): 1026.935 #> BIC(2): 1057.313 #> G^2(2): 2.719922 (Likelihood ratio/deviance statistic) #> X^2(2): 2.719764 (Chi-square goodness of fit) #> # summarize model fit with tidiers + visualization tidy(M1) #> # A tibble: 16 × 5 #> variable class outcome estimate std.error #> #> 1 A 1 1 0.286 0.0393 #> 2 A 2 1 0.00681 0.0254 #> 3 A 1 2 0.714 0.0393 #> 4 A 2 2 0.993 0.0254 #> 5 B 1 1 0.670 0.0489 #> 6 B 2 1 0.0602 0.0649 #> 7 B 1 2 0.330 0.0489 #> 8 B 2 2 0.940 0.0649 #> 9 C 1 1 0.646 0.0482 #> 10 C 2 1 0.0735 0.0642 #> 11 C 1 2 0.354 0.0482 #> 12 C 2 2 0.927 0.0642 #> 13 D 1 1 0.868 0.0379 #> 14 D 2 1 0.231 0.0929 #> 15 D 1 2 0.132 0.0379 #> 16 D 2 2 0.769 0.0929 augment(M1) #> # A tibble: 216 × 7 #> A B C D X.Intercept. .class .probability #> #> 1 2 2 2 2 1 2 0.959 #> 2 2 2 2 2 1 2 0.959 #> 3 2 2 2 2 1 2 0.959 #> 4 2 2 2 2 1 2 0.959 #> 5 2 2 2 2 1 2 0.959 #> 6 2 2 2 2 1 2 0.959 #> 7 2 2 2 2 1 2 0.959 #> 8 2 2 2 2 1 2 0.959 #> 9 2 2 2 2 1 2 0.959 #> 10 2 2 2 2 1 2 0.959 #> # ℹ 206 more rows glance(M1) #> # A tibble: 1 × 8 #> logLik AIC BIC g.squared chi.squared df df.residual nobs #> #> 1 -504. 1027. 1057. 2.72 2.72 9 6 216 library(ggplot2) ggplot(tidy(M1), aes(factor(class), estimate, fill = factor(outcome))) + geom_bar(stat = \"identity\", width = 1) + facet_wrap(~variable) # three-class model with a single covariate. data(election) f2a <- cbind( MORALG, CARESG, KNOWG, LEADG, DISHONG, INTELG, MORALB, CARESB, KNOWB, LEADB, DISHONB, INTELB ) ~ PARTY nes2a <- poLCA(f2a, election, nclass = 3, nrep = 5, verbose = FALSE) td <- tidy(nes2a) td #> # A tibble: 144 × 5 #> variable class outcome estimate std.error #> #> 1 MORALG 1 1 Extremely well 0.108 0.0175 #> 2 MORALG 2 1 Extremely well 0.137 0.0182 #> 3 MORALG 3 1 Extremely well 0.622 0.0309 #> 4 MORALG 1 2 Quite well 0.383 0.0274 #> 5 MORALG 2 2 Quite well 0.668 0.0247 #> 6 MORALG 3 2 Quite well 0.335 0.0293 #> 7 MORALG 1 3 Not too well 0.304 0.0253 #> 8 MORALG 2 3 Not too well 0.180 0.0208 #> 9 MORALG 3 3 Not too well 0.0172 0.00841 #> 10 MORALG 1 4 Not well at all 0.205 0.0243 #> # ℹ 134 more rows ggplot(td, aes(outcome, estimate, color = factor(class), group = class)) + geom_line() + facet_wrap(~variable, nrow = 2) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) au <- augment(nes2a) au #> # A tibble: 1,300 × 16 #> MORALG CARESG KNOWG LEADG DISHONG INTELG MORALB CARESB KNOWB LEADB #> #> 1 3 Not too … 1 Ext… 2 Qu… 2 Qu… 3 Not … 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 2 1 Extremel… 2 Qui… 2 Qu… 1 Ex… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 3 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 2 Quit… 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 4 2 Quite we… 4 Not… 2 Qu… 3 No… 2 Quit… 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 5 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 4 Not… 4 No… 4 No… #> 6 2 Quite we… 2 Qui… 2 Qu… 3 No… 4 Not … 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 7 1 Extremel… 1 Ext… 1 Ex… 1 Ex… 4 Not … 1 Ext… 2 Qui… 4 Not… 2 Qu… 3 No… #> 8 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 2 Qui… 2 Qu… 2 Qu… #> 9 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 10 2 Quite we… 3 Not… 2 Qu… 2 Qu… 3 Not … 2 Qui… 2 Qui… 4 Not… 2 Qu… 4 No… #> # ℹ 1,290 more rows #> # ℹ 6 more variables: DISHONB , INTELB , X.Intercept. , #> # PARTY , .class , .probability count(au, .class) #> # A tibble: 3 × 2 #> .class n #> #> 1 1 444 #> 2 2 496 #> 3 3 360 # if the original data is provided, it leads to NAs in new columns # for rows that weren't predicted au2 <- augment(nes2a, data = election) au2 #> # A tibble: 1,785 × 20 #> MORALG CARESG KNOWG LEADG DISHONG INTELG MORALB CARESB KNOWB LEADB #> #> 1 3 Not too … 1 Ext… 2 Qu… 2 Qu… 3 Not … 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 2 4 Not well… 3 Not… 4 No… 3 No… 2 Quit… 2 Qui… NA NA 2 Qu… 3 No… #> 3 1 Extremel… 2 Qui… 2 Qu… 1 Ex… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 4 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 2 Quit… 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 5 2 Quite we… 4 Not… 2 Qu… 3 No… 2 Quit… 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 6 2 Quite we… 3 Not… 3 No… 2 Qu… 2 Quit… 2 Qui… 2 Qui… NA 3 No… 2 Qu… #> 7 2 Quite we… NA 2 Qu… 2 Qu… 4 Not … 2 Qui… NA 3 Not… 2 Qu… 2 Qu… #> 8 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 4 Not… 4 No… 4 No… #> 9 2 Quite we… 2 Qui… 2 Qu… 3 No… 4 Not … 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 10 1 Extremel… 1 Ext… 1 Ex… 1 Ex… 4 Not … 1 Ext… 2 Qui… 4 Not… 2 Qu… 3 No… #> # ℹ 1,775 more rows #> # ℹ 10 more variables: DISHONB , INTELB , VOTE3 , #> # AGE , EDUC , GENDER , PARTY , .class , #> # .probability , .rownames dim(au2) #> [1] 1785 20"},{"path":"https://broom.tidymodels.org/dev/reference/augment.polr.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) polr object — augment.polr","title":"Augment data with information from a(n) polr object — augment.polr","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.polr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) polr object — augment.polr","text":"","code":"# S3 method for class 'polr' augment( x, data = model.frame(x), newdata = NULL, type.predict = c(\"class\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.polr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) polr object — augment.polr","text":"x polr object returned MASS::polr(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict type prediction compute, passed MASS:::predict.polr(). supports \"class\" moment. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.polr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) polr object — augment.polr","text":"","code":"# load libraries for models and data library(MASS) # fit model fit <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) # summarize model fit with tidiers tidy(fit, exponentiate = TRUE, conf.int = TRUE) #> #> Re-fitting to get Hessian #> # A tibble: 8 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 InflMedium 1.76 0.105 5.41 1.44 2.16 coefficie… #> 2 InflHigh 3.63 0.127 10.1 2.83 4.66 coefficie… #> 3 TypeApartment 0.564 0.119 -4.80 0.446 0.712 coefficie… #> 4 TypeAtrium 0.693 0.155 -2.36 0.511 0.940 coefficie… #> 5 TypeTerrace 0.336 0.151 -7.20 0.249 0.451 coefficie… #> 6 ContHigh 1.43 0.0955 3.77 1.19 1.73 coefficie… #> 7 Low|Medium 0.609 0.125 -3.97 NA NA scale #> 8 Medium|High 2.00 0.125 5.50 NA NA scale glance(fit) #> # A tibble: 1 × 7 #> edf logLik AIC BIC deviance df.residual nobs #> #> 1 8 -1740. 3495. 3539. 3479. 1673 1681 augment(fit, type.predict = \"class\") #> # A tibble: 72 × 6 #> Sat Infl Type Cont `(weights)` .fitted #> #> 1 Low Low Tower Low 21 Low #> 2 Medium Low Tower Low 21 Low #> 3 High Low Tower Low 28 Low #> 4 Low Medium Tower Low 34 High #> 5 Medium Medium Tower Low 22 High #> 6 High Medium Tower Low 36 High #> 7 Low High Tower Low 10 High #> 8 Medium High Tower Low 11 High #> 9 High High Tower Low 36 High #> 10 Low Low Apartment Low 61 Low #> # ℹ 62 more rows fit2 <- polr(factor(gear) ~ am + mpg + qsec, data = mtcars) tidy(fit, p.values = TRUE) #> #> Re-fitting to get Hessian #> p-values can presently only be returned for models that contain no #> categorical variables with more than two levels. #> # A tibble: 8 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 InflMedium 0.566 0.105 5.41 NA coefficient #> 2 InflHigh 1.29 0.127 10.1 NA coefficient #> 3 TypeApartment -0.572 0.119 -4.80 NA coefficient #> 4 TypeAtrium -0.366 0.155 -2.36 NA coefficient #> 5 TypeTerrace -1.09 0.151 -7.20 NA coefficient #> 6 ContHigh 0.360 0.0955 3.77 NA coefficient #> 7 Low|Medium -0.496 0.125 -3.97 NA scale #> 8 Medium|High 0.691 0.125 5.50 NA scale"},{"path":"https://broom.tidymodels.org/dev/reference/augment.prcomp.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) prcomp object — augment.prcomp","title":"Augment data with information from a(n) prcomp object — augment.prcomp","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.prcomp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) prcomp object — augment.prcomp","text":"","code":"# S3 method for class 'prcomp' augment(x, data = NULL, newdata, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.prcomp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) prcomp object — augment.prcomp","text":"x prcomp object returned stats::prcomp(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.prcomp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) prcomp object — augment.prcomp","text":"tibble::tibble containing original data along additional columns containing observation's projection PCA space.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) rlm object — augment.rlm","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"","code":"# S3 method for class 'rlm' augment(x, data = model.frame(x), newdata = NULL, se_fit = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"x rlm object returned MASS::rlm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .hat Diagonal hat matrix. .resid difference observed fitted values. .se.fit Standard errors fitted values. .sigma Estimated residual standard deviation corresponding observation dropped model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) rlm object — augment.rlm","text":"","code":"# load libraries for models and data library(MASS) # fit model r <- rlm(stack.loss ~ ., stackloss) # summarize model fit with tidiers tidy(r) #> # A tibble: 4 × 4 #> term estimate std.error statistic #> #> 1 (Intercept) -41.0 9.81 -4.18 #> 2 Air.Flow 0.829 0.111 7.46 #> 3 Water.Temp 0.926 0.303 3.05 #> 4 Acid.Conc. -0.128 0.129 -0.992 augment(r) #> # A tibble: 21 × 10 #> stack.loss Air.Flow Water.Temp Acid.Conc. .fitted .resid .hat .sigma #> #> 1 42 80 27 89 38.9 3.05 0.327 3.32 #> 2 37 80 27 88 39.1 -2.08 0.343 3.39 #> 3 37 75 25 90 32.8 4.18 0.155 3.26 #> 4 28 62 24 87 21.5 6.50 0.0713 3.01 #> 5 18 62 22 87 19.6 -1.65 0.0562 3.42 #> 6 18 62 23 87 20.6 -2.57 0.0835 3.38 #> 7 19 62 24 93 20.7 -1.73 0.230 3.42 #> 8 20 62 24 93 20.7 -0.731 0.230 3.44 #> 9 15 58 23 87 17.3 -2.25 0.155 3.40 #> 10 14 58 18 80 13.5 0.481 0.213 3.45 #> # ℹ 11 more rows #> # ℹ 2 more variables: .cooksd , .std.resid glance(r) #> # A tibble: 1 × 7 #> sigma converged logLik AIC BIC deviance nobs #> #> 1 2.44 TRUE -52.954 116. 121. 191. 21"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) rma object — augment.rma","title":"Augment data with information from a(n) rma object — augment.rma","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) rma object — augment.rma","text":"","code":"# S3 method for class 'rma' augment(x, interval = c(\"prediction\", \"confidence\"), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) rma object — augment.rma","text":"x rma object created metafor::rma(), metafor::rma.uni(), metafor::rma.glmm(), metafor::rma.mh(), metafor::rma.mv(), metafor::rma.peto(). interval rma.mv models, prediction intervals (\"prediction\", default) confidence intervals (\"confidence\") intervals returned? rma.uni models, prediction intervals always returned. rma.mh rma.peto models, confidence intervals always returned. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) rma object — augment.rma","text":"tibble::tibble() columns: .fitted Fitted predicted value. .lower Lower bound interval fitted values. .moderator meta-analysis, moderators used calculate predicted values. .moderator.level meta-analysis, level moderators used calculate predicted values. .resid difference observed fitted values. .se.fit Standard errors fitted values. .upper Upper bound interval fitted values. .observed observed values individual studies","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) rma object — augment.rma","text":"","code":"# load modeling library library(metafor) #> Loading required package: metadat #> Loading required package: numDeriv #> #> Loading the 'metafor' package (version 4.6-0). For an #> introduction to the package please type: help(metafor) #> #> Attaching package: ‘metafor’ #> The following object is masked from ‘package:car’: #> #> vif #> The following object is masked from ‘package:mclust’: #> #> hc # generate data and fit df <- escalc( measure = \"RR\", ai = tpos, bi = tneg, ci = cpos, di = cneg, data = dat.bcg ) meta_analysis <- rma(yi, vi, data = df, method = \"EB\") # summarize model fit with tidiers augment(meta_analysis) #> # A tibble: 13 × 6 #> .observed .fitted .se.fit .lower .upper .resid #> #> 1 -0.889 -0.801 0.411 -1.61 0.00524 -0.174 #> 2 -1.59 -1.26 0.354 -1.95 -0.561 -0.870 #> 3 -1.35 -0.990 0.437 -1.85 -0.134 -0.633 #> 4 -1.44 -1.40 0.138 -1.67 -1.13 -0.727 #> 5 -0.218 -0.287 0.212 -0.701 0.128 0.497 #> 6 -0.786 -0.785 0.0823 -0.946 -0.623 -0.0711 #> 7 -1.62 -1.25 0.370 -1.97 -0.523 -0.906 #> 8 0.0120 0.00301 0.0626 -0.120 0.126 0.727 #> 9 -0.469 -0.506 0.221 -0.939 -0.0740 0.246 #> 10 -1.37 -1.25 0.246 -1.73 -0.767 -0.656 #> 11 -0.339 -0.353 0.110 -0.568 -0.139 0.376 #> 12 0.446 -0.281 0.460 -1.18 0.621 1.16 #> 13 -0.0173 -0.145 0.244 -0.623 0.333 0.698"},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) glmrob object — augment.glmrob","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"","code":"# S3 method for class 'glmrob' augment( x, data = model.frame(x), newdata = NULL, type.predict = c(\"link\", \"response\"), type.residuals = c(\"deviance\", \"pearson\"), se_fit = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"x glmrob object returned robustbase::glmrob(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.glmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) glmrob object — augment.glmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> #> Attaching package: ‘robustbase’ #> The following object is masked from ‘package:survival’: #> #> heart #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) lmrob object — augment.lmrob","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"","code":"# S3 method for class 'lmrob' augment(x, data = model.frame(x), newdata = NULL, se_fit = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"x lmrob object returned robustbase::lmrob(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. se_fit Logical indicating whether .se.fit column added augmented output. models, calculation can somewhat time-consuming. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.robustbase.lmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) lmrob object — augment.lmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) rq object — augment.rq","title":"Augment data with information from a(n) rq object — augment.rq","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) rq object — augment.rq","text":"","code":"# S3 method for class 'rq' augment(x, data = model.frame(x), newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) rq object — augment.rq","text":"x rq object returned quantreg::rq(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Arguments passed quantreg::predict.rq object object class rq rqs rq.process produced rq interval type interval desired: default 'none', set 'confidence' function returns matrix predictions point predictions 'newdata' points well lower upper confidence limits. level converage probability 'confidence' intervals. type predict.rq, method 'confidence' intervals, desired. 'percentile' one bootstrap methods used generate percentile intervals prediction, 'direct' version Portnoy Zhou (1998) method used, otherwise estimated covariance matrix parameter estimates used. arguments determine choice bootstrap method covariance matrix estimate can passed via ... argument. predict.rqs predict.rq.process stepfun = TRUE, type \"Qhat\", \"Fhat\" \"fhat\" depending whether user like estimates conditional quantile, distribution density functions respectively. noted two former estimates can monotonized function rearrange. \"fhat\" option invoked, list conditional density functions returned based Silverman's adaptive kernel method implemented akj approxfun. na.action function determining done missing values 'newdata'. default predict 'NA'.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) rq object — augment.rq","text":"Depending arguments passed predict.rq via ..., confidence interval also calculated fitted values resulting columns .lower .upper. provide confidence intervals data specified via newdata argument.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) rq object — augment.rq","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values. .tau Quantile.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) rq object — augment.rq","text":"","code":"# load modeling library and data library(quantreg) #> Loading required package: SparseM #> #> Attaching package: ‘SparseM’ #> The following object is masked from ‘package:Matrix’: #> #> det #> #> Attaching package: ‘quantreg’ #> The following object is masked from ‘package:survival’: #> #> untangle.specials data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.124 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -78.76986 160. 161. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 0.393 0.696 0.269 0.124 0.5 #> 2 0.458 0.266 0.334 0.124 0.5 #> 3 -1.22 0.660 -1.34 0.124 0.5 #> 4 -1.12 0.212 -1.25 0.124 0.5 #> 5 0.993 0.00527 0.869 0.124 0.5 #> 6 -1.83 0.103 -1.96 0.124 0.5 #> 7 0.124 0.287 0 0.124 0.5 #> 8 0.591 0.444 0.467 0.124 0.5 #> 9 0.805 0.693 0.681 0.124 0.5 #> 10 0.00754 0.0209 -0.116 0.124 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) rqs object — augment.rqs","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"","code":"# S3 method for class 'rqs' augment(x, data = model.frame(x), newdata, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"x rqs object returned quantreg::rq(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Arguments passed quantreg::predict.rq object object class rq rqs rq.process produced rq interval type interval desired: default 'none', set 'confidence' function returns matrix predictions point predictions 'newdata' points well lower upper confidence limits. level converage probability 'confidence' intervals. type predict.rq, method 'confidence' intervals, desired. 'percentile' one bootstrap methods used generate percentile intervals prediction, 'direct' version Portnoy Zhou (1998) method used, otherwise estimated covariance matrix parameter estimates used. arguments determine choice bootstrap method covariance matrix estimate can passed via ... argument. predict.rqs predict.rq.process stepfun = TRUE, type \"Qhat\", \"Fhat\" \"fhat\" depending whether user like estimates conditional quantile, distribution density functions respectively. noted two former estimates can monotonized function rearrange. \"fhat\" option invoked, list conditional density functions returned based Silverman's adaptive kernel method implemented akj approxfun. na.action function determining done missing values 'newdata'. default predict 'NA'.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"Depending arguments passed predict.rq via ..., confidence interval also calculated fitted values resulting columns .lower .upper. provide confidence intervals data specified via newdata argument.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.rqs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) rqs object — augment.rqs","text":"","code":"# load modeling library and data library(quantreg) data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.0744 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -72.9869 148. 150. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 1.25 0.192 1.18 0.0744 0.5 #> 2 0.458 0.321 0.383 0.0744 0.5 #> 3 0.765 0.0297 0.691 0.0744 0.5 #> 4 0.392 0.870 0.317 0.0744 0.5 #> 5 -0.547 0.647 -0.622 0.0744 0.5 #> 6 -0.468 0.319 -0.542 0.0744 0.5 #> 7 -1.11 0.293 -1.18 0.0744 0.5 #> 8 0.786 0.669 0.711 0.0744 0.5 #> 9 -0.648 0.408 -0.722 0.0744 0.5 #> 10 1.07 0.664 1.00 0.0744 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) spatialreg object — augment.sarlm","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"","code":"# S3 method for class 'sarlm' augment(x, data = x$X, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"x object returned spatialreg::lagsarlm() spatialreg::errorsarlm(). data Ignored, included internal consistency. See details . ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"predict method sarlm objects assumes response known. See ?predict.sarlm discussion. result, since original data can recovered fit object, method currently take data newdata arguments.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.sarlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) spatialreg object — augment.sarlm","text":"","code":"# load libraries for models and data library(spatialreg) #> Loading required package: spData #> To access larger datasets in this package, install the #> spDataLarge package with: `install.packages('spDataLarge', #> repos='https://nowosad.github.io/drat/', type='source')` #> Loading required package: sf #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE library(spdep) #> #> Attaching package: ‘spdep’ #> The following objects are masked from ‘package:spatialreg’: #> #> get.ClusterOption, get.VerboseOption, get.ZeroPolicyOption, #> get.coresOption, get.mcOption, set.ClusterOption, #> set.VerboseOption, set.ZeroPolicyOption, set.coresOption, #> set.mcOption # load data data(oldcol, package = \"spdep\") listw <- nb2listw(COL.nb, style = \"W\") # fit model crime_sar <- lagsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw = listw, method = \"eigen\" ) # summarize model fit with tidiers tidy(crime_sar) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 tidy(crime_sar, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 0.200 0.662 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 31.0 59.1 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 -1.63 -0.434 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 -0.439 -0.0925 glance(crime_sar) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 375. 384. 4679. -182. 49 augment(crime_sar) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.6 -3.84 #> 2 1 4.48 33.2 32.4 46.6 -14.2 #> 3 1 11.3 37.1 38.4 41.4 -2.97 #> 4 1 8.44 75 0.178 37.9 -37.7 #> 5 1 19.5 80.5 15.7 14.2 1.54 #> 6 1 16.0 26.4 30.6 34.3 -3.66 #> 7 1 11.3 23.2 50.7 44.7 5.99 #> 8 1 16.0 28.8 26.1 38.4 -12.3 #> 9 1 9.87 18 48.6 51.7 -3.12 #> 10 1 13.6 96.4 34.0 16.3 17.7 #> # ℹ 39 more rows # fit another model crime_sem <- errorsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sem) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 59.9 5.37 11.2 0 #> 2 INC -0.941 0.331 -2.85 0.00441 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 #> 4 lambda 0.562 0.134 4.20 0.0000271 tidy(crime_sem, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 59.9 5.37 11.2 0 49.4 70.4 #> 2 INC -0.941 0.331 -2.85 0.00441 -1.59 -0.293 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 -0.480 -0.125 #> 4 lambda 0.562 0.134 4.20 0.0000271 0.299 0.824 glance(crime_sem) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.658 377. 386. 4683. -183. 49 augment(crime_sem) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.5 -3.70 #> 2 1 4.48 33.2 32.4 44.9 -12.5 #> 3 1 11.3 37.1 38.4 38.2 0.223 #> 4 1 8.44 75 0.178 35.0 -34.8 #> 5 1 19.5 80.5 15.7 13.3 2.45 #> 6 1 16.0 26.4 30.6 35.0 -4.33 #> 7 1 11.3 23.2 50.7 42.3 8.41 #> 8 1 16.0 28.8 26.1 39.4 -13.3 #> 9 1 9.87 18 48.6 49.3 -0.721 #> 10 1 13.6 96.4 34.0 16.6 17.4 #> # ℹ 39 more rows # fit another model crime_sac <- sacsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sac) #> # A tibble: 5 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.368 0.197 1.87 0.0613 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 #> 3 INC -1.03 0.326 -3.14 0.00167 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 #> 5 lambda 0.167 0.297 0.562 0.574 tidy(crime_sac, conf.int = TRUE) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.368 0.197 1.87 0.0613 -0.0174 0.754 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 28.4 67.2 #> 3 INC -1.03 0.326 -3.14 0.00167 -1.67 -0.386 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 -0.458 -0.105 #> 5 lambda 0.167 0.297 0.562 0.574 -0.415 0.748 glance(crime_sac) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 376. 388. 4685. -182. 49 augment(crime_sac) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.2 -3.37 #> 2 1 4.48 33.2 32.4 46.4 -14.0 #> 3 1 11.3 37.1 38.4 40.4 -2.00 #> 4 1 8.44 75 0.178 37.5 -37.3 #> 5 1 19.5 80.5 15.7 13.5 2.25 #> 6 1 16.0 26.4 30.6 34.4 -3.74 #> 7 1 11.3 23.2 50.7 44.1 6.60 #> 8 1 16.0 28.8 26.1 39.0 -12.9 #> 9 1 9.87 18 48.6 51.5 -2.93 #> 10 1 13.6 96.4 34.0 15.8 18.2 #> # ℹ 39 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) smooth.spline object — augment.smooth.spline","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"","code":"# S3 method for class 'smooth.spline' augment(x, data = x$data, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"x smooth.spline object returned stats::smooth.spline(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.smooth.spline.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) smooth.spline object — augment.smooth.spline","text":"","code":"# fit model spl <- smooth.spline(mtcars$wt, mtcars$mpg, df = 4) # summarize model fit with tidiers augment(spl, mtcars) #> # A tibble: 32 × 13 #> mpg cyl disp hp drat wt qsec vs am gear carb #> #> 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 #> 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 #> 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 #> 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 #> 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 #> 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 #> 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 #> 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 #> 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 #> 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 #> # ℹ 22 more rows #> # ℹ 2 more variables: .fitted , .resid # calls original columns x and y augment(spl) #> # A tibble: 32 × 5 #> x y w .fitted .resid #> #> 1 2.62 21 1 22.9 -1.87 #> 2 2.88 21 1 21.1 -0.117 #> 3 2.32 22.8 1 25.3 -2.48 #> 4 3.22 21.4 1 19.1 2.33 #> 5 3.44 18.7 1 17.8 0.928 #> 6 3.46 18.1 1 17.7 0.437 #> 7 3.57 14.3 1 17.1 -2.79 #> 8 3.19 24.4 1 19.2 5.19 #> 9 3.15 22.8 1 19.5 3.35 #> 10 3.44 19.2 1 17.8 1.43 #> # ℹ 22 more rows library(ggplot2) ggplot(augment(spl, mtcars), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted))"},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) speedlm object — augment.speedlm","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"","code":"# S3 method for class 'speedlm' augment(x, data = model.frame(x), newdata = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"x speedlm object returned speedglm::speedlm(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.speedlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) speedlm object — augment.speedlm","text":"","code":"# load modeling library library(speedglm) #> Loading required package: biglm #> Loading required package: DBI # fit model mod <- speedlm(mpg ~ wt + qsec, data = mtcars, fitted = TRUE) # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 11 #> r.squared adj.r.squared statistic p.value df logLik AIC BIC #> #> 1 0.826 0.814 69.0 9.39e-12 3 -74.4 157. 163. #> # ℹ 3 more variables: deviance , df.residual , nobs augment(mod) #> # A tibble: 32 × 6 #> .rownames mpg wt qsec .fitted .resid #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 #> 5 Hornet Sportabout 18.7 3.44 17.0 18.2 0.504 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 #> # ℹ 22 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/augment.stl.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) stl object — augment.stl","title":"Augment data with information from a(n) stl object — augment.stl","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.stl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) stl object — augment.stl","text":"","code":"# S3 method for class 'stl' augment(x, data = NULL, weights = TRUE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/augment.stl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) stl object — augment.stl","text":"x stl object returned stats::stl(). data Ignored, included consistency augment generic signature . weights Logical indicating whether include robust weights output. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.stl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) stl object — augment.stl","text":"tibble::tibble one row observation original times series: .seasonal seasonal component decomposition. .trend trend component decomposition. .remainder remainder, \"random\" component decomposition. .weight final robust weights, requested. .seasadj seasonally adjusted (\"deseasonalised\") series.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment data with information from a(n) survreg object — augment.survreg","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"Augment accepts model object dataset adds information observation dataset. commonly, includes predicted values .fitted column, residuals .resid column, standard errors fitted values .se.fit column. New columns always begin . prefix avoid overwriting columns original dataset. Users may pass data augment via either data argument newdata argument. user passes data data argument, must exactly data used fit model object. Pass datasets newdata augment data used model fitting. still requires least predictor variable columns used fit model present. original outcome variable used fit model included newdata, .resid column included output. Augment often behave differently depending whether data newdata given. often information associated training observations (influences related) measures meaningfully defined new observations. convenience, many augment methods provide default data arguments, augment(fit) return augmented training data. cases, augment tries reconstruct original data based model object varying degrees success. augmented dataset always returned tibble::tibble number rows passed dataset. means passed data must coercible tibble. predictor enters model part matrix covariates, model formula uses splines::ns(), stats::poly(), survival::Surv(), represented matrix column. process defining behaviors models fit various na.action arguments, make guarantees behavior data missing time.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"","code":"# S3 method for class 'survreg' augment( x, data = model.frame(x), newdata = NULL, type.predict = \"response\", type.residuals = \"response\", ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"x survreg object returned survival::survreg(). data base::data.frame tibble::tibble() containing original data used produce object x. Defaults stats::model.frame(x) augment(my_fit) returns augmented original data. pass new data data argument. Augment report information influence cooks distance data passed data argument. measures defined original training data. newdata base::data.frame() tibble::tibble() containing original predictors used create x. Defaults NULL, indicating nothing passed newdata. newdata specified, data argument ignored. type.predict Character indicating type prediction use. Passed type argument stats::predict() generic. Allowed arguments vary model class, sure read predict.my_class documentation. type.residuals Character indicating type residuals use. Passed type argument stats::residuals() generic. Allowed arguments vary model class, sure read residuals.my_class documentation. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"tibble::tibble() columns: .fitted Fitted predicted value. .resid difference observed fitted values. .se.fit Standard errors fitted values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment.survreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment data with information from a(n) survreg object — augment.survreg","text":"","code":"# load libraries for models and data library(survival) # fit model sr <- survreg( Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = \"exponential\" ) # summarize model fit with tidiers + visualization tidy(sr) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 6.96 1.32 5.27 0.000000139 #> 2 ecog.ps -0.433 0.587 -0.738 0.461 #> 3 rx 0.582 0.587 0.991 0.322 augment(sr, ovarian) #> # A tibble: 26 × 9 #> futime fustat age resid.ds rx ecog.ps .fitted .se.fit .resid #> #> 1 59 1 72.3 2 1 1 1224. 639. -1165. #> 2 115 1 74.5 2 1 1 1224. 639. -1109. #> 3 156 1 66.5 2 1 2 794. 350. -638. #> 4 421 0 53.4 2 2 1 2190. 1202. -1769. #> 5 431 1 50.3 2 1 1 1224. 639. -793. #> 6 448 0 56.4 1 1 2 794. 350. -346. #> 7 464 1 56.9 2 2 2 1420. 741. -956. #> 8 475 1 59.9 2 2 2 1420. 741. -945. #> 9 477 0 64.2 2 1 1 1224. 639. -747. #> 10 563 1 55.2 1 2 2 1420. 741. -857. #> # ℹ 16 more rows glance(sr) #> # A tibble: 1 × 9 #> iter df statistic logLik AIC BIC df.residual nobs p.value #> #> 1 4 3 1.67 -97.2 200. 204. 23 26 0.434 # coefficient plot td <- tidy(sr, conf.int = TRUE) library(ggplot2) ggplot(td, aes(estimate, term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/augment_columns.html","id":null,"dir":"Reference","previous_headings":"","what":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","title":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","text":"augment_columns intended use internals augment methods exported developers extending broom package. Please instead use augment() appropriately make use functionality augment_columns().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment_columns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","text":"","code":"augment_columns( x, data, newdata = NULL, type, type.predict = type, type.residuals = type, se.fit = TRUE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/augment_columns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","text":"x model data original data onto columns added newdata new data predict , optional type Type prediction residuals compute type.predict Type prediction compute; default type type.residuals Type residuals compute; default type se.fit Value pass predict's se.fit, NULL value. Ignored model types accept se.fit argument ... extra arguments (used)","code":""},{"path":"https://broom.tidymodels.org/dev/reference/augment_columns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add fitted values, residuals, and other common outputs to an augment call — augment_columns","text":"Note , case residuals() influence() generic implemented supplied model x, function fail quietly.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/bootstrap.html","id":null,"dir":"Reference","previous_headings":"","what":"Set up bootstrap replicates of a dplyr operation — bootstrap","title":"Set up bootstrap replicates of a dplyr operation — bootstrap","text":"bootstrap() function deprecated removed upcoming release broom. tidy resampling, please use rsample package instead. Functionality longer supported method.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/bootstrap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set up bootstrap replicates of a dplyr operation — bootstrap","text":"","code":"bootstrap(df, m, by_group = FALSE)"},{"path":"https://broom.tidymodels.org/dev/reference/bootstrap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set up bootstrap replicates of a dplyr operation — bootstrap","text":"df data frame m number bootstrap replicates perform by_group TRUE, bootstrap within group df grouped tibble.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/bootstrap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set up bootstrap replicates of a dplyr operation — bootstrap","text":"code originates Hadley Wickham (small corrections) : https://github.com/tidyverse/dplyr/issues/269","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/broom.html","id":null,"dir":"Reference","previous_headings":"","what":"broom: Convert Statistical Objects into Tidy Tibbles — broom","title":"broom: Convert Statistical Objects into Tidy Tibbles — broom","text":"Convert statistical analysis objects R tidy tibbles, can easily combined, reshaped otherwise processed tools like dplyr, tidyr ggplot2. package provides three S3 generics: tidy, summarizes model's statistical findings coefficients regression; augment, adds columns original data predictions, residuals cluster assignments; glance, provides one-row summary model-level statistics.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/broom.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"broom: Convert Statistical Objects into Tidy Tibbles — broom","text":"Maintainer: Simon Couch simon.couch@posit.co (ORCID) Authors: David Robinson admiral.david@gmail.com Alex Hayes alexpghayes@gmail.com (ORCID) contributors: Posit Software, PBC [copyright holder, funder] Indrajeet Patil patilindrajeet.science@gmail.com (ORCID) [contributor] Derek Chiu dchiu@bccrc.ca [contributor] Matthieu Gomez mattg@princeton.edu [contributor] Boris Demeshev boris.demeshev@gmail.com [contributor] Dieter Menne dieter.menne@menne-biomed.de [contributor] Benjamin Nutter nutter@battelle.org [contributor] Luke Johnston luke.johnston@mail.utoronto.ca [contributor] Ben Bolker bolker@mcmaster.ca [contributor] Francois Briatte f.briatte@gmail.com [contributor] Jeffrey Arnold jeffrey.arnold@gmail.com [contributor] Jonah Gabry jsg2201@columbia.edu [contributor] Luciano Selzer luciano.selzer@gmail.com [contributor] Gavin Simpson ucfagls@gmail.com [contributor] Jens Preussner jens.preussner@mpi-bn.mpg.de [contributor] Jay Hesselberth jay.hesselberth@gmail.com [contributor] Hadley Wickham hadley@posit.co [contributor] Matthew Lincoln matthew.d.lincoln@gmail.com [contributor] Alessandro Gasparini ag475@leicester.ac.uk [contributor] Lukasz Komsta lukasz.komsta@umlub.pl [contributor] Frederick Novometsky [contributor] Wilson Freitas [contributor] Michelle Evans [contributor] Jason Cory Brunson cornelioid@gmail.com [contributor] Simon Jackson drsimonjackson@gmail.com [contributor] Ben Whalley ben.whalley@plymouth.ac.uk [contributor] Karissa Whiting karissa.whiting@gmail.com [contributor] Yves Rosseel yrosseel@gmail.com [contributor] Michael Kuehn mkuehn10@gmail.com [contributor] Jorge Cimentada cimentadaj@gmail.com [contributor] Erle Holgersen erle.holgersen@gmail.com [contributor] Karl Dunkle Werner (ORCID) [contributor] Ethan Christensen christensen.ej@gmail.com [contributor] Steven Pav shabbychef@gmail.com [contributor] Paul PJ pjpaul.stephens@gmail.com [contributor] Ben Schneider benjamin.julius.schneider@gmail.com [contributor] Patrick Kennedy pkqstr@protonmail.com [contributor] Lily Medina lilymiru@gmail.com [contributor] Brian Fannin captain@pirategrunt.com [contributor] Jason Muhlenkamp jason.muhlenkamp@gmail.com [contributor] Matt Lehman [contributor] Bill Denney wdenney@humanpredictions.com (ORCID) [contributor] Nic Crane [contributor] Andrew Bates [contributor] Vincent Arel-Bundock vincent.arel-bundock@umontreal.ca (ORCID) [contributor] Hideaki Hayashi [contributor] Luis Tobalina [contributor] Annie Wang anniewang.uc@gmail.com [contributor] Wei Yang Tham weiyang.tham@gmail.com [contributor] Clara Wang clara.wang.94@gmail.com [contributor] Abby Smith als1@u.northwestern.edu (ORCID) [contributor] Jasper Cooper jaspercooper@gmail.com (ORCID) [contributor] E Auden Krauska krauskae@gmail.com (ORCID) [contributor] Alex Wang x249wang@uwaterloo.ca [contributor] Malcolm Barrett malcolmbarrett@gmail.com (ORCID) [contributor] Charles Gray charlestigray@gmail.com (ORCID) [contributor] Jared Wilber [contributor] Vilmantas Gegzna GegznaV@gmail.com (ORCID) [contributor] Eduard Szoecs eduardszoecs@gmail.com [contributor] Frederik Aust frederik.aust@uni-koeln.de (ORCID) [contributor] Angus Moore angusmoore9@gmail.com [contributor] Nick Williams ntwilliams.personal@gmail.com [contributor] Marius Barth marius.barth.uni.koeln@gmail.com (ORCID) [contributor] Bruna Wundervald brunadaviesw@gmail.com (ORCID) [contributor] Joyce Cahoon joyceyu48@gmail.com (ORCID) [contributor] Grant McDermott grantmcd@uoregon.edu (ORCID) [contributor] Kevin Zarca kevin.zarca@gmail.com [contributor] Shiro Kuriwaki shirokuriwaki@gmail.com (ORCID) [contributor] Lukas Wallrich lukas.wallrich@gmail.com (ORCID) [contributor] James Martherus james@martherus.com (ORCID) [contributor] Chuliang Xiao cxiao@umich.edu (ORCID) [contributor] Joseph Larmarange joseph@larmarange.net [contributor] Max Kuhn max@posit.co [contributor] Michal Bojanowski michal2992@gmail.com [contributor] Hakon Malmedal hmalmedal@gmail.com [contributor] Clara Wang [contributor] Sergio Oller sergioller@gmail.com [contributor] Luke Sonnet luke.sonnet@gmail.com [contributor] Jim Hester jim.hester@posit.co [contributor] Ben Schneider benjamin.julius.schneider@gmail.com [contributor] Bernie Gray bfgray3@gmail.com (ORCID) [contributor] Mara Averick mara@posit.co [contributor] Aaron Jacobs atheriel@gmail.com [contributor] Andreas Bender bender..R@gmail.com [contributor] Sven Templer sven.templer@gmail.com [contributor] Paul-Christian Buerkner paul.buerkner@gmail.com [contributor] Matthew Kay mjskay@umich.edu [contributor] Erwan Le Pennec lepennec@gmail.com [contributor] Johan Junkka johan.junkka@umu.se [contributor] Hao Zhu haozhu233@gmail.com [contributor] Benjamin Soltoff soltoffbc@uchicago.edu [contributor] Zoe Wilkinson Saldana zoewsaldana@gmail.com [contributor] Tyler Littlefield tylurp1@gmail.com [contributor] Charles T. Gray charlestigray@gmail.com [contributor] Shabbh E. Banks [contributor] Serina Robinson robi0916@umn.edu [contributor] Roger Bivand Roger.Bivand@nhh.[contributor] Riinu Ots riinuots@gmail.com [contributor] Nicholas Williams ntwilliams.personal@gmail.com [contributor] Nina Jakobsen [contributor] Michael Weylandt michael.weylandt@gmail.com [contributor] Lisa Lendway llendway@macalester.edu [contributor] Karl Hailperin khailper@gmail.com [contributor] Josue Rodriguez jerrodriguez@ucdavis.edu [contributor] Jenny Bryan jenny@posit.co [contributor] Chris Jarvis Christopher1.jarvis@gmail.com [contributor] Greg Macfarlane gregmacfarlane@gmail.com [contributor] Brian Mannakee bmannakee@gmail.com [contributor] Drew Tyre atyre2@unl.edu [contributor] Shreyas Singh shreyas.singh.298@gmail.com [contributor] Laurens Geffert laurensgeffert@gmail.com [contributor] Hong Ooi hongooi@microsoft.com [contributor] Henrik Bengtsson henrikb@braju.com [contributor] Eduard Szocs eduardszoecs@gmail.com [contributor] David Hugh-Jones davidhughjones@gmail.com [contributor] Matthieu Stigler Matthieu.Stigler@gmail.com [contributor] Hugo Tavares hm533@cam.ac.uk (ORCID) [contributor] R. Willem Vervoort Willemvervoort@gmail.com [contributor] Brenton M. Wiernik brenton@wiernik.org [contributor] Josh Yamamoto joshuayamamoto5@gmail.com [contributor] Jasme Lee [contributor] Taren Sanders taren.sanders@acu.edu.au (ORCID) [contributor] Ilaria Prosdocimi prosdocimi.ilaria@gmail.com (ORCID) [contributor] Daniel D. Sjoberg danield.sjoberg@gmail.com (ORCID) [contributor] Alex Reinhart areinhar@stat.cmu.edu (ORCID) [contributor]","code":""},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"function now deprecated removed future release broom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"","code":"confint_tidy(x, conf.level = 0.95, func = stats::confint, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"x model object confint() can calculated conf.level confidence level func function compute confidence interval x. Calling func(x, level = conf.level, ...) must return object coercible tibble. dataframe like object columns corresponding lower upper bounds confidence interval. ... extra arguments passed confint","code":""},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"tibble two columns: conf.low conf.high.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/confint_tidy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"(Deprecated) Calculate confidence interval as a tidy data frame — confint_tidy","text":"Return confidence interval tidy data frame. directly wraps confint() function, ensures follows broom conventions: column names conf.low conf.high, row names. confint_tidy","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidiers for data.frame objects — data.frame_tidiers","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"Data frame tidiers deprecated removed upcoming release broom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"","code":"# S3 method for class 'data.frame' tidy(x, ..., na.rm = TRUE, trim = 0.1) # S3 method for class 'data.frame' augment(x, data, ...) # S3 method for class 'data.frame' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"Skew Kurtosis functions adapted implementations moments package: Lukasz Komsta Frederick Novomestky (2015). moments: Moments, cumulants, skewness, kurtosis related tests. R package version 0.14. https://CRAN.R-project.org/package=moments","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"x data.frame ... Additional arguments methods. na.rm logical value indicating whether NA values stripped computation proceeds. trim fraction (0 0.5) observations trimmed end x mean computed. Passed trim argument mean data data, used","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"tidy.data.frame produces data frame one row per original column, containing summary statistics : column name original column n Number valid (non-NA) values mean mean sd standard deviation median median trimmed trimmed mean, trim defaulting .1 mad median absolute deviation (median) min minimum value max maximum value range range skew skew kurtosis kurtosis se standard error glance returns one-row data.frame nrow number rows ncol number columns complete.obs number rows missing values na.fraction fraction values across rows columns missing","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"perform tidy summaries data.frame objects. tidy produces summary statistics column, glance simply reports number rows columns. Note augment.data.frame throw error.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"David Robinson, Benjamin Nutter","code":""},{"path":"https://broom.tidymodels.org/dev/reference/data.frame_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidiers for data.frame objects — data.frame_tidiers","text":"","code":"td <- tidy(mtcars) #> Warning: Data frame tidiers are deprecated and will be removed in an upcoming release of broom. td #> # A tibble: 11 × 13 #> column n mean sd median trimmed mad min max range #> #> 1 mpg 32 20.1 6.03 19.2 19.7 3.65 10.4 33.9 23.5 #> 2 cyl 32 6.19 1.79 6 6.23 2 4 8 4 #> 3 disp 32 231. 124. 196. 223. 94.8 71.1 472 401. #> 4 hp 32 147. 68.6 123 141. 52 52 335 283 #> 5 drat 32 3.60 0.535 3.70 3.58 0.475 2.76 4.93 2.17 #> 6 wt 32 3.22 0.978 3.32 3.15 0.517 1.51 5.42 3.91 #> 7 qsec 32 17.8 1.79 17.7 17.8 0.955 14.5 22.9 8.4 #> 8 vs 32 0.438 0.504 0 0.423 0 0 1 1 #> 9 am 32 0.406 0.499 0 0.385 0 0 1 1 #> 10 gear 32 3.69 0.738 4 3.62 1 3 5 2 #> 11 carb 32 2.81 1.62 2 2.65 1 1 8 7 #> # ℹ 3 more variables: skew , kurtosis , se glance(mtcars) #> Warning: Data frame tidiers are deprecated and will be removed in an upcoming release of broom. #> # A tibble: 1 × 4 #> nrow ncol complete.obs na.fraction #> #> 1 32 11 32 0 library(ggplot2) # compare mean and standard deviation ggplot(td, aes(mean, sd)) + geom_point() + geom_text(aes(label = column), hjust = 1, vjust = 1) + scale_x_log10() + scale_y_log10() + geom_abline()"},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"models single component, tidy() glance() methods identical. Please see documentation methods.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"","code":"# S3 method for class 'durbinWatsonTest' tidy(x, ...) # S3 method for class 'durbinWatsonTest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"x object class durbinWatsonTest created call car::durbinWatsonTest(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"tibble::tibble() columns: alternative Alternative hypothesis (character). autocorrelation Autocorrelation. p.value two-sided p-value associated observed statistic. statistic Test statistic Durbin-Watson test. method Always `Durbin-Watson Test`.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/durbinWatsonTest_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy/glance a(n) durbinWatsonTest object — durbinWatsonTest_tidiers","text":"","code":"# load modeling library library(car) # fit model dw <- durbinWatsonTest(lm(mpg ~ wt, data = mtcars)) # summarize model fit with tidiers tidy(dw) #> # A tibble: 1 × 5 #> statistic p.value autocorrelation method alternative #> #> 1 1.25 0.0200 0.363 Durbin-Watson Test two.sided # same output for all durbinWatsonTests glance(dw) #> # A tibble: 1 × 5 #> statistic p.value autocorrelation method alternative #> #> 1 1.25 0.0200 0.363 Durbin-Watson Test two.sided"},{"path":"https://broom.tidymodels.org/dev/reference/finish_glance.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","title":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","text":"function now deprecated favor using custom logic appropriate nobs() method.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/finish_glance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","text":"","code":"finish_glance(ret, x)"},{"path":"https://broom.tidymodels.org/dev/reference/finish_glance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","text":"ret one-row data frame (partially complete glance) x prediction model","code":""},{"path":"https://broom.tidymodels.org/dev/reference/finish_glance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction — finish_glance","text":"one-row data frame additional columns added, logLik log likelihoods AIC Akaike Information Criterion BIC Bayesian Information Criterion deviance deviance df.residual residual degrees freedom","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/fix_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","title":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","text":"function deprecated broom 0.7.0 removed future release. Please see tibble::as_tibble.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/fix_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","text":"","code":"fix_data_frame(x, newnames = NULL, newcol = \"term\")"},{"path":"https://broom.tidymodels.org/dev/reference/fix_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","text":"x data.frame matrix newnames new column names, including rownames newcol name new rownames column","code":""},{"path":"https://broom.tidymodels.org/dev/reference/fix_data_frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ensure an object is a data frame, with rownames moved into a column — fix_data_frame","text":"data.frame, rownames moved column new column names assigned","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) Arima object — glance.Arima","title":"Glance at a(n) Arima object — glance.Arima","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) Arima object — glance.Arima","text":"","code":"# S3 method for class 'Arima' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) Arima object — glance.Arima","text":"x object class Arima created stats::arima(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) Arima object — glance.Arima","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Arima.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) Arima object — glance.Arima","text":"","code":"# fit model fit <- arima(lh, order = c(1, 0, 0)) # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 3 #> term estimate std.error #> #> 1 ar1 0.574 0.116 #> 2 intercept 2.41 0.147 glance(fit) #> # A tibble: 1 × 5 #> sigma logLik AIC BIC nobs #> #> 1 0.444 -29.4 64.8 70.4 48"},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) Mclust object — glance.Mclust","title":"Glance at a(n) Mclust object — glance.Mclust","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) Mclust object — glance.Mclust","text":"","code":"# S3 method for class 'Mclust' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) Mclust object — glance.Mclust","text":"x Mclust object return mclust::Mclust(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) Mclust object — glance.Mclust","text":"tibble::tibble() exactly one row columns: BIC Bayesian Information Criterion model. df Degrees freedom used model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. model string denoting model type optimal BIC G Number mixture components optimal model hypvol model contains noise component, value hypervolume parameter. Otherwise `NA`.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.Mclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) Mclust object — glance.Mclust","text":"","code":"# load library for models and data library(mclust) # load data manipulation libraries library(dplyr) library(tibble) library(purrr) library(tidyr) set.seed(27) centers <- tibble( cluster = factor(1:3), # number points in each cluster num_points = c(100, 150, 50), # x1 coordinate of cluster center x1 = c(5, 0, -3), # x2 coordinate of cluster center x2 = c(-1, 1, -2) ) points <- centers %>% mutate( x1 = map2(num_points, x1, rnorm), x2 = map2(num_points, x2, rnorm) ) %>% select(-num_points, -cluster) %>% unnest(c(x1, x2)) # fit model m <- Mclust(points) # summarize model fit with tidiers tidy(m) #> # A tibble: 3 × 6 #> component size proportion variance mean.x1 mean.x2 #> #> 1 1 101 0.335 1.12 5.01 -1.04 #> 2 2 150 0.503 1.12 0.0594 1.00 #> 3 3 49 0.161 1.12 -3.20 -2.06 augment(m, points) #> # A tibble: 300 × 4 #> x1 x2 .class .uncertainty #> #> 1 6.91 -2.74 1 3.98e-11 #> 2 6.14 -2.45 1 1.99e- 9 #> 3 4.24 -0.946 1 1.47e- 4 #> 4 3.54 0.287 1 2.94e- 2 #> 5 3.91 0.408 1 7.48e- 3 #> 6 5.30 -1.58 1 4.22e- 7 #> 7 5.01 -1.77 1 1.06e- 6 #> 8 6.16 -1.68 1 7.64e- 9 #> 9 7.13 -2.17 1 4.16e-11 #> 10 5.24 -2.42 1 1.16e- 7 #> # ℹ 290 more rows glance(m) #> # A tibble: 1 × 7 #> model G BIC logLik df hypvol nobs #> #> 1 EII 3 -2402. -1175. 9 NA 300"},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) aareg object — glance.aareg","title":"Glance at a(n) aareg object — glance.aareg","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) aareg object — glance.aareg","text":"","code":"# S3 method for class 'aareg' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) aareg object — glance.aareg","text":"x aareg object returned survival::aareg(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) aareg object — glance.aareg","text":"tibble::tibble() exactly one row columns: df Degrees freedom used model. nobs Number observations used. p.value P-value corresponding test statistic. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) aareg object — glance.aareg","text":"","code":"# load libraries for models and data library(survival) # fit model afit <- aareg( Surv(time, status) ~ age + sex + ph.ecog, data = lung, dfbeta = TRUE ) # summarize model fit with tidiers tidy(afit) #> # A tibble: 4 × 7 #> term estimate statistic std.error robust.se statistic.z p.value #> #> 1 Intercept 0.00505 0.00587 0.00474 0.00477 1.23 0.219 #> 2 age 0.0000401 0.0000715 0.0000723 0.0000700 1.02 0.307 #> 3 sex -0.00316 -0.00403 0.00122 0.00123 -3.28 0.00103 #> 4 ph.ecog 0.00301 0.00367 0.00102 0.00102 3.62 0.000299"},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) anova object — glance.anova","title":"Glance at a(n) anova object — glance.anova","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) anova object — glance.anova","text":"","code":"# S3 method for class 'anova' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) anova object — glance.anova","text":"x anova object, created stats::anova(), car::Anova(), car::leveneTest(), car::linearHypothesis(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) anova object — glance.anova","text":"Note output glance.anova() vary depending initializing anova call. cases, just return empty data frame. cases, glance.anova() may return columns also common tidy.anova(). partly preserve backwards compatibility early versions broom, also underlying anova model yields components reasonably interpreted goodness--fit summaries .","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) anova object — glance.anova","text":"tibble::tibble() exactly one row columns: deviance Deviance model. df.residual Residual degrees freedom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) anova object — glance.anova","text":"","code":"if (FALSE) { # fit models a <- lm(mpg ~ wt + qsec + disp, mtcars) b <- lm(mpg ~ wt + qsec, mtcars) mod <- anova(a, b) # summarize model fit with tidiers tidy(mod) glance(mod) # car::linearHypothesis() example library(car) mod_lht <- linearHypothesis(a, \"wt - disp\") tidy(mod_lht) glance(mod_lht) }"},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lm object — glance.aov","title":"Glance at a(n) lm object — glance.aov","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lm object — glance.aov","text":"","code":"# S3 method for class 'aov' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lm object — glance.aov","text":"x aov object, created stats::aov(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) lm object — glance.aov","text":"Note tidy.aov() now contains numerator denominator degrees freedom, included output glance.aov() previous versions package.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lm object — glance.aov","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.aov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lm object — glance.aov","text":"","code":"a <- aov(mpg ~ wt + qsec + disp, mtcars) tidy(a) #> # A tibble: 4 × 6 #> term df sumsq meansq statistic p.value #> #> 1 wt 1 848. 848. 121. 1.08e-11 #> 2 qsec 1 82.9 82.9 11.9 1.82e- 3 #> 3 disp 1 0.00102 0.00102 0.000147 9.90e- 1 #> 4 Residuals 28 195. 6.98 NA NA"},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) betamfx object — glance.betamfx","title":"Glance at a(n) betamfx object — glance.betamfx","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) betamfx object — glance.betamfx","text":"","code":"# S3 method for class 'betamfx' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) betamfx object — glance.betamfx","text":"x betamfx object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) betamfx object — glance.betamfx","text":"glance method wraps glance.betareg() mfx::betamfx() objects.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) betamfx object — glance.betamfx","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. pseudo.r.squared Like R squared statistic, situations R squared statistic defined.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) betamfx object — glance.betamfx","text":"","code":"library(mfx) # Simulate some data set.seed(12345) n <- 1000 x <- rnorm(n) # Beta outcome y <- rbeta(n, shape1 = plogis(1 + 0.5 * x), shape2 = (abs(0.2 * x))) # Use Smithson and Verkuilen correction y <- (y * (n - 1) + 0.5) / n d <- data.frame(y, x) mod_betamfx <- betamfx(y ~ x | x, data = d) tidy(mod_betamfx, conf.int = TRUE) #> # A tibble: 1 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 x TRUE 0.0226 0.00801 2.82 0.00483 0.00686 0.0383 # Compare with the naive model coefficients of the equivalent betareg call (not run) # tidy(betamfx(y ~ x | x, data = d), conf.int = TRUE) augment(mod_betamfx) #> # A tibble: 1,000 × 4 #> y x .fitted .cooksd #> #> 1 0.951 0.586 0.809 0.000189 #> 2 0.714 0.709 0.811 0.0000993 #> 3 0.999 -0.109 0.793 0.000273 #> 4 0.998 -0.453 0.785 0.000334 #> 5 0.999 0.606 0.809 0.000342 #> 6 0.562 -1.82 0.751 0.000878 #> 7 0.999 0.630 0.810 0.000348 #> 8 0.999 -0.276 0.789 0.000294 #> 9 0.744 -0.284 0.789 0.0000134 #> 10 0.999 -0.919 0.774 0.000551 #> # ℹ 990 more rows glance(mod_betamfx) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.00726 998 1897. -3787. -3767. 996 1000"},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) betareg object — glance.betareg","title":"Glance at a(n) betareg object — glance.betareg","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) betareg object — glance.betareg","text":"","code":"# S3 method for class 'betareg' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) betareg object — glance.betareg","text":"x betareg object produced call betareg::betareg(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) betareg object — glance.betareg","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. pseudo.r.squared Like R squared statistic, situations R squared statistic defined.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.betareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) betareg object — glance.betareg","text":"","code":"# load libraries for models and data library(betareg) # load dats data(\"GasolineYield\", package = \"betareg\") # fit model mod <- betareg(yield ~ batch + temp, data = GasolineYield) mod #> #> Call: #> betareg(formula = yield ~ batch + temp, data = GasolineYield) #> #> Coefficients (mean model with logit link): #> (Intercept) batch1 batch2 batch3 batch4 #> -6.15957 1.72773 1.32260 1.57231 1.05971 #> batch5 batch6 batch7 batch8 batch9 #> 1.13375 1.04016 0.54369 0.49590 0.38579 #> temp #> 0.01097 #> #> Phi coefficients (precision model with identity link): #> (phi) #> 440.3 #> # summarize model fit with tidiers tidy(mod) #> # A tibble: 12 × 6 #> component term estimate std.error statistic p.value #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 tidy(mod, conf.int = TRUE) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.52 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.53 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.09 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.34 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.859 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.931 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.832 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.330 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.282 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.153 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.0102 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 225. #> # ℹ 1 more variable: conf.high tidy(mod, conf.int = TRUE, conf.level = .99) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.63 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.47 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.02 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.27 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.796 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.867 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.767 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.263 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.215 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.0803 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.00990 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 157. #> # ℹ 1 more variable: conf.high augment(mod) #> # A tibble: 32 × 6 #> yield batch temp .fitted .resid .cooksd #> #> 1 0.122 1 205 0.101 1.41 0.0791 #> 2 0.223 1 275 0.195 1.44 0.0917 #> 3 0.347 1 345 0.343 0.170 0.00155 #> 4 0.457 1 407 0.508 -2.14 0.606 #> 5 0.08 2 218 0.0797 0.0712 0.0000168 #> 6 0.131 2 273 0.137 -0.318 0.00731 #> 7 0.266 2 347 0.263 0.169 0.00523 #> 8 0.074 3 212 0.0943 -1.52 0.0805 #> 9 0.182 3 272 0.167 0.831 0.0441 #> 10 0.304 3 340 0.298 0.304 0.0170 #> # ℹ 22 more rows glance(mod) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.962 30 84.8 -146. -128. 20 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) biglm object — glance.biglm","title":"Glance at a(n) biglm object — glance.biglm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) biglm object — glance.biglm","text":"","code":"# S3 method for class 'biglm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) biglm object — glance.biglm","text":"x biglm object created call biglm::biglm() biglm::bigglm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) biglm object — glance.biglm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. deviance Deviance model. df.residual Residual degrees freedom. nobs Number observations used. r.squared R squared statistic, percent variation explained model. Also known coefficient determination.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.biglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) biglm object — glance.biglm","text":"","code":"# load modeling library library(biglm) # fit model -- linear regression bfit <- biglm(mpg ~ wt + disp, mtcars) # summarize model fit with tidiers tidy(bfit) #> # A tibble: 3 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) 35.0 2.16 1.11e-58 #> 2 wt -3.35 1.16 4.00e- 3 #> 3 disp -0.0177 0.00919 5.38e- 2 tidy(bfit, conf.int = TRUE) #> # A tibble: 3 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 35.0 2.16 1.11e-58 30.7 39.2 #> 2 wt -3.35 1.16 4.00e- 3 -5.63 -1.07 #> 3 disp -0.0177 0.00919 5.38e- 2 -0.0357 0.000288 tidy(bfit, conf.int = TRUE, conf.level = .9) #> # A tibble: 3 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 35.0 2.16 1.11e-58 31.4 38.5 #> 2 wt -3.35 1.16 4.00e- 3 -5.27 -1.44 #> 3 disp -0.0177 0.00919 5.38e- 2 -0.0328 -0.00261 glance(bfit) #> # A tibble: 1 × 5 #> r.squared AIC deviance df.residual nobs #> #> 1 0.781 253. 247. 29 32 # fit model -- logistic regression bgfit <- bigglm(am ~ mpg, mtcars, family = binomial()) # summarize model fit with tidiers tidy(bgfit) #> # A tibble: 2 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) -6.60 2.35 0.00498 #> 2 mpg 0.307 0.115 0.00751 tidy(bgfit, exponentiate = TRUE) #> # A tibble: 2 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) 0.00136 2.35 0.00498 #> 2 mpg 1.36 0.115 0.00751 tidy(bgfit, conf.int = TRUE) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) -6.60 2.35 0.00498 -11.2 -1.99 #> 2 mpg 0.307 0.115 0.00751 0.0819 0.532 tidy(bgfit, conf.int = TRUE, conf.level = .9) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) -6.60 2.35 0.00498 -10.5 -2.74 #> 2 mpg 0.307 0.115 0.00751 0.118 0.496 tidy(bgfit, conf.int = TRUE, conf.level = .9, exponentiate = TRUE) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 0.00136 2.35 0.00498 0.0000283 0.0648 #> 2 mpg 1.36 0.115 0.00751 1.13 1.64 glance(bgfit) #> # A tibble: 1 × 5 #> r.squared AIC deviance df.residual nobs #> #> 1 0.175 33.7 29.7 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) binDesign object — glance.binDesign","title":"Glance at a(n) binDesign object — glance.binDesign","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) binDesign object — glance.binDesign","text":"","code":"# S3 method for class 'binDesign' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) binDesign object — glance.binDesign","text":"x binGroup::binDesign object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) binDesign object — glance.binDesign","text":"tibble::tibble() exactly one row columns: power Power achieved analysis. n Sample size used achieve power. power.reached Whether desired power reached. maxit Number iterations performed.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.binDesign.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) binDesign object — glance.binDesign","text":"","code":"# load libraries for models and data library(binGroup) des <- binDesign( nmax = 300, delta = 0.06, p.hyp = 0.1, power = .8 ) glance(des) #> # A tibble: 1 × 4 #> power n power.reached maxit #> #> 1 0.805 240 TRUE 238 tidy(des) #> # A tibble: 238 × 2 #> n power #> #> 1 3 0.0000640 #> 2 4 0.000248 #> 3 5 0.000602 #> 4 6 0.00117 #> 5 7 0.0000813 #> 6 8 0.000157 #> 7 9 0.000274 #> 8 10 0.000443 #> 9 11 0.000673 #> 10 12 0.0000640 #> # ℹ 228 more rows library(ggplot2) ggplot(tidy(des), aes(n, power)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) cch object — glance.cch","title":"Glance at a(n) cch object — glance.cch","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) cch object — glance.cch","text":"","code":"# S3 method for class 'cch' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) cch object — glance.cch","text":"x cch object returned survival::cch(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) cch object — glance.cch","text":"tibble::tibble() exactly one row columns: iter Iterations algorithm/fitting procedure completed. p.value P-value corresponding test statistic. rscore Robust log-rank statistic score Score. n number predictions nevent number events","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.cch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) cch object — glance.cch","text":"","code":"# load libraries for models and data library(survival) # examples come from cch documentation subcoh <- nwtco$in.subcohort selccoh <- with(nwtco, rel == 1 | subcoh == 1) ccoh.data <- nwtco[selccoh, ] ccoh.data$subcohort <- subcoh[selccoh] # central-lab histology ccoh.data$histol <- factor(ccoh.data$histol, labels = c(\"FH\", \"UH\")) # tumour stage ccoh.data$stage <- factor(ccoh.data$stage, labels = c(\"I\", \"II\", \"III\", \"IV\")) ccoh.data$age <- ccoh.data$age / 12 # age in years # fit model fit.ccP <- cch(Surv(edrel, rel) ~ stage + histol + age, data = ccoh.data, subcoh = ~subcohort, id = ~seqno, cohort.size = 4028 ) # summarize model fit with tidiers + visualization tidy(fit.ccP) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 stageII 0.735 0.168 4.36 1.30e- 5 0.404 1.06 #> 2 stageIII 0.597 0.173 3.44 5.77e- 4 0.257 0.937 #> 3 stageIV 1.38 0.205 6.76 1.40e-11 0.983 1.79 #> 4 histolUH 1.50 0.160 9.38 0 1.19 1.81 #> 5 age 0.0433 0.0237 1.82 6.83e- 2 -0.00324 0.0898 # coefficient plot library(ggplot2) ggplot(tidy(fit.ccP), aes(x = estimate, y = term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) clm object — glance.clm","title":"Glance at a(n) clm object — glance.clm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) clm object — glance.clm","text":"","code":"# S3 method for class 'clm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) clm object — glance.clm","text":"x clm object returned ordinal::clm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) clm object — glance.clm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.residual Residual degrees freedom. edf effective degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.clm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) clm object — glance.clm","text":"","code":"# load libraries for models and data library(ordinal) # fit model fit <- clm(rating ~ temp * contact, data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 7 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 intercept #> 5 tempwarm 2.32 0.701 3.31 9.28e- 4 location #> 6 contactyes 1.35 0.660 2.04 4.13e- 2 location #> 7 tempwarm:contactyes 0.360 0.924 0.389 6.97e- 1 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 NA NA intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 NA NA intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 NA NA intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 NA NA intercept #> 5 temp… 2.32 0.701 3.31 9.28e- 4 1.20 3.52 location #> 6 cont… 1.35 0.660 2.04 4.13e- 2 0.284 2.47 location #> 7 temp… 0.360 0.924 0.389 6.97e- 1 -1.17 1.89 location tidy(fit, conf.int = TRUE, conf.type = \"Wald\", exponentiate = TRUE) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.244 0.545 -2.59 9.66e- 3 0.0837 0.710 intercept #> 2 2|3 3.14 0.510 2.24 2.48e- 2 1.16 8.52 intercept #> 3 3|4 29.3 0.638 5.29 1.21e- 7 8.38 102. intercept #> 4 4|5 140. 0.751 6.58 4.66e-11 32.1 610. intercept #> 5 temp… 10.2 0.701 3.31 9.28e- 4 2.58 40.2 location #> 6 cont… 3.85 0.660 2.04 4.13e- 2 1.05 14.0 location #> 7 temp… 1.43 0.924 0.389 6.97e- 1 0.234 8.76 location glance(fit) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 7 187. 203. -86.4162 65 72 augment(fit, type.predict = \"prob\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 0.562 #> 2 3 cold no 0.209 #> 3 3 cold yes 0.435 #> 4 4 cold yes 0.0894 #> 5 4 warm no 0.190 #> 6 4 warm no 0.190 #> 7 5 warm yes 0.286 #> 8 5 warm yes 0.286 #> 9 1 cold no 0.196 #> 10 2 cold no 0.562 #> # ℹ 62 more rows augment(fit, type.predict = \"class\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 2 #> 2 3 cold no 2 #> 3 3 cold yes 3 #> 4 4 cold yes 3 #> 5 4 warm no 3 #> 6 4 warm no 3 #> 7 5 warm yes 4 #> 8 5 warm yes 4 #> 9 1 cold no 2 #> 10 2 cold no 2 #> # ℹ 62 more rows # ...and again with another model specification fit2 <- clm(rating ~ temp, nominal = ~contact, data = wine) tidy(fit2) #> # A tibble: 9 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2.(Intercept) -1.32 0.562 -2.35 0.0186 intercept #> 2 2|3.(Intercept) 1.25 0.475 2.63 0.00866 intercept #> 3 3|4.(Intercept) 3.55 0.656 5.41 0.0000000625 intercept #> 4 4|5.(Intercept) 4.66 0.860 5.42 0.0000000608 intercept #> 5 1|2.contactyes -1.62 1.16 -1.39 0.164 intercept #> 6 2|3.contactyes -1.51 0.591 -2.56 0.0105 intercept #> 7 3|4.contactyes -1.67 0.649 -2.58 0.00985 intercept #> 8 4|5.contactyes -1.05 0.897 -1.17 0.241 intercept #> 9 tempwarm 2.52 0.535 4.71 0.00000250 location glance(fit2) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 9 190. 211. -86.20855 63 72"},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) clmm object — glance.clmm","title":"Glance at a(n) clmm object — glance.clmm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) clmm object — glance.clmm","text":"","code":"# S3 method for class 'clmm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) clmm object — glance.clmm","text":"x clmm object returned ordinal::clmm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) clmm object — glance.clmm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. edf effective degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.clmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) clmm object — glance.clmm","text":"","code":"# load libraries for models and data library(ordinal) # fit model fit <- clmm(rating ~ temp + contact + (1 | judge), data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 6 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.62 0.682 -2.38 1.74e- 2 intercept #> 2 2|3 1.51 0.604 2.51 1.22e- 2 intercept #> 3 3|4 4.23 0.809 5.23 1.72e- 7 intercept #> 4 4|5 6.09 0.972 6.26 3.82e-10 intercept #> 5 tempwarm 3.06 0.595 5.14 2.68e- 7 location #> 6 contactyes 1.83 0.513 3.58 3.44e- 4 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 6 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.62 0.682 -2.38 1.74e- 2 -2.75 -0.501 intercept #> 2 2|3 1.51 0.604 2.51 1.22e- 2 0.520 2.51 intercept #> 3 3|4 4.23 0.809 5.23 1.72e- 7 2.90 5.56 intercept #> 4 4|5 6.09 0.972 6.26 3.82e-10 4.49 7.69 intercept #> 5 temp… 3.06 0.595 5.14 2.68e- 7 2.08 4.04 location #> 6 cont… 1.83 0.513 3.58 3.44e- 4 0.992 2.68 location tidy(fit, conf.int = TRUE, exponentiate = TRUE) #> # A tibble: 6 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.197 0.682 -2.38 1.74e- 2 0.0518 0.751 intercept #> 2 2|3 4.54 0.604 2.51 1.22e- 2 1.39 14.8 intercept #> 3 3|4 68.6 0.809 5.23 1.72e- 7 14.1 335. intercept #> 4 4|5 441. 0.972 6.26 3.82e-10 65.5 2965. intercept #> 5 temp… 21.4 0.595 5.14 2.68e- 7 6.66 68.7 location #> 6 cont… 6.26 0.513 3.58 3.44e- 4 2.29 17.1 location glance(fit) #> # A tibble: 1 × 5 #> edf AIC BIC logLik nobs #> #> 1 7 177. 193. -81.56541 72 # ...and again with another model specification fit2 <- clmm(rating ~ temp + (1 | judge), nominal = ~contact, data = wine) #> Warning: unrecognized control elements named ‘nominal’ ignored tidy(fit2) #> # A tibble: 5 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -2.20 0.613 -3.59 0.000333 intercept #> 2 2|3 0.545 0.476 1.15 0.252 intercept #> 3 3|4 2.84 0.607 4.68 0.00000291 intercept #> 4 4|5 4.48 0.751 5.96 0.00000000256 intercept #> 5 tempwarm 2.67 0.554 4.81 0.00000147 location glance(fit2) #> # A tibble: 1 × 5 #> edf AIC BIC logLik nobs #> #> 1 6 189. 203. -88.73882 72"},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) coeftest object — glance.coeftest","title":"Glance at a(n) coeftest object — glance.coeftest","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) coeftest object — glance.coeftest","text":"","code":"# S3 method for class 'coeftest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) coeftest object — glance.coeftest","text":"x coeftest object returned lmtest::coeftest(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) coeftest object — glance.coeftest","text":"way lmtest::coeftest() retains information underlying model object, returned columns glance.coeftest() vary depending arguments. Specifically, four columns returned regardless: \"Loglik\", \"AIC\", \"BIC\", \"nobs\". Users can obtain additional columns (e.g. \"r.squared\", \"df\") invoking \"save = TRUE\" argument part lmtest::coeftest(). See examples. aside, goodness--fit measures R-squared unaffected presence heteroskedasticity. discussion see, e.g. chapter 8.1 Wooldridge (2016).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Glance at a(n) coeftest object — glance.coeftest","text":"Wooldridge, Jeffrey M. (2016) Introductory econometrics: modern approach. (6th edition). Nelson Education.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) coeftest object — glance.coeftest","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coeftest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) coeftest object — glance.coeftest","text":"","code":"# load libraries for models and data library(lmtest) m <- lm(dist ~ speed, data = cars) coeftest(m) #> #> t test of coefficients: #> #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) -17.57909 6.75844 -2.6011 0.01232 * #> speed 3.93241 0.41551 9.4640 1.49e-12 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> tidy(coeftest(m)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 #> 2 speed 3.93 0.416 9.46 1.49e-12 tidy(coeftest(m, conf.int = TRUE)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 #> 2 speed 3.93 0.416 9.46 1.49e-12 # a very common workflow is to combine lmtest::coeftest with alternate # variance-covariance matrices via the sandwich package. The lmtest # tidiers support this workflow too, enabling you to adjust the standard # errors of your tidied models on the fly. library(sandwich) # \"HC3\" (default) robust SEs tidy(coeftest(m, vcov = vcovHC)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 5.93 -2.96 4.72e- 3 #> 2 speed 3.93 0.428 9.20 3.64e-12 # \"HC2\" robust SEs tidy(coeftest(m, vcov = vcovHC, type = \"HC2\")) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 5.73 -3.07 3.55e- 3 #> 2 speed 3.93 0.413 9.53 1.21e-12 # N-W HAC robust SEs tidy(coeftest(m, vcov = NeweyWest)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 7.02 -2.50 0.0157 #> 2 speed 3.93 0.551 7.14 0.00000000453 # the columns of the returned tibble for glance.coeftest() will vary # depending on whether the coeftest object retains the underlying model. # Users can control this with the \"save = TRUE\" argument of coeftest(). glance(coeftest(m)) #> Original model not retained as part of coeftest object. #> ℹ For additional model summary information (r.squared, df, etc.), #> consider passing `glance.coeftest()` an object where the underlying #> model has been saved, i.e. `lmtest::coeftest(..., save = TRUE)`. #> This message is displayed once per session. #> # A tibble: 1 × 4 #> logLik AIC BIC nobs #> #> 1 -206.578 419. 425. 50 glance(coeftest(m, save = TRUE)) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.651 0.644 15.4 89.6 1.49e-12 1 -207. 419. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs "},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) coxph object — glance.coxph","title":"Glance at a(n) coxph object — glance.coxph","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) coxph object — glance.coxph","text":"","code":"# S3 method for class 'coxph' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) coxph object — glance.coxph","text":"x coxph object returned survival::coxph(). ... tidy(), additional arguments passed summary(x, ...). Otherwise ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) coxph object — glance.coxph","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. n total number observations. nevent Number events. nobs Number observations used. See survival::coxph.object additional column descriptions.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.coxph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) coxph object — glance.coxph","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) # summarize model fit with tidiers tidy(cfit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 0.0170 0.00922 1.85 0.0646 #> 2 sex -0.513 0.167 -3.06 0.00218 tidy(cfit, exponentiate = TRUE) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 1.02 0.00922 1.85 0.0646 #> 2 sex 0.599 0.167 -3.06 0.00218 lp <- augment(cfit, lung) risks <- augment(cfit, lung, type.predict = \"risk\") expected <- augment(cfit, lung, type.predict = \"expected\") glance(cfit) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 228 165 14.1 0.000857 13.7 0.00105 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs # also works on clogit models resp <- levels(logan$occupation) n <- nrow(logan) indx <- rep(1:n, length(resp)) logan2 <- data.frame( logan[indx, ], id = indx, tocc = factor(rep(resp, each = n)) ) logan2$case <- (logan2$occupation == logan2$tocc) cl <- clogit(case ~ tocc + tocc:education + strata(id), logan2) tidy(cl) #> # A tibble: 9 × 5 #> term estimate std.error statistic p.value #> #> 1 toccfarm -1.90 1.38 -1.37 1.70e- 1 #> 2 toccoperatives 1.17 0.566 2.06 3.91e- 2 #> 3 toccprofessional -8.10 0.699 -11.6 4.45e-31 #> 4 toccsales -5.03 0.770 -6.53 6.54e-11 #> 5 tocccraftsmen:education -0.332 0.0569 -5.84 5.13e- 9 #> 6 toccfarm:education -0.370 0.116 -3.18 1.47e- 3 #> 7 toccoperatives:education -0.422 0.0584 -7.23 4.98e-13 #> 8 toccprofessional:education 0.278 0.0510 5.45 4.94e- 8 #> 9 toccsales:education NA 0 NA NA glance(cl) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 4190 838 666. 1.90e-138 682. 5.01e-142 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs library(ggplot2) ggplot(lp, aes(age, .fitted, color = sex)) + geom_point() ggplot(risks, aes(age, .fitted, color = sex)) + geom_point() ggplot(expected, aes(time, .fitted, color = sex)) + geom_point()"},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) crr object — glance.crr","title":"Glance at a(n) crr object — glance.crr","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) crr object — glance.crr","text":"","code":"# S3 method for class 'crr' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) crr object — glance.crr","text":"x crr object returned cmprsk::crr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) crr object — glance.crr","text":"tibble::tibble() exactly one row columns: converged Logical indicating model fitting procedure succesful converged. df Degrees freedom used model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.crr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) crr object — glance.crr","text":"","code":"library(cmprsk) # time to loco-regional failure (lrf) lrf_time <- rexp(100) lrf_event <- sample(0:2, 100, replace = TRUE) trt <- sample(0:1, 100, replace = TRUE) strt <- sample(1:2, 100, replace = TRUE) # fit model x <- crr(lrf_time, lrf_event, cbind(trt, strt)) # summarize model fit with tidiers tidy(x, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 trt -0.338 0.344 -0.983 0.33 -1.01 0.336 #> 2 strt 0.374 0.354 1.06 0.29 -0.320 1.07 glance(x) #> # A tibble: 1 × 5 #> converged logLik nobs df statistic #> #> 1 TRUE -132. 100 2 2.12"},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"","code":"# S3 method for class 'cv.glmnet' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"x cv.glmnet object returned glmnet::cv.glmnet(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"tibble::tibble() exactly one row columns: lambda.1se value penalization parameter lambda results sparsest model remaining within one standard error minimum loss. lambda.min value penalization parameter lambda achieved minimum loss estimated cross validation. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.cv.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) cv.glmnet object — glance.cv.glmnet","text":"","code":"# load libraries for models and data library(glmnet) #> Loaded glmnet 4.1-8 set.seed(27) nobs <- 100 nvar <- 50 real <- 5 x <- matrix(rnorm(nobs * nvar), nobs, nvar) beta <- c(rnorm(real, 0, 1), rep(0, nvar - real)) y <- c(t(beta) %*% t(x)) + rnorm(nvar, sd = 3) cvfit1 <- cv.glmnet(x, y) tidy(cvfit1) #> # A tibble: 74 × 6 #> lambda estimate std.error conf.low conf.high nzero #> #> 1 1.45 17.4 2.28 15.1 19.7 0 #> 2 1.32 17.4 2.28 15.1 19.7 1 #> 3 1.20 17.2 2.22 15.0 19.5 1 #> 4 1.09 17.0 2.15 14.8 19.1 1 #> 5 0.997 16.8 2.09 14.7 18.9 1 #> 6 0.909 16.7 2.03 14.7 18.7 2 #> 7 0.828 16.7 1.99 14.7 18.6 3 #> 8 0.754 16.7 1.95 14.7 18.6 5 #> 9 0.687 16.8 1.93 14.8 18.7 7 #> 10 0.626 16.9 1.91 15.0 18.8 7 #> # ℹ 64 more rows glance(cvfit1) #> # A tibble: 1 × 3 #> lambda.min lambda.1se nobs #> #> 1 0.828 1.45 100 library(ggplot2) tidied_cv <- tidy(cvfit1) glance_cv <- glance(cvfit1) # plot of MSE as a function of lambda g <- ggplot(tidied_cv, aes(lambda, estimate)) + geom_line() + scale_x_log10() g # plot of MSE as a function of lambda with confidence ribbon g <- g + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25) g # plot of MSE as a function of lambda with confidence ribbon and choices # of minimum lambda marked g <- g + geom_vline(xintercept = glance_cv$lambda.min) + geom_vline(xintercept = glance_cv$lambda.1se, lty = 2) g # plot of number of zeros for each choice of lambda ggplot(tidied_cv, aes(lambda, nzero)) + geom_line() + scale_x_log10() # coefficient plot with min lambda shown tidied <- tidy(cvfit1$glmnet.fit) ggplot(tidied, aes(lambda, estimate, group = term)) + scale_x_log10() + geom_line() + geom_vline(xintercept = glance_cv$lambda.min) + geom_vline(xintercept = glance_cv$lambda.1se, lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) drc object — glance.drc","title":"Glance at a(n) drc object — glance.drc","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) drc object — glance.drc","text":"","code":"# S3 method for class 'drc' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) drc object — glance.drc","text":"x drc object produced call drc::drm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) drc object — glance.drc","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. AICc AIC corrected small samples","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.drc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) drc object — glance.drc","text":"","code":"# load libraries for models and data library(drc) # fit model mod <- drm(dead / total ~ conc, type, weights = total, data = selenium, fct = LL.2(), type = \"binomial\" ) # summarize model fit with tidiers tidy(mod) #> # A tibble: 8 × 6 #> term curve estimate std.error statistic p.value #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 #> 5 e 1 252. 13.8 18.2 1.16e-74 #> 6 e 2 378. 39.4 9.61 3.53e-22 #> 7 e 3 120. 5.91 20.3 1.14e-91 #> 8 e 4 88.8 8.62 10.3 3.28e-25 tidy(mod, conf.int = TRUE) #> # A tibble: 8 × 8 #> term curve estimate std.error statistic p.value conf.low conf.high #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 -1.81 -1.20 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 -1.12 -0.571 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 -2.43 -1.89 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 -1.78 -1.12 #> 5 e 1 252. 13.8 18.2 1.16e-74 225. 279. #> 6 e 2 378. 39.4 9.61 3.53e-22 301. 456. #> 7 e 3 120. 5.91 20.3 1.14e-91 108. 131. #> 8 e 4 88.8 8.62 10.3 3.28e-25 71.9 106. glance(mod) #> # A tibble: 1 × 4 #> AIC BIC logLik df.residual #> #> 1 768. 778. -376.2099 17 augment(mod, selenium) #> # A tibble: 25 × 7 #> type conc total dead .fitted .resid .cooksd #> #> 1 1 0 151 3 0 0.0199 0 #> 2 1 100 146 40 0.199 0.0748 0.0000909 #> 3 1 200 116 31 0.414 -0.146 0.000104 #> 4 1 300 159 85 0.565 -0.0302 0.00000516 #> 5 1 400 150 102 0.667 0.0133 0.00000220 #> 6 1 500 140 112 0.737 0.0633 0.0000720 #> 7 2 0 141 2 0 0.0142 0 #> 8 2 100 153 30 0.246 -0.0495 0.000168 #> 9 2 200 142 59 0.369 0.0468 0.0000347 #> 10 2 300 139 82 0.451 0.139 0.0000430 #> # ℹ 15 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ergm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) ergm object — glance.ergm","title":"Glance at a(n) ergm object — glance.ergm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ergm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) ergm object — glance.ergm","text":"","code":"# S3 method for class 'ergm' glance(x, deviance = FALSE, mcmc = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ergm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) ergm object — glance.ergm","text":"x ergm object returned call ergm::ergm(). deviance Logical indicating whether report null residual deviance model, well degrees freedom. Defaults FALSE. mcmc Logical indicating whether report MCMC interval, burn-sample size used estimate model. Defaults FALSE. ... Additional arguments pass ergm::summary(). Cautionary note: Misspecified arguments may silently ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ergm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) ergm object — glance.ergm","text":"glance.ergm returns one-row tibble columns independence Whether model assumed dyadic independence iterations number MCMLE iterations performed convergence logLik applicable, log-likelihood associated model AIC Akaike Information Criterion BIC Bayesian Information Criterion deviance = TRUE, model supports , tibble also contain columns null.deviance null deviance model df.null degrees freedom null deviance residual.deviance residual deviance model df.residual degrees freedom residual deviance","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) factanal object — glance.factanal","title":"Glance at a(n) factanal object — glance.factanal","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) factanal object — glance.factanal","text":"","code":"# S3 method for class 'factanal' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) factanal object — glance.factanal","text":"x factanal object created stats::factanal(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) factanal object — glance.factanal","text":"tibble::tibble() exactly one row columns: converged Logical indicating model fitting procedure succesful converged. df Degrees freedom used model. method method used. n total number observations. n.factors number fitted factors. nobs Number observations used. p.value P-value corresponding test statistic. statistic Test statistic. total.variance Total cumulative proportion variance accounted factors.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.factanal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) factanal object — glance.factanal","text":"","code":"set.seed(123) # generate data library(dplyr) library(purrr) m1 <- tibble( v1 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 4, 5, 6), v2 = c(1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 3, 4, 3, 3, 3, 4, 6, 5), v3 = c(3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 6), v4 = c(3, 3, 4, 3, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 5, 6, 4), v5 = c(1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 6, 4, 5), v6 = c(1, 1, 1, 2, 1, 3, 3, 3, 4, 3, 1, 1, 1, 2, 1, 6, 5, 4) ) # new data m2 <- map_dfr(m1, rev) # factor analysis objects fit1 <- factanal(m1, factors = 3, scores = \"Bartlett\") fit2 <- factanal(m1, factors = 3, scores = \"regression\") # tidying the object tidy(fit1) #> # A tibble: 6 × 5 #> variable uniqueness fl1 fl2 fl3 #> #> 1 v1 0.005 0.944 0.182 0.267 #> 2 v2 0.101 0.905 0.235 0.159 #> 3 v3 0.005 0.236 0.210 0.946 #> 4 v4 0.224 0.180 0.242 0.828 #> 5 v5 0.0843 0.242 0.881 0.286 #> 6 v6 0.005 0.193 0.959 0.196 tidy(fit2) #> # A tibble: 6 × 5 #> variable uniqueness fl1 fl2 fl3 #> #> 1 v1 0.005 0.944 0.182 0.267 #> 2 v2 0.101 0.905 0.235 0.159 #> 3 v3 0.005 0.236 0.210 0.946 #> 4 v4 0.224 0.180 0.242 0.828 #> 5 v5 0.0843 0.242 0.881 0.286 #> 6 v6 0.005 0.193 0.959 0.196 # augmented dataframe augment(fit1) #> # A tibble: 18 × 4 #> .rownames .fs1 .fs2 .fs3 #> #> 1 1 -0.904 -0.931 0.948 #> 2 2 -0.869 -0.933 0.935 #> 3 3 -0.908 -0.932 0.962 #> 4 4 -1.00 -0.253 0.818 #> 5 5 -0.904 -0.931 0.948 #> 6 6 -0.745 0.727 -0.788 #> 7 7 -0.710 0.725 -0.801 #> 8 8 -0.750 0.726 -0.774 #> 9 9 -0.808 1.40 -0.930 #> 10 10 -0.745 0.727 -0.788 #> 11 11 0.927 -0.931 -0.837 #> 12 12 0.963 -0.933 -0.849 #> 13 13 0.923 -0.932 -0.823 #> 14 14 0.829 -0.253 -0.967 #> 15 15 0.927 -0.931 -0.837 #> 16 16 0.422 2.05 1.29 #> 17 17 1.47 1.29 0.545 #> 18 18 1.88 0.309 1.95 augment(fit2) #> # A tibble: 18 × 4 #> .rownames .fs1 .fs2 .fs3 #> #> 1 1 -0.897 -0.925 0.936 #> 2 2 -0.861 -0.927 0.924 #> 3 3 -0.901 -0.926 0.950 #> 4 4 -0.993 -0.251 0.809 #> 5 5 -0.897 -0.925 0.936 #> 6 6 -0.741 0.720 -0.784 #> 7 7 -0.706 0.718 -0.796 #> 8 8 -0.745 0.719 -0.770 #> 9 9 -0.803 1.39 -0.923 #> 10 10 -0.741 0.720 -0.784 #> 11 11 0.917 -0.925 -0.830 #> 12 12 0.952 -0.927 -0.842 #> 13 13 0.913 -0.926 -0.816 #> 14 14 0.820 -0.252 -0.958 #> 15 15 0.917 -0.925 -0.830 #> 16 16 0.426 2.04 1.28 #> 17 17 1.46 1.29 0.548 #> 18 18 1.88 0.314 1.95 # augmented dataframe (with new data) augment(fit1, data = m2) #> # A tibble: 18 × 10 #> .rownames v1 v2 v3 v4 v5 v6 .fs1 .fs2 .fs3 #> #> 1 1 6 5 6 4 5 4 -0.904 -0.931 0.948 #> 2 2 5 6 4 6 4 5 -0.869 -0.933 0.935 #> 3 3 4 4 5 5 6 6 -0.908 -0.932 0.962 #> 4 4 3 3 1 1 1 1 -1.00 -0.253 0.818 #> 5 5 3 3 1 1 1 2 -0.904 -0.931 0.948 #> 6 6 3 3 1 2 1 1 -0.745 0.727 -0.788 #> 7 7 3 4 1 1 1 1 -0.710 0.725 -0.801 #> 8 8 3 3 1 1 1 1 -0.750 0.726 -0.774 #> 9 9 1 1 1 1 3 3 -0.808 1.40 -0.930 #> 10 10 1 2 1 1 3 4 -0.745 0.727 -0.788 #> 11 11 1 1 1 2 3 3 0.927 -0.931 -0.837 #> 12 12 1 2 1 1 3 3 0.963 -0.933 -0.849 #> 13 13 1 1 1 1 3 3 0.923 -0.932 -0.823 #> 14 14 1 1 3 3 1 1 0.829 -0.253 -0.967 #> 15 15 1 1 3 3 1 2 0.927 -0.931 -0.837 #> 16 16 1 1 3 4 1 1 0.422 2.05 1.29 #> 17 17 1 2 3 3 1 1 1.47 1.29 0.545 #> 18 18 1 1 3 3 1 1 1.88 0.309 1.95 augment(fit2, data = m2) #> # A tibble: 18 × 10 #> .rownames v1 v2 v3 v4 v5 v6 .fs1 .fs2 .fs3 #> #> 1 1 6 5 6 4 5 4 -0.897 -0.925 0.936 #> 2 2 5 6 4 6 4 5 -0.861 -0.927 0.924 #> 3 3 4 4 5 5 6 6 -0.901 -0.926 0.950 #> 4 4 3 3 1 1 1 1 -0.993 -0.251 0.809 #> 5 5 3 3 1 1 1 2 -0.897 -0.925 0.936 #> 6 6 3 3 1 2 1 1 -0.741 0.720 -0.784 #> 7 7 3 4 1 1 1 1 -0.706 0.718 -0.796 #> 8 8 3 3 1 1 1 1 -0.745 0.719 -0.770 #> 9 9 1 1 1 1 3 3 -0.803 1.39 -0.923 #> 10 10 1 2 1 1 3 4 -0.741 0.720 -0.784 #> 11 11 1 1 1 2 3 3 0.917 -0.925 -0.830 #> 12 12 1 2 1 1 3 3 0.952 -0.927 -0.842 #> 13 13 1 1 1 1 3 3 0.913 -0.926 -0.816 #> 14 14 1 1 3 3 1 1 0.820 -0.252 -0.958 #> 15 15 1 1 3 3 1 2 0.917 -0.925 -0.830 #> 16 16 1 1 3 4 1 1 0.426 2.04 1.28 #> 17 17 1 2 3 3 1 1 1.46 1.29 0.548 #> 18 18 1 1 3 3 1 1 1.88 0.314 1.95"},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) felm object — glance.felm","title":"Glance at a(n) felm object — glance.felm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) felm object — glance.felm","text":"","code":"# S3 method for class 'felm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) felm object — glance.felm","text":"x felm object returned lfe::felm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) felm object — glance.felm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. df Degrees freedom used model. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.felm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) felm object — glance.felm","text":"","code":"# load libraries for models and data library(lfe) # use built-in `airquality` dataset head(airquality) #> Ozone Solar.R Wind Temp Month Day #> 1 41 190 7.4 67 5 1 #> 2 36 118 8.0 72 5 2 #> 3 12 149 12.6 74 5 3 #> 4 18 313 11.5 62 5 4 #> 5 NA NA 14.3 56 5 5 #> 6 28 NA 14.9 66 5 6 # no FEs; same as lm() est0 <- felm(Ozone ~ Temp + Wind + Solar.R, airquality) # summarize model fit with tidiers tidy(est0) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -64.3 23.1 -2.79 0.00623 #> 2 Temp 1.65 0.254 6.52 0.00000000242 #> 3 Wind -3.33 0.654 -5.09 0.00000152 #> 4 Solar.R 0.0598 0.0232 2.58 0.0112 augment(est0) #> # A tibble: 111 × 7 #> .rownames Ozone Temp Wind Solar.R .fitted .resid #> #> 1 1 41 67 7.4 190 33.0 7.95 #> 2 2 36 72 8 118 35.0 1.00 #> 3 3 12 74 12.6 149 24.8 -12.8 #> 4 4 18 62 11.5 313 18.5 -0.475 #> 5 7 23 65 8.6 299 32.3 -9.26 #> 6 8 19 59 13.8 99 -6.95 25.9 #> 7 9 8 61 20.1 19 -29.4 37.4 #> 8 12 16 69 9.7 256 32.6 -16.6 #> 9 13 11 66 9.2 290 31.4 -20.4 #> 10 14 14 68 10.9 274 28.1 -14.1 #> # ℹ 101 more rows # add month fixed effects est1 <- felm(Ozone ~ Temp + Wind + Solar.R | Month, airquality) # summarize model fit with tidiers tidy(est1) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, fe = TRUE) #> # A tibble: 8 × 7 #> term estimate std.error statistic p.value N comp #> #> 1 Temp 1.88 0.341 5.50 0.000000274 NA NA #> 2 Wind -3.11 0.660 -4.71 0.00000778 NA NA #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 NA NA #> 4 Month.5 -74.2 4.23 -17.5 2.00 24 1 #> 5 Month.6 -89.0 6.91 -12.9 2.00 9 1 #> 6 Month.7 -83.0 4.06 -20.4 2 26 1 #> 7 Month.8 -78.4 4.32 -18.2 2.00 23 1 #> 8 Month.9 -90.2 3.85 -23.4 2 29 1 augment(est1) #> # A tibble: 111 × 8 #> .rownames Ozone Temp Wind Solar.R Month .fitted .resid #> #> 1 1 41 67 7.4 190 5 38.3 2.69 #> 2 2 36 72 8 118 5 42.1 -6.07 #> 3 3 12 74 12.6 149 5 33.1 -21.1 #> 4 4 18 62 11.5 313 5 22.6 -4.62 #> 5 7 23 65 8.6 299 5 36.5 -13.5 #> 6 8 19 59 13.8 99 5 -1.33 20.3 #> 7 9 8 61 20.1 19 5 -21.3 29.3 #> 8 12 16 69 9.7 256 5 38.4 -22.4 #> 9 13 11 66 9.2 290 5 36.1 -25.1 #> 10 14 14 68 10.9 274 5 33.7 -19.7 #> # ℹ 101 more rows glance(est1) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.637 0.612 20.7 25.8 4.57e-20 103 103 111 # the \"se.type\" argument can be used to switch out different standard errors # types on the fly. In turn, this can be useful exploring the effect of # different error structures on model inference. tidy(est1, se.type = \"iid\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, se.type = \"robust\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.344 5.45 0.000000344 #> 2 Wind -3.11 0.903 -3.44 0.000834 #> 3 Solar.R 0.0522 0.0226 2.31 0.0227 # add clustered SEs (also by month) est2 <- felm(Ozone ~ Temp + Wind + Solar.R | Month | 0 | Month, airquality) # summarize model fit with tidiers tidy(est2, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"cluster\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"robust\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.344 5.45 0.00550 0.920 2.83 #> 2 Wind -3.11 0.903 -3.44 0.0262 -5.62 -0.602 #> 3 Solar.R 0.0522 0.0226 2.31 0.0817 -0.0104 0.115 tidy(est2, conf.int = TRUE, se.type = \"iid\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.341 5.50 0.00532 0.929 2.82 #> 2 Wind -3.11 0.660 -4.71 0.00924 -4.94 -1.28 #> 3 Solar.R 0.0522 0.0237 2.21 0.0920 -0.0135 0.118"},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) fitdistr object — glance.fitdistr","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"","code":"# S3 method for class 'fitdistr' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"x fitdistr object returned MASS::fitdistr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fitdistr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) fitdistr object — glance.fitdistr","text":"","code":"# load libraries for models and data library(MASS) # generate data set.seed(2015) x <- rnorm(100, 5, 2) # fit models fit <- fitdistr(x, dnorm, list(mean = 3, sd = 1)) #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 3 #> term estimate std.error #> #> 1 mean 4.90 0.201 #> 2 sd 2.01 0.142 glance(fit) #> # A tibble: 1 × 4 #> logLik AIC BIC nobs #> #> 1 -211.6533 427. 433. 100"},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) fixest object — glance.fixest","title":"Glance at a(n) fixest object — glance.fixest","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) fixest object — glance.fixest","text":"","code":"# S3 method for class 'fixest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) fixest object — glance.fixest","text":"x fixest object returned fixest estimators ... Additional arguments passed summary confint. Important arguments se cluster. arguments dof, exact_dof, forceCovariance, keepBounded. See summary.fixest.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) fixest object — glance.fixest","text":"columns listed returned, NA, depending type model estimated. sigma, r.squared, adj.r.squared, within.r.squared NA model feols. pseudo.r.squared NA feols.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) fixest object — glance.fixest","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. pseudo.r.squared Like R squared statistic, situations R squared statistic defined. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. within.r.squared R squared within fixed-effect groups.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.fixest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) fixest object — glance.fixest","text":"","code":"# load libraries for models and data library(fixest) gravity <- feols( log(Euros) ~ log(dist_km) | Origin + Destination + Product + Year, trade ) tidy(gravity) #> # A tibble: 1 × 5 #> term estimate std.error statistic p.value #> #> 1 log(dist_km) -2.17 0.154 -14.1 0.00000000119 glance(gravity) #> # A tibble: 1 × 9 #> r.squared adj.r.squared within.r.squared pseudo.r.squared sigma nobs #> #> 1 0.706 0.705 0.219 NA 1.74 38325 #> # ℹ 3 more variables: AIC , BIC , logLik augment(gravity, trade) #> # A tibble: 38,325 × 9 #> .rownames Destination Origin Product Year dist_km Euros .fitted #> #> 1 1 LU BE 1 2007 140. 2966697 14.1 #> 2 2 BE LU 1 2007 140. 6755030 13.0 #> 3 3 LU BE 2 2007 140. 57078782 16.9 #> 4 4 BE LU 2 2007 140. 7117406 15.8 #> 5 5 LU BE 3 2007 140. 17379821 16.3 #> 6 6 BE LU 3 2007 140. 2622254 15.2 #> 7 7 LU BE 4 2007 140. 64867588 17.4 #> 8 8 BE LU 4 2007 140. 10731757 16.3 #> 9 9 LU BE 5 2007 140. 330702 14.1 #> 10 10 BE LU 5 2007 140. 7706 13.0 #> # ℹ 38,315 more rows #> # ℹ 1 more variable: .resid # to get robust or clustered SEs, users can either: # 1) specify the arguments directly in the `tidy()` call tidy(gravity, conf.int = TRUE, cluster = c(\"Product\", \"Year\")) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 tidy(gravity, conf.int = TRUE, se = \"threeway\") #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.175 -12.4 6.08e-9 -2.54 -1.79 # 2) or, feed tidy() a summary.fixest object that has already accepted # these arguments gravity_summ <- summary(gravity, cluster = c(\"Product\", \"Year\")) tidy(gravity_summ, conf.int = TRUE) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 # approach (1) is preferred."},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) gam object — glance.gam","title":"Glance at a(n) gam object — glance.gam","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) gam object — glance.gam","text":"","code":"# S3 method for class 'gam' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) gam object — glance.gam","text":"x gam object returned call mgcv::gam(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) gam object — glance.gam","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. npar Number parameters model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.gam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) gam object — glance.gam","text":"","code":"# load libraries for models and data library(mgcv) # fit model g <- gam(mpg ~ s(hp) + am + qsec, data = mtcars) # summarize model fit with tidiers tidy(g) #> # A tibble: 1 × 5 #> term edf ref.df statistic p.value #> #> 1 s(hp) 2.36 3.02 6.34 0.00218 tidy(g, parametric = TRUE) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 16.7 9.83 1.70 0.101 #> 2 am 4.37 1.56 2.81 0.00918 #> 3 qsec 0.0904 0.525 0.172 0.865 glance(g) #> # A tibble: 1 × 9 #> df logLik AIC BIC deviance df.residual nobs adj.r.squared npar #> #> 1 5.36 -74.4 162. 171. 196. 26.6 32 0.797 12 augment(g) #> # A tibble: 32 × 11 #> .rownames mpg am qsec hp .fitted .se.fit .resid .hat .sigma #> #> 1 Mazda RX4 21 1 16.5 110 24.3 1.03 -3.25 0.145 NA #> 2 Mazda RX4… 21 1 17.0 110 24.3 0.925 -3.30 0.116 NA #> 3 Datsun 710 22.8 1 18.6 93 26.0 0.894 -3.22 0.109 NA #> 4 Hornet 4 … 21.4 0 19.4 110 20.2 0.827 1.25 0.0930 NA #> 5 Hornet Sp… 18.7 0 17.0 175 15.7 0.815 3.02 0.0902 NA #> 6 Valiant 18.1 0 20.2 105 20.7 0.914 -2.56 0.113 NA #> 7 Duster 360 14.3 0 15.8 245 12.7 1.11 1.63 0.167 NA #> 8 Merc 240D 24.4 0 20 62 25.0 1.45 -0.618 0.287 NA #> 9 Merc 230 22.8 0 22.9 95 21.8 1.81 0.959 0.446 NA #> 10 Merc 280 19.2 0 18.3 123 19.0 0.864 0.211 0.102 NA #> # ℹ 22 more rows #> # ℹ 1 more variable: .cooksd "},{"path":"https://broom.tidymodels.org/dev/reference/glance.garch.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) garch object — glance.garch","title":"Tidy a(n) garch object — glance.garch","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.garch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) garch object — glance.garch","text":"","code":"# S3 method for class 'garch' glance(x, test = c(\"box-ljung-test\", \"jarque-bera-test\"), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.garch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) garch object — glance.garch","text":"x garch object returned tseries::garch(). test Character specification hypothesis test use. garch function reports 2 hypothesis tests: Jarque-Bera residuals Box-Ljung squared residuals. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.garch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) garch object — glance.garch","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. method method used. nobs Number observations used. p.value P-value corresponding test statistic. statistic Test statistic. parameter Parameter field htest, typically degrees freedom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) geeglm object — glance.geeglm","title":"Glance at a(n) geeglm object — glance.geeglm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) geeglm object — glance.geeglm","text":"","code":"# S3 method for class 'geeglm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) geeglm object — glance.geeglm","text":"x geeglm object returned call geepack::geeglm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) geeglm object — glance.geeglm","text":"tibble::tibble() exactly one row columns: alpha Estimated correlation parameter geepack::geeglm. df.residual Residual degrees freedom. gamma Estimated scale parameter geepack::geeglm. max.cluster.size Max number elements clusters. n.clusters Number clusters.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.geeglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) geeglm object — glance.geeglm","text":"","code":"# load modeling library library(geepack) # load data data(state) ds <- data.frame(state.region, state.x77) # fit model geefit <- geeglm(Income ~ Frost + Murder, id = state.region, data = ds, corstr = \"exchangeable\" ) # summarize model fit with tidiers tidy(geefit) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4406. 407. 117. 0 #> 2 Frost 1.69 2.25 0.562 0.453 #> 3 Murder -22.7 31.4 0.522 0.470 tidy(geefit, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4406. 407. 117. 0 3608. 5205. #> 2 Frost 1.69 2.25 0.562 0.453 -2.72 6.10 #> 3 Murder -22.7 31.4 0.522 0.470 -84.2 38.8"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) glm object — glance.glm","title":"Glance at a(n) glm object — glance.glm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) glm object — glance.glm","text":"","code":"# S3 method for class 'glm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) glm object — glance.glm","text":"x glm object returned stats::glm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) glm object — glance.glm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) glm object — glance.glm","text":"","code":"g <- glm(am ~ mpg, mtcars, family = \"binomial\") glance(g) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -14.8 33.7 36.6 29.7 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) glmRob object — glance.glmRob","title":"Glance at a(n) glmRob object — glance.glmRob","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) glmRob object — glance.glmRob","text":"","code":"# S3 method for class 'glmRob' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) glmRob object — glance.glmRob","text":"x glmRob object returned robust::glmRob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) glmRob object — glance.glmRob","text":"tibble::tibble() exactly one row columns: deviance Deviance model. df.residual Residual degrees freedom. nobs Number observations used. null.deviance Deviance null model. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) glmRob object — glance.glmRob","text":"","code":"# load libraries for models and data library(robust) # fit model gm <- glmRob(am ~ wt, data = mtcars, family = \"binomial\") # summarize model fit with tidiers tidy(gm) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 12.0 4.51 2.67 0.00759 #> 2 wt -4.02 1.44 -2.80 0.00509 glance(gm) #> # A tibble: 1 × 5 #> deviance sigma null.deviance df.residual nobs #> #> 1 19.2 0.800 44.4 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) glmnet object — glance.glmnet","title":"Glance at a(n) glmnet object — glance.glmnet","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) glmnet object — glance.glmnet","text":"","code":"# S3 method for class 'glmnet' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) glmnet object — glance.glmnet","text":"x glmnet object returned glmnet::glmnet(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) glmnet object — glance.glmnet","text":"tibble::tibble() exactly one row columns: nobs Number observations used. npasses Total passes data across lambda values. nulldev Null deviance.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) glmnet object — glance.glmnet","text":"","code":"# load libraries for models and data library(glmnet) set.seed(2014) x <- matrix(rnorm(100 * 20), 100, 20) y <- rnorm(100) fit1 <- glmnet(x, y) # summarize model fit with tidiers + visualization tidy(fit1) #> # A tibble: 1,086 × 5 #> term step estimate lambda dev.ratio #> #> 1 (Intercept) 1 -0.207 0.152 0 #> 2 (Intercept) 2 -0.208 0.139 0.00464 #> 3 (Intercept) 3 -0.209 0.127 0.0111 #> 4 (Intercept) 4 -0.210 0.115 0.0165 #> 5 (Intercept) 5 -0.210 0.105 0.0240 #> 6 (Intercept) 6 -0.210 0.0957 0.0321 #> 7 (Intercept) 7 -0.210 0.0872 0.0412 #> 8 (Intercept) 8 -0.210 0.0795 0.0497 #> 9 (Intercept) 9 -0.209 0.0724 0.0593 #> 10 (Intercept) 10 -0.208 0.0660 0.0682 #> # ℹ 1,076 more rows glance(fit1) #> # A tibble: 1 × 3 #> nulldev npasses nobs #> #> 1 104. 255 100 library(dplyr) library(ggplot2) tidied <- tidy(fit1) %>% filter(term != \"(Intercept)\") ggplot(tidied, aes(step, estimate, group = term)) + geom_line() ggplot(tidied, aes(lambda, estimate, group = term)) + geom_line() + scale_x_log10() ggplot(tidied, aes(lambda, dev.ratio)) + geom_line() # works for other types of regressions as well, such as logistic g2 <- sample(1:2, 100, replace = TRUE) fit2 <- glmnet(x, g2, family = \"binomial\") tidy(fit2) #> # A tibble: 947 × 5 #> term step estimate lambda dev.ratio #> #> 1 (Intercept) 1 0.282 0.0906 -1.62e-15 #> 2 (Intercept) 2 0.281 0.0826 6.28e- 3 #> 3 (Intercept) 3 0.279 0.0753 1.55e- 2 #> 4 (Intercept) 4 0.277 0.0686 2.48e- 2 #> 5 (Intercept) 5 0.284 0.0625 4.17e- 2 #> 6 (Intercept) 6 0.293 0.0569 5.79e- 2 #> 7 (Intercept) 7 0.303 0.0519 7.39e- 2 #> 8 (Intercept) 8 0.314 0.0473 8.94e- 2 #> 9 (Intercept) 9 0.325 0.0431 1.03e- 1 #> 10 (Intercept) 10 0.336 0.0392 1.14e- 1 #> # ℹ 937 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) gmm object — glance.gmm","title":"Glance at a(n) gmm object — glance.gmm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) gmm object — glance.gmm","text":"","code":"# S3 method for class 'gmm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) gmm object — glance.gmm","text":"x gmm object returned gmm::gmm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) gmm object — glance.gmm","text":"tibble::tibble() exactly one row columns: df Degrees freedom used model. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.gmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) gmm object — glance.gmm","text":"","code":"# load libraries for models and data library(gmm) # examples come from the \"gmm\" package # CAPM test with GMM data(Finance) r <- Finance[1:300, 1:10] rm <- Finance[1:300, \"rm\"] rf <- Finance[1:300, \"rf\"] z <- as.matrix(r - rf) t <- nrow(z) zm <- rm - rf h <- matrix(zm, t, 1) res <- gmm(z ~ zm, x = h) # tidy result tidy(res) #> # A tibble: 20 × 5 #> term estimate std.error statistic p.value #> #> 1 WMK_(Intercept) -0.00467 0.0566 -0.0824 9.34e- 1 #> 2 UIS_(Intercept) 0.102 0.126 0.816 4.15e- 1 #> 3 ORB_(Intercept) 0.146 0.203 0.718 4.73e- 1 #> 4 MAT_(Intercept) 0.0359 0.110 0.326 7.45e- 1 #> 5 ABAX_(Intercept) 0.0917 0.288 0.318 7.50e- 1 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 #> 7 EMR_(Intercept) 0.0299 0.0552 0.542 5.88e- 1 #> 8 JCS_(Intercept) 0.117 0.155 0.756 4.50e- 1 #> 9 VOXX_(Intercept) 0.0209 0.182 0.115 9.09e- 1 #> 10 ZOOM_(Intercept) -0.219 0.202 -1.08 2.79e- 1 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 tidy(res, conf.int = TRUE) #> # A tibble: 20 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercep… -0.00467 0.0566 -0.0824 9.34e- 1 -0.116 0.106 #> 2 UIS_(Intercep… 0.102 0.126 0.816 4.15e- 1 -0.144 0.348 #> 3 ORB_(Intercep… 0.146 0.203 0.718 4.73e- 1 -0.252 0.544 #> 4 MAT_(Intercep… 0.0359 0.110 0.326 7.45e- 1 -0.180 0.252 #> 5 ABAX_(Interce… 0.0917 0.288 0.318 7.50e- 1 -0.473 0.656 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 -0.129 0.175 #> 7 EMR_(Intercep… 0.0299 0.0552 0.542 5.88e- 1 -0.0782 0.138 #> 8 JCS_(Intercep… 0.117 0.155 0.756 4.50e- 1 -0.186 0.420 #> 9 VOXX_(Interce… 0.0209 0.182 0.115 9.09e- 1 -0.335 0.377 #> 10 ZOOM_(Interce… -0.219 0.202 -1.08 2.79e- 1 -0.616 0.177 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 0.0708 0.564 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 0.812 1.71 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 0.654 2.33 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 0.588 1.44 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 -0.0451 2.22 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 0.547 1.15 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 0.545 0.936 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 0.277 1.64 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 0.758 2.21 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 1.45 2.71 tidy(res, conf.int = TRUE, conf.level = .99) #> # A tibble: 20 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercep… -0.00467 0.0566 -0.0824 9.34e- 1 -0.151 0.141 #> 2 UIS_(Intercep… 0.102 0.126 0.816 4.15e- 1 -0.221 0.426 #> 3 ORB_(Intercep… 0.146 0.203 0.718 4.73e- 1 -0.377 0.669 #> 4 MAT_(Intercep… 0.0359 0.110 0.326 7.45e- 1 -0.248 0.320 #> 5 ABAX_(Interce… 0.0917 0.288 0.318 7.50e- 1 -0.650 0.834 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 -0.176 0.223 #> 7 EMR_(Intercep… 0.0299 0.0552 0.542 5.88e- 1 -0.112 0.172 #> 8 JCS_(Intercep… 0.117 0.155 0.756 4.50e- 1 -0.281 0.515 #> 9 VOXX_(Interce… 0.0209 0.182 0.115 9.09e- 1 -0.447 0.489 #> 10 ZOOM_(Interce… -0.219 0.202 -1.08 2.79e- 1 -0.740 0.302 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 -0.00656 0.641 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 0.671 1.85 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 0.391 2.60 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 0.454 1.58 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 -0.401 2.58 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 0.453 1.25 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 0.484 0.998 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 0.0627 1.85 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 0.530 2.43 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 1.25 2.91 # coefficient plot library(ggplot2) library(dplyr) tidy(res, conf.int = TRUE) %>% mutate(variable = reorder(term, estimate)) %>% ggplot(aes(estimate, variable)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_vline(xintercept = 0, color = \"red\", lty = 2) # from a function instead of a matrix g <- function(theta, x) { e <- x[, 2:11] - theta[1] - (x[, 1] - theta[1]) %*% matrix(theta[2:11], 1, 10) gmat <- cbind(e, e * c(x[, 1])) return(gmat) } x <- as.matrix(cbind(rm, r)) res_black <- gmm(g, x = x, t0 = rep(0, 11)) tidy(res_black) #> # A tibble: 11 × 5 #> term estimate std.error statistic p.value #> #> 1 Theta[1] 0.516 0.172 3.00 2.72e- 3 #> 2 Theta[2] 1.12 0.116 9.65 5.02e-22 #> 3 Theta[3] 0.680 0.197 3.45 5.65e- 4 #> 4 Theta[4] -0.0322 0.424 -0.0761 9.39e- 1 #> 5 Theta[5] 0.850 0.155 5.49 4.05e- 8 #> 6 Theta[6] -0.205 0.479 -0.429 6.68e- 1 #> 7 Theta[7] 0.625 0.122 5.14 2.73e- 7 #> 8 Theta[8] 1.05 0.0687 15.3 5.03e-53 #> 9 Theta[9] 0.640 0.233 2.75 5.92e- 3 #> 10 Theta[10] 0.596 0.295 2.02 4.36e- 2 #> 11 Theta[11] 1.16 0.240 4.82 1.45e- 6 tidy(res_black, conf.int = TRUE) #> # A tibble: 11 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Theta[1] 0.516 0.172 3.00 2.72e- 3 0.178 0.853 #> 2 Theta[2] 1.12 0.116 9.65 5.02e-22 0.889 1.34 #> 3 Theta[3] 0.680 0.197 3.45 5.65e- 4 0.293 1.07 #> 4 Theta[4] -0.0322 0.424 -0.0761 9.39e- 1 -0.862 0.798 #> 5 Theta[5] 0.850 0.155 5.49 4.05e- 8 0.546 1.15 #> 6 Theta[6] -0.205 0.479 -0.429 6.68e- 1 -1.14 0.733 #> 7 Theta[7] 0.625 0.122 5.14 2.73e- 7 0.387 0.864 #> 8 Theta[8] 1.05 0.0687 15.3 5.03e-53 0.919 1.19 #> 9 Theta[9] 0.640 0.233 2.75 5.92e- 3 0.184 1.10 #> 10 Theta[10] 0.596 0.295 2.02 4.36e- 2 0.0171 1.17 #> 11 Theta[11] 1.16 0.240 4.82 1.45e- 6 0.686 1.63 # APT test with Fama-French factors and GMM f1 <- zm f2 <- Finance[1:300, \"hml\"] - rf f3 <- Finance[1:300, \"smb\"] - rf h <- cbind(f1, f2, f3) res2 <- gmm(z ~ f1 + f2 + f3, x = h) td2 <- tidy(res2, conf.int = TRUE) td2 #> # A tibble: 40 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercept) -0.0240 0.0548 -0.438 0.662 -0.131 0.0834 #> 2 UIS_(Intercept) 0.0723 0.127 0.567 0.570 -0.177 0.322 #> 3 ORB_(Intercept) 0.114 0.212 0.534 0.593 -0.303 0.530 #> 4 MAT_(Intercept) 0.0694 0.0979 0.709 0.478 -0.122 0.261 #> 5 ABAX_(Intercep… 0.0668 0.275 0.242 0.808 -0.473 0.606 #> 6 T_(Intercept) 0.0195 0.0745 0.262 0.793 -0.126 0.165 #> 7 EMR_(Intercept) 0.0217 0.0538 0.404 0.687 -0.0837 0.127 #> 8 JCS_(Intercept) 0.0904 0.154 0.586 0.558 -0.212 0.393 #> 9 VOXX_(Intercep… -0.00706 0.179 -0.0394 0.969 -0.359 0.344 #> 10 ZOOM_(Intercep… -0.189 0.215 -0.878 0.380 -0.610 0.233 #> # ℹ 30 more rows # coefficient plot td2 %>% mutate(variable = reorder(term, estimate)) %>% ggplot(aes(estimate, variable)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_vline(xintercept = 0, color = \"red\", lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) ivreg object — glance.ivreg","title":"Glance at a(n) ivreg object — glance.ivreg","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) ivreg object — glance.ivreg","text":"","code":"# S3 method for class 'ivreg' glance(x, diagnostics = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) ivreg object — glance.ivreg","text":"x ivreg object created call AER::ivreg(). diagnostics Logical indicating whether return Wu-Hausman Sargan diagnostic information. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) ivreg object — glance.ivreg","text":"tidier currently supports ivreg-classed objects outputted AER package. ivreg package also outputs objects class ivreg, supported later release.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Glance at a(n) ivreg object — glance.ivreg","text":"Beginning 0.7.0, glance.ivreg returns statistics Wu-Hausman test endogeneity Sargan test overidentifying restrictions. Sargan test values returned NA number instruments greater number endogenous regressors.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) ivreg object — glance.ivreg","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. df Degrees freedom used model. df.residual Residual degrees freedom. nobs Number observations used. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Wald test statistic. p.value P-value Wald test.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ivreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) ivreg object — glance.ivreg","text":"","code":"# load libraries for models and data library(AER) # load data data(\"CigarettesSW\", package = \"AER\") # fit model ivr <- ivreg( log(packs) ~ income | population, data = CigarettesSW, subset = year == \"1995\" ) # summarize model fit with tidiers tidy(ivr) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 tidy(ivr, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 4.52e+0 4.70e+ 0 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 -1.03e-9 -1.13e-10 tidy(ivr, conf.int = TRUE, instruments = TRUE) #> # A tibble: 1 × 5 #> term num.df den.df statistic p.value #> #> 1 income 1 46 3329. 1.46e-44 augment(ivr) #> # A tibble: 48 × 6 #> .rownames `log(packs)` income population .fitted .resid #> #> 1 49 4.62 83903280 4262731 4.56 0.0522 #> 2 50 4.71 45995496 2480121 4.59 0.124 #> 3 51 4.28 88870496 4306908 4.56 -0.285 #> 4 52 4.04 771470144 31493524 4.17 -0.131 #> 5 53 4.41 92946544 3738061 4.56 -0.145 #> 6 54 4.38 104315120 3265293 4.55 -0.177 #> 7 55 4.82 18237436 718265 4.60 0.223 #> 8 56 4.53 333525344 14185403 4.42 0.112 #> 9 57 4.58 159800448 7188538 4.52 0.0591 #> 10 58 4.53 60170928 2840860 4.58 -0.0512 #> # ℹ 38 more rows augment(ivr, data = CigarettesSW) #> # A tibble: 96 × 11 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.56 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.59 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.56 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.17 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.56 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.55 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.60 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.42 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.52 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.58 #> # ℹ 86 more rows #> # ℹ 1 more variable: .resid augment(ivr, newdata = CigarettesSW) #> # A tibble: 96 × 10 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.59 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.60 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.59 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.36 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.58 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.58 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.61 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.52 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.57 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.59 #> # ℹ 86 more rows glance(ivr) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.131 0.112 0.229 5.98 0.0184 2 46 48"},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) kmeans object — glance.kmeans","title":"Glance at a(n) kmeans object — glance.kmeans","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) kmeans object — glance.kmeans","text":"","code":"# S3 method for class 'kmeans' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) kmeans object — glance.kmeans","text":"x kmeans object created stats::kmeans(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) kmeans object — glance.kmeans","text":"tibble::tibble() exactly one row columns: betweenss total -cluster sum squares. iter Iterations algorithm/fitting procedure completed. tot.withinss total within-cluster sum squares. totss total sum squares.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.kmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) kmeans object — glance.kmeans","text":"","code":"library(cluster) library(modeldata) library(dplyr) data(hpc_data) x <- hpc_data[, 2:5] fit <- pam(x, k = 4) tidy(fit) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(fit) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(fit, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lavaan object — glance.lavaan","title":"Glance at a(n) lavaan object — glance.lavaan","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lavaan object — glance.lavaan","text":"","code":"# S3 method for class 'lavaan' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lavaan object — glance.lavaan","text":"x lavaan object, returned lavaan::cfa(), lavaan::sem(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lavaan object — glance.lavaan","text":"one-row tibble::tibble columns: chisq Model chi squared npar Number parameters model rmsea Root mean square error approximation rmsea.conf.high 95 percent upper bound RMSEA srmr Standardised root mean residual agfi Adjusted goodness fit cfi Comparative fit index tli Tucker Lewis index AIC Akaike information criterion BIC Bayesian information criterion ngroups Number groups model nobs Number observations included norig Number observation original dataset nexcluded Number excluded observations converged Logical - model converge estimator Estimator used missing_method Method eliminating missing data recommendations reporting SEM CFA models see Schreiber, J. B. (2017). Update core reporting practices structural equation modeling. Research Social Administrative Pharmacy, 13(3), 634-643. https://doi.org/10.1016/j.sapharm.2016.06.006","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.lavaan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lavaan object — glance.lavaan","text":"","code":"library(lavaan) #> This is lavaan 0.6-19 #> lavaan is FREE software! Please report any bugs. # fit model cfa.fit <- cfa( \"F =~ x1 + x2 + x3 + x4 + x5\", data = HolzingerSwineford1939, group = \"school\" ) # summarize model fit with tidiers glance(cfa.fit) #> # A tibble: 1 × 17 #> agfi AIC BIC cfi chisq npar rmsea rmsea.conf.high srmr tli #> #> 1 0.971 4473. 4584. 0.766 99.3 30 0.244 0.288 0.115 0.533 #> # ℹ 7 more variables: converged , estimator , ngroups , #> # missing_method , nobs , norig , nexcluded "},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lm object — glance.lm","title":"Glance at a(n) lm object — glance.lm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lm object — glance.lm","text":"","code":"# S3 method for class 'lm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lm object — glance.lm","text":"x lm object created stats::lm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lm object — glance.lm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic. df degrees freedom numerator overall F-statistic. new broom 0.7.0. Previously, reported rank design matrix, one numerator degrees freedom overall F-statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lm object — glance.lm","text":"","code":"library(ggplot2) library(dplyr) mod <- lm(mpg ~ wt + qsec, data = mtcars) tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # coefficient plot d <- tidy(mod, conf.int = TRUE) ggplot(d, aes(estimate, term, xmin = conf.low, xmax = conf.high, height = 0)) + geom_point() + geom_vline(xintercept = 0, lty = 4) + geom_errorbarh() # aside: There are tidy() and glance() methods for lm.summary objects too. # this can be useful when you want to conserve memory by converting large lm # objects into their leaner summary.lm equivalents. s <- summary(mod) tidy(s, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(s) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32 augment(mod) #> # A tibble: 32 × 10 #> .rownames mpg wt qsec .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 0.0693 2.64 2.63e-3 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 0.0444 2.64 5.59e-6 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 0.0607 2.60 2.17e-2 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 0.0576 2.64 1.05e-4 #> 5 Hornet Sportab… 18.7 3.44 17.0 18.2 0.504 0.0389 2.64 5.29e-4 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 0.0957 2.58 5.10e-2 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 0.0729 2.61 1.93e-2 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 0.0791 2.61 2.18e-2 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 0.295 2.59 1.59e-1 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 0.0358 2.64 6.55e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid augment(mod, mtcars, interval = \"confidence\") #> # A tibble: 32 × 20 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 9 more variables: carb , .fitted , .lower , #> # .upper , .resid , .hat , .sigma , .cooksd , #> # .std.resid # predict on new data newdata <- mtcars %>% head(6) %>% mutate(wt = wt + 1) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid # ggplot2 example where we also construct 95% prediction interval # simpler bivariate model since we're plotting in 2D mod2 <- lm(mpg ~ wt, data = mtcars) au <- augment(mod2, newdata = newdata, interval = \"prediction\") ggplot(au, aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) + geom_ribbon(aes(ymin = .lower, ymax = .upper), col = NA, alpha = 0.3) # predict on new data without outcome variable. Output does not include .resid newdata <- newdata %>% select(-mpg) augment(mod, newdata = newdata) #> # A tibble: 6 × 12 #> .rownames cyl disp hp drat wt qsec vs am gear carb #> #> 1 Mazda RX4 6 160 110 3.9 3.62 16.5 0 1 4 4 #> 2 Mazda RX4 W… 6 160 110 3.9 3.88 17.0 0 1 4 4 #> 3 Datsun 710 4 108 93 3.85 3.32 18.6 1 1 4 1 #> 4 Hornet 4 Dr… 6 258 110 3.08 4.22 19.4 1 0 3 1 #> 5 Hornet Spor… 8 360 175 3.15 4.44 17.0 0 0 3 2 #> 6 Valiant 6 225 105 2.76 4.46 20.2 1 0 3 1 #> # ℹ 1 more variable: .fitted au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + geom_vline(size = 2, colour = \"white\", xintercept = 0) + geom_hline(size = 2, colour = \"white\", yintercept = 0) + geom_point() + geom_smooth(se = FALSE) #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' plot(mod, which = 6) ggplot(au, aes(.hat, .cooksd)) + geom_vline(xintercept = 0, colour = NA) + geom_abline(slope = seq(0, 3, by = 0.5), colour = \"white\") + geom_smooth(se = FALSE) + geom_point() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # column-wise models a <- matrix(rnorm(20), nrow = 10) b <- a + rnorm(length(a)) result <- lm(b ~ a) tidy(result) #> # A tibble: 6 × 6 #> response term estimate std.error statistic p.value #> #> 1 Y1 (Intercept) 0.591 0.359 1.64 0.144 #> 2 Y1 a1 0.971 0.284 3.42 0.0111 #> 3 Y1 a2 -0.0905 0.414 -0.219 0.833 #> 4 Y2 (Intercept) 0.0105 0.350 0.0299 0.977 #> 5 Y2 a1 0.00789 0.277 0.0285 0.978 #> 6 Y2 a2 1.90 0.403 4.72 0.00216"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lmRob object — glance.lmRob","title":"Glance at a(n) lmRob object — glance.lmRob","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lmRob object — glance.lmRob","text":"","code":"# S3 method for class 'lmRob' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lmRob object — glance.lmRob","text":"x lmRob object returned robust::lmRob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lmRob object — glance.lmRob","text":"tibble::tibble() exactly one row columns: deviance Deviance model. df.residual Residual degrees freedom. nobs Number observations used. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lmRob object — glance.lmRob","text":"","code":"# load modeling library library(robust) # fit model m <- lmRob(mpg ~ wt, data = mtcars) # summarize model fit with tidiers tidy(m) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 35.6 3.58 9.93 5.37e-11 #> 2 wt -4.91 1.09 -4.49 9.67e- 5 augment(m) #> # A tibble: 32 × 4 #> .rownames mpg wt .fitted #> #> 1 Mazda RX4 21 2.62 22.7 #> 2 Mazda RX4 Wag 21 2.88 21.4 #> 3 Datsun 710 22.8 2.32 24.2 #> 4 Hornet 4 Drive 21.4 3.22 19.8 #> 5 Hornet Sportabout 18.7 3.44 18.7 #> 6 Valiant 18.1 3.46 18.6 #> 7 Duster 360 14.3 3.57 18.0 #> 8 Merc 240D 24.4 3.19 19.9 #> 9 Merc 230 22.8 3.15 20.1 #> 10 Merc 280 19.2 3.44 18.7 #> # ℹ 22 more rows glance(m) #> # A tibble: 1 × 5 #> r.squared deviance sigma df.residual nobs #> #> 1 0.567 136. 2.95 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lmodel2 object — glance.lmodel2","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"","code":"# S3 method for class 'lmodel2' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"x lmodel2 object returned lmodel2::lmodel2(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"tibble::tibble() exactly one row columns: nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. theta Angle OLS lines `lm(y ~ x)` `lm(x ~ y)` H H statistic computing confidence interval major axis slope","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.lmodel2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lmodel2 object — glance.lmodel2","text":"","code":"# load libraries for models and data library(lmodel2) data(mod2ex2) Ex2.res <- lmodel2(Prey ~ Predators, data = mod2ex2, \"relative\", \"relative\", 99) Ex2.res #> #> Model II regression #> #> Call: lmodel2(formula = Prey ~ Predators, data = mod2ex2, range.y #> = \"relative\", range.x = \"relative\", nperm = 99) #> #> n = 20 r = 0.8600787 r-square = 0.7397354 #> Parametric P-values: 2-tailed = 1.161748e-06 1-tailed = 5.808741e-07 #> Angle between the two OLS regression lines = 5.106227 degrees #> #> Permutation tests of OLS, MA, RMA slopes: 1-tailed, tail corresponding to sign #> A permutation test of r is equivalent to a permutation test of the OLS slope #> P-perm for SMA = NA because the SMA slope cannot be tested #> #> Regression results #> Method Intercept Slope Angle (degrees) P-perm (1-tailed) #> 1 OLS 20.02675 2.631527 69.19283 0.01 #> 2 MA 13.05968 3.465907 73.90584 0.01 #> 3 SMA 16.45205 3.059635 71.90073 NA #> 4 RMA 17.25651 2.963292 71.35239 0.01 #> #> Confidence intervals #> Method 2.5%-Intercept 97.5%-Intercept 2.5%-Slope 97.5%-Slope #> 1 OLS 12.490993 27.56251 1.858578 3.404476 #> 2 MA 1.347422 19.76310 2.663101 4.868572 #> 3 SMA 9.195287 22.10353 2.382810 3.928708 #> 4 RMA 8.962997 23.84493 2.174260 3.956527 #> #> Eigenvalues: 269.8212 6.418234 #> #> H statistic used for computing C.I. of MA: 0.006120651 #> # summarize model fit with tidiers + visualization tidy(Ex2.res) #> # A tibble: 8 × 6 #> method term estimate conf.low conf.high p.value #> #> 1 MA Intercept 13.1 1.35 19.8 0.01 #> 2 MA Slope 3.47 2.66 4.87 0.01 #> 3 OLS Intercept 20.0 12.5 27.6 0.01 #> 4 OLS Slope 2.63 1.86 3.40 0.01 #> 5 RMA Intercept 17.3 8.96 23.8 0.01 #> 6 RMA Slope 2.96 2.17 3.96 0.01 #> 7 SMA Intercept 16.5 9.20 22.1 NA #> 8 SMA Slope 3.06 2.38 3.93 NA glance(Ex2.res) #> # A tibble: 1 × 5 #> r.squared theta p.value H nobs #> #> 1 0.740 5.11 0.00000116 0.00612 20 # this allows coefficient plots with ggplot2 library(ggplot2) ggplot(tidy(Ex2.res), aes(estimate, term, color = method)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))"},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) margins object — glance.margins","title":"Glance at a(n) margins object — glance.margins","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) margins object — glance.margins","text":"","code":"# S3 method for class 'margins' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) margins object — glance.margins","text":"x margins object returned margins::margins(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) margins object — glance.margins","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. df Degrees freedom used model. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.margins.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) margins object — glance.margins","text":"","code":"# load libraries for models and data library(margins) # example 1: logit model mod_log <- glm(am ~ cyl + hp + wt, data = mtcars, family = binomial) # get tidied \"naive\" model coefficients tidy(mod_log) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 #> 2 cyl 0.488 1.07 0.455 0.649 #> 3 hp 0.0326 0.0189 1.73 0.0840 #> 4 wt -9.15 4.15 -2.20 0.0276 # convert to marginal effects with margins() marg_log <- margins(mod_log) # get tidied marginal effects tidy(marg_log) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 cyl 0.0215 0.0470 0.457 0.648 #> 2 hp 0.00143 0.000618 2.32 0.0204 #> 3 wt -0.403 0.115 -3.49 0.000487 tidy(marg_log, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl 0.0215 0.0470 0.457 0.648 -0.0706 0.114 #> 2 hp 0.00143 0.000618 2.32 0.0204 0.000222 0.00265 #> 3 wt -0.403 0.115 -3.49 0.000487 -0.629 -0.176 # requires running the underlying model again. quick for this example glance(marg_log) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # augmenting `margins` outputs isn't supported, but # you can get the same info by running on the underlying model augment(mod_log) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid # example 2: threeway interaction terms mod_ie <- lm(mpg ~ wt * cyl * disp, data = mtcars) # get tidied \"naive\" model coefficients tidy(mod_ie) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 108. 23.3 4.62 0.000109 #> 2 wt -24.8 8.47 -2.92 0.00744 #> 3 cyl -10.8 4.34 -2.49 0.0201 #> 4 disp -0.593 0.213 -2.79 0.0102 #> 5 wt:cyl 2.91 1.42 2.05 0.0514 #> 6 wt:disp 0.184 0.0685 2.69 0.0127 #> 7 cyl:disp 0.0752 0.0268 2.81 0.00979 #> 8 wt:cyl:disp -0.0233 0.00861 -2.71 0.0123 # convert to marginal effects with margins() marg_ie0 <- margins(mod_ie) # get tidied marginal effects tidy(marg_ie0) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 cyl -3.85 1.46 -2.65 0.00812 #> 2 disp -0.0295 0.0174 -1.70 0.0900 #> 3 wt -2.01 1.17 -1.72 0.0860 glance(marg_ie0) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.896 0.865 2.21 29.4 2.75e-10 7 -66.2 150. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # marginal effects evaluated at specific values of a variable (here: cyl) marg_ie1 <- margins(mod_ie, at = list(cyl = c(4,6,8))) # summarize model fit with tidiers tidy(marg_ie1) #> # A tibble: 9 × 7 #> term at.variable at.value estimate std.error statistic p.value #> #> 1 cyl cyl 4 -3.85 1.46 -2.65 0.00808 #> 2 cyl cyl 6 -3.85 1.46 -2.65 0.00814 #> 3 cyl cyl 8 -3.85 1.46 -2.65 0.00812 #> 4 disp cyl 4 0.000978 0.0314 0.0312 0.975 #> 5 disp cyl 6 0.00134 0.0182 0.0737 0.941 #> 6 disp cyl 8 0.00170 0.0120 0.141 0.888 #> 7 wt cyl 4 7.91 5.06 1.56 0.118 #> 8 wt cyl 6 2.96 2.52 1.18 0.239 #> 9 wt cyl 8 -1.98 2.40 -0.825 0.409 # marginal effects of one interaction variable (here: wt), modulated at # specific values of the two other interaction variables (here: cyl and drat) marg_ie2 <- margins(mod_ie, variables = \"wt\", at = list(cyl = c(4,6,8), drat = c(3, 3.5, 4))) # summarize model fit with tidiers tidy(marg_ie2) #> # A tibble: 18 × 7 #> term at.variable at.value estimate std.error statistic p.value #> #> 1 wt cyl 4 7.91 5.06 1.56 0.118 #> 2 wt drat 3 7.91 5.06 1.56 0.118 #> 3 wt cyl 4 7.91 5.06 1.56 0.118 #> 4 wt drat 3.5 7.91 5.06 1.56 0.118 #> 5 wt cyl 4 7.91 5.06 1.56 0.118 #> 6 wt drat 4 7.91 5.06 1.56 0.118 #> 7 wt cyl 6 2.96 2.52 1.18 0.239 #> 8 wt drat 3 2.96 2.52 1.18 0.239 #> 9 wt cyl 6 2.96 2.52 1.18 0.239 #> 10 wt drat 3.5 2.96 2.52 1.18 0.239 #> 11 wt cyl 6 2.96 2.52 1.18 0.239 #> 12 wt drat 4 2.96 2.52 1.18 0.239 #> 13 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 14 wt drat 3 -1.98 2.40 -0.825 0.409 #> 15 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 16 wt drat 3.5 -1.98 2.40 -0.825 0.409 #> 17 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 18 wt drat 4 -1.98 2.40 -0.825 0.409"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) mfx object — glance.mfx","title":"Glance at a(n) mfx object — glance.mfx","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) mfx object — glance.mfx","text":"","code":"# S3 method for class 'mfx' glance(x, ...) # S3 method for class 'logitmfx' glance(x, ...) # S3 method for class 'negbinmfx' glance(x, ...) # S3 method for class 'poissonmfx' glance(x, ...) # S3 method for class 'probitmfx' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) mfx object — glance.mfx","text":"x logitmfx, negbinmfx, poissonmfx, probitmfx object. (Note betamfx objects receive set tidiers.) ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) mfx object — glance.mfx","text":"generic glance method wraps glance.glm() applicable objects mfx package.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) mfx object — glance.mfx","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) mfx object — glance.mfx","text":"","code":"# load libraries for models and data library(mfx) # get the marginal effects from a logit regression mod_logmfx <- logitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) tidy(mod_logmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0538 0.113 0.475 0.635 -0.178 0.286 #> 2 hp TRUE 0.00359 0.00290 1.24 0.216 -0.00236 0.00954 #> 3 wt TRUE -1.01 0.668 -1.51 0.131 -2.38 0.359 # compare with the naive model coefficients of the same logit call tidy( glm(am ~ cyl + hp + wt, family = binomial, data = mtcars), conf.int = TRUE ) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 8.56 44.3 #> 2 cyl 0.488 1.07 0.455 0.649 -1.53 3.12 #> 3 hp 0.0326 0.0189 1.73 0.0840 0.00332 0.0884 #> 4 wt -9.15 4.15 -2.20 0.0276 -21.4 -3.48 augment(mod_logmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_logmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # another example, this time using probit regression mod_probmfx <- probitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred tidy(mod_probmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0616 0.112 0.548 0.583 -0.169 0.292 #> 2 hp TRUE 0.00383 0.00282 1.36 0.174 -0.00194 0.00960 #> 3 wt TRUE -1.06 0.594 -1.78 0.0753 -2.27 0.160 augment(mod_probmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 1.21 0.490 0.308 0.585 2.05e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.129 1.27 0.249 0.526 1.36e-1 #> 3 Datsun 7… 1 4 93 2.32 1.85 0.256 0.134 0.594 1.48e-3 #> 4 Hornet 4… 0 6 110 3.22 -1.92 -0.237 0.116 0.594 1.05e-3 #> 5 Hornet S… 0 8 175 3.44 -1.25 -0.474 0.236 0.587 1.20e-2 #> 6 Valiant 0 6 105 3.46 -3.30 -0.0312 0.0111 0.596 1.39e-6 #> 7 Duster 3… 0 8 245 3.57 -0.595 -0.804 0.285 0.567 5.32e-2 #> 8 Merc 240D 0 4 62 3.19 -3.31 -0.0304 0.0179 0.596 2.15e-6 #> 9 Merc 230 0 4 95 3.15 -2.47 -0.116 0.130 0.596 2.89e-4 #> 10 Merc 280 0 6 123 3.44 -2.85 -0.0662 0.0315 0.596 1.84e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_probmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.80 17.6 23.5 9.59 28 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) mjoint object — glance.mjoint","title":"Glance at a(n) mjoint object — glance.mjoint","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) mjoint object — glance.mjoint","text":"","code":"# S3 method for class 'mjoint' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) mjoint object — glance.mjoint","text":"x mjoint object returned joineRML::mjoint(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) mjoint object — glance.mjoint","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. sigma2_j square root estimated residual variance j-th longitudinal process","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mjoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) mjoint object — glance.mjoint","text":"","code":"# broom only skips running these examples because the example models take a # while to generate—they should run just fine, though! if (FALSE) { # \\dontrun{ # load libraries for models and data library(joineRML) # fit a joint model with bivariate longitudinal outcomes data(heart.valve) hvd <- heart.valve[!is.na(heart.valve$log.grad) & !is.na(heart.valve$log.lvmi) & heart.valve$num <= 50, ] fit <- mjoint( formLongFixed = list( \"grad\" = log.grad ~ time + sex + hs, \"lvmi\" = log.lvmi ~ time + sex ), formLongRandom = list( \"grad\" = ~ 1 | num, \"lvmi\" = ~ time | num ), formSurv = Surv(fuyrs, status) ~ age, data = hvd, inits = list(\"gamma\" = c(0.11, 1.51, 0.80)), timeVar = \"time\" ) # extract the survival fixed effects tidy(fit) # extract the longitudinal fixed effects tidy(fit, component = \"longitudinal\") # extract the survival fixed effects with confidence intervals tidy(fit, ci = TRUE) # extract the survival fixed effects with confidence intervals based # on bootstrapped standard errors bSE <- bootSE(fit, nboot = 5, safe.boot = TRUE) tidy(fit, boot_se = bSE, ci = TRUE) # augment original data with fitted longitudinal values and residuals hvd2 <- augment(fit) # extract model statistics glance(fit) } # }"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) mlogit object — glance.mlogit","title":"Glance at a(n) mlogit object — glance.mlogit","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) mlogit object — glance.mlogit","text":"","code":"# S3 method for class 'mlogit' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) mlogit object — glance.mlogit","text":"x object returned mlogit::mlogit(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) mlogit object — glance.mlogit","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. rho2 McFadden's rho squared respect market shares (constants-) model. rho20 McFadden's rho squared respect equal shares (information) model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.mlogit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) mlogit object — glance.mlogit","text":"","code":"# load libraries for models and data library(mlogit) data(\"Fishing\", package = \"mlogit\") Fish <- dfidx(Fishing, varying = 2:9, shape = \"wide\", choice = \"mode\") # fit model m <- mlogit(mode ~ price + catch | income, data = Fish) # summarize model fit with tidiers tidy(m) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept):boat 0.527 0.223 2.37 1.79e- 2 #> 2 (Intercept):charter 1.69 0.224 7.56 3.95e-14 #> 3 (Intercept):pier 0.778 0.220 3.53 4.18e- 4 #> 4 price -0.0251 0.00173 -14.5 0 #> 5 catch 0.358 0.110 3.26 1.12e- 3 #> 6 income:boat 0.0000894 0.0000501 1.79 7.40e- 2 #> 7 income:charter -0.0000333 0.0000503 -0.661 5.08e- 1 #> 8 income:pier -0.000128 0.0000506 -2.52 1.18e- 2 augment(m) #> # A tibble: 4,728 × 9 #> id alternative chosen price catch income .probability .fitted #> #> 1 1 beach FALSE 158. 0.0678 7083. 0.125 -3.94 #> 2 1 boat FALSE 158. 0.260 7083. 0.427 -2.71 #> 3 1 charter TRUE 183. 0.539 7083. 0.339 -2.94 #> 4 1 pier FALSE 158. 0.0503 7083. 0.109 -4.07 #> 5 2 beach FALSE 15.1 0.105 1250. 0.116 -0.342 #> 6 2 boat FALSE 10.5 0.157 1250. 0.251 0.431 #> 7 2 charter TRUE 34.5 0.467 1250. 0.423 0.952 #> 8 2 pier FALSE 15.1 0.0451 1250. 0.210 0.255 #> 9 3 beach FALSE 162. 0.533 3750. 0.00689 -3.87 #> 10 3 boat TRUE 24.3 0.241 3750. 0.465 0.338 #> # ℹ 4,718 more rows #> # ℹ 1 more variable: .resid glance(m) #> # A tibble: 1 × 6 #> logLik rho2 rho20 AIC BIC nobs #> #> 1 -1215. 0.189 0.258 2446. NA 1182"},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) muhaz object — glance.muhaz","title":"Glance at a(n) muhaz object — glance.muhaz","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) muhaz object — glance.muhaz","text":"","code":"# S3 method for class 'muhaz' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) muhaz object — glance.muhaz","text":"x muhaz object returned muhaz::muhaz(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) muhaz object — glance.muhaz","text":"tibble::tibble() exactly one row columns: max.hazard Maximal estimated hazard. max.time maximum observed event censoring time. min.hazard Minimal estimated hazard. min.time minimum observed event censoring time. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.muhaz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) muhaz object — glance.muhaz","text":"","code":"# load libraries for models and data library(muhaz) library(survival) # fit model x <- muhaz(ovarian$futime, ovarian$fustat) # summarize model fit with tidiers tidy(x) #> # A tibble: 101 × 2 #> time estimate #> #> 1 0 0.000255 #> 2 7.44 0.000274 #> 3 14.9 0.000293 #> 4 22.3 0.000312 #> 5 29.8 0.000332 #> 6 37.2 0.000352 #> 7 44.6 0.000372 #> 8 52.1 0.000392 #> 9 59.5 0.000411 #> 10 67.0 0.000431 #> # ℹ 91 more rows glance(x) #> # A tibble: 1 × 5 #> nobs min.time max.time min.hazard max.hazard #> #> 1 26 0 744 0.000212 0.00111"},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) multinom object — glance.multinom","title":"Glance at a(n) multinom object — glance.multinom","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) multinom object — glance.multinom","text":"","code":"# S3 method for class 'multinom' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) multinom object — glance.multinom","text":"x multinom object returned nnet::multinom(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) multinom object — glance.multinom","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. deviance Deviance model. edf effective degrees freedom. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) multinom object — glance.multinom","text":"","code":"# load libraries for models and data library(nnet) #> #> Attaching package: ‘nnet’ #> The following object is masked from ‘package:mgcv’: #> #> multinom library(MASS) example(birthwt) #> #> brthwt> bwt <- with(birthwt, { #> brthwt+ race <- factor(race, labels = c(\"white\", \"black\", \"other\")) #> brthwt+ ptd <- factor(ptl > 0) #> brthwt+ ftv <- factor(ftv) #> brthwt+ levels(ftv)[-(1:2)] <- \"2+\" #> brthwt+ data.frame(low = factor(low), age, lwt, race, smoke = (smoke > 0), #> brthwt+ ptd, ht = (ht > 0), ui = (ui > 0), ftv) #> brthwt+ }) #> #> brthwt> options(contrasts = c(\"contr.treatment\", \"contr.poly\")) #> #> brthwt> glm(low ~ ., binomial, bwt) #> #> Call: glm(formula = low ~ ., family = binomial, data = bwt) #> #> Coefficients: #> (Intercept) age lwt raceblack raceother #> 0.82302 -0.03723 -0.01565 1.19241 0.74068 #> smokeTRUE ptdTRUE htTRUE uiTRUE ftv1 #> 0.75553 1.34376 1.91317 0.68020 -0.43638 #> ftv2+ #> 0.17901 #> #> Degrees of Freedom: 188 Total (i.e. Null); 178 Residual #> Null Deviance:\t 234.7 #> Residual Deviance: 195.5 \tAIC: 217.5 bwt.mu <- multinom(low ~ ., bwt) #> # weights: 12 (11 variable) #> initial value 131.004817 #> iter 10 value 98.029803 #> final value 97.737759 #> converged tidy(bwt.mu) #> # A tibble: 11 × 6 #> y.level term estimate std.error statistic p.value #> #> 1 1 (Intercept) 0.823 1.24 0.661 0.508 #> 2 1 age -0.0372 0.0387 -0.962 0.336 #> 3 1 lwt -0.0157 0.00708 -2.21 0.0271 #> 4 1 raceblack 1.19 0.536 2.22 0.0261 #> 5 1 raceother 0.741 0.462 1.60 0.109 #> 6 1 smokeTRUE 0.756 0.425 1.78 0.0755 #> 7 1 ptdTRUE 1.34 0.481 2.80 0.00518 #> 8 1 htTRUE 1.91 0.721 2.65 0.00794 #> 9 1 uiTRUE 0.680 0.464 1.46 0.143 #> 10 1 ftv1 -0.436 0.479 -0.910 0.363 #> 11 1 ftv2+ 0.179 0.456 0.392 0.695 glance(bwt.mu) #> # A tibble: 1 × 4 #> edf deviance AIC nobs #> #> 1 11 195. 217. 189 # or, for output from a multinomial logistic regression fit.gear <- multinom(gear ~ mpg + factor(am), data = mtcars) #> # weights: 12 (6 variable) #> initial value 35.155593 #> iter 10 value 14.156582 #> iter 20 value 14.031881 #> iter 30 value 14.025659 #> iter 40 value 14.021414 #> iter 50 value 14.019824 #> iter 60 value 14.019278 #> iter 70 value 14.018601 #> iter 80 value 14.018282 #> iter 80 value 14.018282 #> iter 90 value 14.017126 #> final value 14.015374 #> converged tidy(fit.gear) #> # A tibble: 6 × 6 #> y.level term estimate std.error statistic p.value #> #> 1 4 (Intercept) -11.2 5.32 -2.10 3.60e- 2 #> 2 4 mpg 0.525 0.268 1.96 5.02e- 2 #> 3 4 factor(am)1 11.9 66.9 0.178 8.59e- 1 #> 4 5 (Intercept) -18.4 67.9 -0.271 7.87e- 1 #> 5 5 mpg 0.366 0.292 1.25 2.10e- 1 #> 6 5 factor(am)1 22.4 2.17 10.3 4.54e-25 glance(fit.gear) #> # A tibble: 1 × 4 #> edf deviance AIC nobs #> #> 1 6 28.0 40.0 32"},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) negbin object — glance.negbin","title":"Glance at a(n) negbin object — glance.negbin","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) negbin object — glance.negbin","text":"","code":"# S3 method for class 'negbin' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) negbin object — glance.negbin","text":"x negbin object returned MASS::glm.nb(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) negbin object — glance.negbin","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.negbin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) negbin object — glance.negbin","text":"","code":"# load libraries for models and data library(MASS) # fit model r <- glm.nb(Days ~ Sex / (Age + Eth * Lrn), data = quine) # summarize model fit with tidiers tidy(r) #> # A tibble: 14 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 3.02 0.297 10.2 2.89e-24 #> 2 SexM -0.475 0.396 -1.20 2.29e- 1 #> 3 SexF:AgeF1 -0.709 0.323 -2.19 2.83e- 2 #> 4 SexM:AgeF1 -0.724 0.330 -2.19 2.85e- 2 #> 5 SexF:AgeF2 -0.615 0.371 -1.66 9.78e- 2 #> 6 SexM:AgeF2 0.628 0.274 2.30 2.17e- 2 #> 7 SexF:AgeF3 -0.342 0.327 -1.05 2.95e- 1 #> 8 SexM:AgeF3 1.15 0.314 3.67 2.46e- 4 #> 9 SexF:EthN -0.0731 0.265 -0.276 7.83e- 1 #> 10 SexM:EthN -0.679 0.256 -2.65 8.07e- 3 #> 11 SexF:LrnSL 0.944 0.322 2.93 3.43e- 3 #> 12 SexM:LrnSL 0.239 0.336 0.712 4.76e- 1 #> 13 SexF:EthN:LrnSL -1.36 0.377 -3.60 3.16e- 4 #> 14 SexM:EthN:LrnSL 0.761 0.441 1.73 8.45e- 2 glance(r) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 235. 145 -531.5125 1093. 1138. 168. 132 146"},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) nlrq object — glance.nlrq","title":"Glance at a(n) nlrq object — glance.nlrq","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) nlrq object — glance.nlrq","text":"","code":"# S3 method for class 'nlrq' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) nlrq object — glance.nlrq","text":"x nlrq object returned quantreg::nlrq(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) nlrq object — glance.nlrq","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. tau Quantile.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.nlrq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) nlrq object — glance.nlrq","text":"","code":"# load modeling library library(quantreg) # build artificial data with multiplicative error set.seed(1) dat <- NULL dat$x <- rep(1:25, 20) dat$y <- SSlogis(dat$x, 10, 12, 2) * rnorm(500, 1, 0.1) # fit the median using nlrq mod <- nlrq(y ~ SSlogis(x, Asym, mid, scal), data = dat, tau = 0.5, trace = TRUE ) #> 109.059 : 9.968027 11.947208 1.962113 #> final value 108.942725 #> converged #> lambda = 1 #> 108.9427 : 9.958648 11.943273 1.967144 #> final value 108.490939 #> stopped after 2 iterations #> lambda = 0.9750984 #> 108.4909 : 9.949430 11.987472 1.998607 #> final value 108.471416 #> converged #> lambda = 0.9999299 #> 108.4714 : 9.94163 11.99077 1.99344 #> final value 108.471243 #> converged #> lambda = 1 #> 108.4712 : 9.941008 11.990550 1.992921 #> final value 108.470935 #> converged #> lambda = 0.8621249 #> 108.4709 : 9.942734 11.992773 1.993209 #> final value 108.470923 #> converged #> lambda = 0.9999613 #> 108.4709 : 9.942629 11.992728 1.993136 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Asym 9.94 0.0841 118. 0 #> 2 mid 12.0 0.0673 178. 0 #> 3 scal 1.99 0.0248 80.3 0 glance(mod) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -429.0842 864. 877. 497 augment(mod) #> # A tibble: 500 × 4 #> x y .fitted .resid #> #> 1 1 0.0382 0.0399 -0.00171 #> 2 2 0.0682 0.0657 0.00250 #> 3 3 0.101 0.108 -0.00728 #> 4 4 0.209 0.177 0.0315 #> 5 5 0.303 0.289 0.0137 #> 6 6 0.435 0.469 -0.0332 #> 7 7 0.796 0.751 0.0448 #> 8 8 1.28 1.18 0.0982 #> 9 9 1.93 1.81 0.118 #> 10 10 2.61 2.67 -0.0671 #> # ℹ 490 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) nls object — glance.nls","title":"Glance at a(n) nls object — glance.nls","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) nls object — glance.nls","text":"","code":"# S3 method for class 'nls' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) nls object — glance.nls","text":"x nls object returned stats::nls(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) nls object — glance.nls","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.residual Residual degrees freedom. finTol achieved convergence tolerance. isConv Whether fit successfully converged. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.nls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) nls object — glance.nls","text":"","code":"# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 k 49.7 3.79 13.1 5.96e-14 #> 2 e 0.746 0.0199 37.5 8.86e-27 augment(n) #> # A tibble: 32 × 4 #> mpg wt .fitted .resid #> #> 1 21 2.62 23.0 -2.01 #> 2 21 2.88 21.4 -0.352 #> 3 22.8 2.32 25.1 -2.33 #> 4 21.4 3.22 19.3 2.08 #> 5 18.7 3.44 18.1 0.611 #> 6 18.1 3.46 18.0 0.117 #> 7 14.3 3.57 17.4 -3.11 #> 8 24.4 3.19 19.5 4.93 #> 9 22.8 3.15 19.7 3.10 #> 10 19.2 3.44 18.1 1.11 #> # ℹ 22 more rows glance(n) #> # A tibble: 1 × 9 #> sigma isConv finTol logLik AIC BIC deviance df.residual nobs #> #> 1 2.67 TRUE 0.00000204 -75.8 158. 162. 214. 30 32 library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata) #> # A tibble: 6 × 13 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 2 more variables: carb , .fitted "},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) orcutt object — glance.orcutt","title":"Glance at a(n) orcutt object — glance.orcutt","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) orcutt object — glance.orcutt","text":"","code":"# S3 method for class 'orcutt' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) orcutt object — glance.orcutt","text":"x orcutt object returned orcutt::cochrane.orcutt(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) orcutt object — glance.orcutt","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. dw.original Durbin-Watson statistic original fit. dw.transformed Durbin-Watson statistic transformed fit. nobs Number observations used. number.interaction Number interactions. p.value.original P-value original Durbin-Watson statistic. p.value.transformed P-value autocorrelation transformation. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. rho Spearman's rho autocorrelation","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.orcutt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) orcutt object — glance.orcutt","text":"","code":"# load libraries for models and data library(orcutt) # fit model and summarize results reg <- lm(mpg ~ wt + qsec + disp, mtcars) tidy(reg) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.8 5.94 3.33 0.00244 #> 2 wt -5.03 1.22 -4.11 0.000310 #> 3 qsec 0.927 0.342 2.71 0.0114 #> 4 disp -0.000128 0.0106 -0.0121 0.990 co <- cochrane.orcutt(reg) tidy(co) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 21.8 6.63 3.29 0.00279 #> 2 wt -4.85 1.33 -3.65 0.00112 #> 3 qsec 0.797 0.370 2.15 0.0402 #> 4 disp -0.00136 0.0110 -0.123 0.903 glance(co) #> # A tibble: 1 × 9 #> r.squared adj.r.squared rho number.interaction dw.original #> #> 1 0.799 0.777 0.268 7 1.50 #> # ℹ 4 more variables: p.value.original , dw.transformed , #> # p.value.transformed , nobs "},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) pam object — glance.pam","title":"Glance at a(n) pam object — glance.pam","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) pam object — glance.pam","text":"","code":"# S3 method for class 'pam' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) pam object — glance.pam","text":"x pam object returned cluster::pam() ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) pam object — glance.pam","text":"tibble::tibble() exactly one row columns: avg.silhouette.width average silhouette width dataset.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.pam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) pam object — glance.pam","text":"","code":"# load libraries for models and data library(dplyr) library(ggplot2) library(cluster) library(modeldata) data(hpc_data) x <- hpc_data[, 2:5] p <- pam(x, k = 4) # summarize model fit with tidiers + visualization tidy(p) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(p) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(p, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows augment(p, x) %>% ggplot(aes(compounds, input_fields)) + geom_point(aes(color = .cluster)) + geom_text(aes(label = cluster), data = tidy(p), size = 10)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) plm object — glance.plm","title":"Glance at a(n) plm object — glance.plm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) plm object — glance.plm","text":"","code":"# S3 method for class 'plm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) plm object — glance.plm","text":"x plm objected returned plm::plm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) plm object — glance.plm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. deviance Deviance model. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. statistic F-statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.plm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) plm object — glance.plm","text":"","code":"# load libraries for models and data library(plm) # load data data(\"Produc\", package = \"plm\") # fit model zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, index = c(\"state\", \"year\") ) # summarize model fit with tidiers summary(zz) #> Oneway (individual) effect Within Model #> #> Call: #> plm(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, #> data = Produc, index = c(\"state\", \"year\")) #> #> Balanced Panel: n = 48, T = 17, N = 816 #> #> Residuals: #> Min. 1st Qu. Median 3rd Qu. Max. #> -0.120456 -0.023741 -0.002041 0.018144 0.174718 #> #> Coefficients: #> Estimate Std. Error t-value Pr(>|t|) #> log(pcap) -0.02614965 0.02900158 -0.9017 0.3675 #> log(pc) 0.29200693 0.02511967 11.6246 < 2.2e-16 *** #> log(emp) 0.76815947 0.03009174 25.5273 < 2.2e-16 *** #> unemp -0.00529774 0.00098873 -5.3582 1.114e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Total Sum of Squares: 18.941 #> Residual Sum of Squares: 1.1112 #> R-Squared: 0.94134 #> Adj. R-Squared: 0.93742 #> F-statistic: 3064.81 on 4 and 764 DF, p-value: < 2.22e-16 tidy(zz) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 tidy(zz, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0830 0.0307 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.243 0.341 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.709 0.827 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00724 -0.00336 tidy(zz, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0739 0.0216 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.251 0.333 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.719 0.818 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00692 -0.00367 augment(zz) #> # A tibble: 816 × 7 #> `log(gsp)` `log(pcap)` `log(pc)` `log(emp)` unemp .fitted .resid #> #> 1 10.25478 9.617981 10.48553 6.918201 4.7 10.3 -0.046561413 #> 2 10.28790 9.648720 10.52675 6.929419 5.2 10.3 -0.030640422 #> 3 10.35147 9.678618 10.56283 6.977561 4.7 10.4 -0.016454312 #> 4 10.41721 9.705418 10.59873 7.034828 3.9 10.4 -0.008726974 #> 5 10.42671 9.726910 10.64679 7.064588 5.5 10.5 -0.027084312 #> 6 10.42240 9.759401 10.69130 7.052202 7.7 10.4 -0.022368930 #> 7 10.48470 9.783175 10.82420 7.095893 6.8 10.5 -0.036587629 #> 8 10.53111 9.804326 10.84125 7.146142 7.4 10.6 -0.030020604 #> 9 10.59573 9.824430 10.87055 7.197810 6.3 10.6 -0.018942497 #> 10 10.62082 9.845937 10.90643 7.216709 7.1 10.6 -0.014057170 #> # ℹ 806 more rows glance(zz) #> # A tibble: 1 × 7 #> r.squared adj.r.squared statistic p.value deviance df.residual nobs #> #> 1 0.941 0.937 3065. 0 1.11 764 816"},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) poLCA object — glance.poLCA","title":"Glance at a(n) poLCA object — glance.poLCA","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) poLCA object — glance.poLCA","text":"","code":"# S3 method for class 'poLCA' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) poLCA object — glance.poLCA","text":"x poLCA object returned poLCA::poLCA(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) poLCA object — glance.poLCA","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. chi.squared Pearson Chi-Square goodness fit statistic multiway tables. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. g.squared likelihood ratio/deviance statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.poLCA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) poLCA object — glance.poLCA","text":"","code":"# load libraries for models and data library(poLCA) library(dplyr) # generate data data(values) f <- cbind(A, B, C, D) ~ 1 # fit model M1 <- poLCA(f, values, nclass = 2, verbose = FALSE) M1 #> Conditional item response (column) probabilities, #> by outcome variable, for each class (row) #> #> $A #> Pr(1) Pr(2) #> class 1: 0.2864 0.7136 #> class 2: 0.0068 0.9932 #> #> $B #> Pr(1) Pr(2) #> class 1: 0.6704 0.3296 #> class 2: 0.0602 0.9398 #> #> $C #> Pr(1) Pr(2) #> class 1: 0.6460 0.3540 #> class 2: 0.0735 0.9265 #> #> $D #> Pr(1) Pr(2) #> class 1: 0.8676 0.1324 #> class 2: 0.2309 0.7691 #> #> Estimated class population shares #> 0.7208 0.2792 #> #> Predicted class memberships (by modal posterior prob.) #> 0.6713 0.3287 #> #> ========================================================= #> Fit for 2 latent classes: #> ========================================================= #> number of observations: 216 #> number of estimated parameters: 9 #> residual degrees of freedom: 6 #> maximum log-likelihood: -504.4677 #> #> AIC(2): 1026.935 #> BIC(2): 1057.313 #> G^2(2): 2.719922 (Likelihood ratio/deviance statistic) #> X^2(2): 2.719764 (Chi-square goodness of fit) #> # summarize model fit with tidiers + visualization tidy(M1) #> # A tibble: 16 × 5 #> variable class outcome estimate std.error #> #> 1 A 1 1 0.286 0.0393 #> 2 A 2 1 0.00681 0.0254 #> 3 A 1 2 0.714 0.0393 #> 4 A 2 2 0.993 0.0254 #> 5 B 1 1 0.670 0.0489 #> 6 B 2 1 0.0602 0.0649 #> 7 B 1 2 0.330 0.0489 #> 8 B 2 2 0.940 0.0649 #> 9 C 1 1 0.646 0.0482 #> 10 C 2 1 0.0735 0.0642 #> 11 C 1 2 0.354 0.0482 #> 12 C 2 2 0.927 0.0642 #> 13 D 1 1 0.868 0.0379 #> 14 D 2 1 0.231 0.0929 #> 15 D 1 2 0.132 0.0379 #> 16 D 2 2 0.769 0.0929 augment(M1) #> # A tibble: 216 × 7 #> A B C D X.Intercept. .class .probability #> #> 1 2 2 2 2 1 2 0.959 #> 2 2 2 2 2 1 2 0.959 #> 3 2 2 2 2 1 2 0.959 #> 4 2 2 2 2 1 2 0.959 #> 5 2 2 2 2 1 2 0.959 #> 6 2 2 2 2 1 2 0.959 #> 7 2 2 2 2 1 2 0.959 #> 8 2 2 2 2 1 2 0.959 #> 9 2 2 2 2 1 2 0.959 #> 10 2 2 2 2 1 2 0.959 #> # ℹ 206 more rows glance(M1) #> # A tibble: 1 × 8 #> logLik AIC BIC g.squared chi.squared df df.residual nobs #> #> 1 -504. 1027. 1057. 2.72 2.72 9 6 216 library(ggplot2) ggplot(tidy(M1), aes(factor(class), estimate, fill = factor(outcome))) + geom_bar(stat = \"identity\", width = 1) + facet_wrap(~variable) # three-class model with a single covariate. data(election) f2a <- cbind( MORALG, CARESG, KNOWG, LEADG, DISHONG, INTELG, MORALB, CARESB, KNOWB, LEADB, DISHONB, INTELB ) ~ PARTY nes2a <- poLCA(f2a, election, nclass = 3, nrep = 5, verbose = FALSE) td <- tidy(nes2a) td #> # A tibble: 144 × 5 #> variable class outcome estimate std.error #> #> 1 MORALG 1 1 Extremely well 0.108 0.0175 #> 2 MORALG 2 1 Extremely well 0.137 0.0182 #> 3 MORALG 3 1 Extremely well 0.622 0.0309 #> 4 MORALG 1 2 Quite well 0.383 0.0274 #> 5 MORALG 2 2 Quite well 0.668 0.0247 #> 6 MORALG 3 2 Quite well 0.335 0.0293 #> 7 MORALG 1 3 Not too well 0.304 0.0253 #> 8 MORALG 2 3 Not too well 0.180 0.0208 #> 9 MORALG 3 3 Not too well 0.0172 0.00841 #> 10 MORALG 1 4 Not well at all 0.205 0.0243 #> # ℹ 134 more rows ggplot(td, aes(outcome, estimate, color = factor(class), group = class)) + geom_line() + facet_wrap(~variable, nrow = 2) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) au <- augment(nes2a) au #> # A tibble: 1,300 × 16 #> MORALG CARESG KNOWG LEADG DISHONG INTELG MORALB CARESB KNOWB LEADB #> #> 1 3 Not too … 1 Ext… 2 Qu… 2 Qu… 3 Not … 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 2 1 Extremel… 2 Qui… 2 Qu… 1 Ex… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 3 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 2 Quit… 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 4 2 Quite we… 4 Not… 2 Qu… 3 No… 2 Quit… 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 5 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 4 Not… 4 No… 4 No… #> 6 2 Quite we… 2 Qui… 2 Qu… 3 No… 4 Not … 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 7 1 Extremel… 1 Ext… 1 Ex… 1 Ex… 4 Not … 1 Ext… 2 Qui… 4 Not… 2 Qu… 3 No… #> 8 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 2 Qui… 2 Qu… 2 Qu… #> 9 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 10 2 Quite we… 3 Not… 2 Qu… 2 Qu… 3 Not … 2 Qui… 2 Qui… 4 Not… 2 Qu… 4 No… #> # ℹ 1,290 more rows #> # ℹ 6 more variables: DISHONB , INTELB , X.Intercept. , #> # PARTY , .class , .probability count(au, .class) #> # A tibble: 3 × 2 #> .class n #> #> 1 1 444 #> 2 2 496 #> 3 3 360 # if the original data is provided, it leads to NAs in new columns # for rows that weren't predicted au2 <- augment(nes2a, data = election) au2 #> # A tibble: 1,785 × 20 #> MORALG CARESG KNOWG LEADG DISHONG INTELG MORALB CARESB KNOWB LEADB #> #> 1 3 Not too … 1 Ext… 2 Qu… 2 Qu… 3 Not … 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 2 4 Not well… 3 Not… 4 No… 3 No… 2 Quit… 2 Qui… NA NA 2 Qu… 3 No… #> 3 1 Extremel… 2 Qui… 2 Qu… 1 Ex… 3 Not … 2 Qui… 2 Qui… 2 Qui… 2 Qu… 3 No… #> 4 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 2 Quit… 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 5 2 Quite we… 4 Not… 2 Qu… 3 No… 2 Quit… 2 Qui… 1 Ext… 1 Ext… 2 Qu… 2 Qu… #> 6 2 Quite we… 3 Not… 3 No… 2 Qu… 2 Quit… 2 Qui… 2 Qui… NA 3 No… 2 Qu… #> 7 2 Quite we… NA 2 Qu… 2 Qu… 4 Not … 2 Qui… NA 3 Not… 2 Qu… 2 Qu… #> 8 2 Quite we… 2 Qui… 2 Qu… 2 Qu… 3 Not … 2 Qui… 3 Not… 4 Not… 4 No… 4 No… #> 9 2 Quite we… 2 Qui… 2 Qu… 3 No… 4 Not … 2 Qui… 2 Qui… 3 Not… 2 Qu… 2 Qu… #> 10 1 Extremel… 1 Ext… 1 Ex… 1 Ex… 4 Not … 1 Ext… 2 Qui… 4 Not… 2 Qu… 3 No… #> # ℹ 1,775 more rows #> # ℹ 10 more variables: DISHONB , INTELB , VOTE3 , #> # AGE , EDUC , GENDER , PARTY , .class , #> # .probability , .rownames dim(au2) #> [1] 1785 20"},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) polr object — glance.polr","title":"Glance at a(n) polr object — glance.polr","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) polr object — glance.polr","text":"","code":"# S3 method for class 'polr' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) polr object — glance.polr","text":"x polr object returned MASS::polr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) polr object — glance.polr","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.residual Residual degrees freedom. edf effective degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.polr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) polr object — glance.polr","text":"","code":"# load libraries for models and data library(MASS) # fit model fit <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) # summarize model fit with tidiers tidy(fit, exponentiate = TRUE, conf.int = TRUE) #> #> Re-fitting to get Hessian #> # A tibble: 8 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 InflMedium 1.76 0.105 5.41 1.44 2.16 coefficie… #> 2 InflHigh 3.63 0.127 10.1 2.83 4.66 coefficie… #> 3 TypeApartment 0.564 0.119 -4.80 0.446 0.712 coefficie… #> 4 TypeAtrium 0.693 0.155 -2.36 0.511 0.940 coefficie… #> 5 TypeTerrace 0.336 0.151 -7.20 0.249 0.451 coefficie… #> 6 ContHigh 1.43 0.0955 3.77 1.19 1.73 coefficie… #> 7 Low|Medium 0.609 0.125 -3.97 NA NA scale #> 8 Medium|High 2.00 0.125 5.50 NA NA scale glance(fit) #> # A tibble: 1 × 7 #> edf logLik AIC BIC deviance df.residual nobs #> #> 1 8 -1740. 3495. 3539. 3479. 1673 1681 augment(fit, type.predict = \"class\") #> # A tibble: 72 × 6 #> Sat Infl Type Cont `(weights)` .fitted #> #> 1 Low Low Tower Low 21 Low #> 2 Medium Low Tower Low 21 Low #> 3 High Low Tower Low 28 Low #> 4 Low Medium Tower Low 34 High #> 5 Medium Medium Tower Low 22 High #> 6 High Medium Tower Low 36 High #> 7 Low High Tower Low 10 High #> 8 Medium High Tower Low 11 High #> 9 High High Tower Low 36 High #> 10 Low Low Apartment Low 61 Low #> # ℹ 62 more rows fit2 <- polr(factor(gear) ~ am + mpg + qsec, data = mtcars) tidy(fit, p.values = TRUE) #> #> Re-fitting to get Hessian #> p-values can presently only be returned for models that contain no #> categorical variables with more than two levels. #> # A tibble: 8 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 InflMedium 0.566 0.105 5.41 NA coefficient #> 2 InflHigh 1.29 0.127 10.1 NA coefficient #> 3 TypeApartment -0.572 0.119 -4.80 NA coefficient #> 4 TypeAtrium -0.366 0.155 -2.36 NA coefficient #> 5 TypeTerrace -1.09 0.151 -7.20 NA coefficient #> 6 ContHigh 0.360 0.0955 3.77 NA coefficient #> 7 Low|Medium -0.496 0.125 -3.97 NA scale #> 8 Medium|High 0.691 0.125 5.50 NA scale"},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) pyears object — glance.pyears","title":"Glance at a(n) pyears object — glance.pyears","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) pyears object — glance.pyears","text":"","code":"# S3 method for class 'pyears' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) pyears object — glance.pyears","text":"x pyears object returned survival::pyears(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) pyears object — glance.pyears","text":"tibble::tibble() exactly one row columns: nobs Number observations used. total total number person-years tabulated offtable total number person-years table","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.pyears.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) pyears object — glance.pyears","text":"","code":"# load libraries for models and data library(survival) # generate and format data temp.yr <- tcut(mgus$dxyr, 55:92, labels = as.character(55:91)) temp.age <- tcut(mgus$age, 34:101, labels = as.character(34:100)) ptime <- ifelse(is.na(mgus$pctime), mgus$futime, mgus$pctime) pstat <- ifelse(is.na(mgus$pctime), 0, 1) pfit <- pyears(Surv(ptime / 365.25, pstat) ~ temp.yr + temp.age + sex, mgus, data.frame = TRUE ) # summarize model fit with tidiers tidy(pfit) #> # A tibble: 1,752 × 6 #> temp.yr temp.age sex pyears n event #> #> 1 71 34 female 0.00274 1 0 #> 2 68 35 female 0.00274 1 0 #> 3 72 35 female 0.00274 1 0 #> 4 69 36 female 0.00274 1 0 #> 5 73 36 female 0.00274 1 0 #> 6 69 37 female 0.00274 1 0 #> 7 70 37 female 0.00274 1 0 #> 8 74 37 female 0.00274 1 0 #> 9 70 38 female 0.00274 1 0 #> 10 71 38 female 0.00274 1 0 #> # ℹ 1,742 more rows glance(pfit) #> # A tibble: 1 × 3 #> total offtable nobs #> #> 1 8.32 0.727 241 # if data.frame argument is not given, different information is present in # output pfit2 <- pyears(Surv(ptime / 365.25, pstat) ~ temp.yr + temp.age + sex, mgus) tidy(pfit2) #> # A tibble: 37 × 402 #> pyears.34.female pyears.35.female pyears.36.female pyears.37.female #> #> 1 0 0 0 0 #> 2 0 0 0 0 #> 3 0 0 0 0 #> 4 0 0 0 0 #> 5 0 0 0 0 #> 6 0 0 0 0 #> 7 0 0 0 0 #> 8 0 0 0 0 #> 9 0 0 0 0 #> 10 0 0 0 0 #> # ℹ 27 more rows #> # ℹ 398 more variables: pyears.38.female , pyears.39.female , #> # pyears.40.female , pyears.41.female , #> # pyears.42.female , pyears.43.female , #> # pyears.44.female , pyears.45.female , #> # pyears.46.female , pyears.47.female , #> # pyears.48.female , pyears.49.female , … glance(pfit2) #> # A tibble: 1 × 3 #> total offtable nobs #> #> 1 8.32 0.727 241"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) ridgelm object — glance.ridgelm","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"","code":"# S3 method for class 'ridgelm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"x ridgelm object returned MASS::lm.ridge(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"similar output select.ridgelm, returned rather printed.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"tibble::tibble() exactly one row columns: kHKB modified HKB estimate ridge constant kLW modified L-W estimate ridge constant lambdaGCV choice lambda minimizes GCV","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.ridgelm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) ridgelm object — glance.ridgelm","text":"","code":"# load libraries for models and data library(MASS) names(longley)[1] <- \"y\" # fit model and summarizd results fit1 <- lm.ridge(y ~ ., longley) tidy(fit1) #> # A tibble: 6 × 5 #> lambda GCV term estimate scale #> #> 1 0 0.128 GNP 25.4 96.2 #> 2 0 0.128 Unemployed 3.30 90.5 #> 3 0 0.128 Armed.Forces 0.752 67.4 #> 4 0 0.128 Population -11.7 6.74 #> 5 0 0.128 Year -6.54 4.61 #> 6 0 0.128 Employed 0.786 3.40 fit2 <- lm.ridge(y ~ ., longley, lambda = seq(0.001, .05, .001)) td2 <- tidy(fit2) g2 <- glance(fit2) # coefficient plot library(ggplot2) ggplot(td2, aes(lambda, estimate, color = term)) + geom_line() # GCV plot ggplot(td2, aes(lambda, GCV)) + geom_line() # add line for the GCV minimizing estimate ggplot(td2, aes(lambda, GCV)) + geom_line() + geom_vline(xintercept = g2$lambdaGCV, col = \"red\", lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) rlm object — glance.rlm","title":"Glance at a(n) rlm object — glance.rlm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) rlm object — glance.rlm","text":"","code":"# S3 method for class 'rlm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) rlm object — glance.rlm","text":"x rlm object returned MASS::rlm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) rlm object — glance.rlm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. converged Logical indicating model fitting procedure succesful converged. deviance Deviance model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) rlm object — glance.rlm","text":"","code":"# load libraries for models and data library(MASS) # fit model r <- rlm(stack.loss ~ ., stackloss) # summarize model fit with tidiers tidy(r) #> # A tibble: 4 × 4 #> term estimate std.error statistic #> #> 1 (Intercept) -41.0 9.81 -4.18 #> 2 Air.Flow 0.829 0.111 7.46 #> 3 Water.Temp 0.926 0.303 3.05 #> 4 Acid.Conc. -0.128 0.129 -0.992 augment(r) #> # A tibble: 21 × 10 #> stack.loss Air.Flow Water.Temp Acid.Conc. .fitted .resid .hat .sigma #> #> 1 42 80 27 89 38.9 3.05 0.327 3.32 #> 2 37 80 27 88 39.1 -2.08 0.343 3.39 #> 3 37 75 25 90 32.8 4.18 0.155 3.26 #> 4 28 62 24 87 21.5 6.50 0.0713 3.01 #> 5 18 62 22 87 19.6 -1.65 0.0562 3.42 #> 6 18 62 23 87 20.6 -2.57 0.0835 3.38 #> 7 19 62 24 93 20.7 -1.73 0.230 3.42 #> 8 20 62 24 93 20.7 -0.731 0.230 3.44 #> 9 15 58 23 87 17.3 -2.25 0.155 3.40 #> 10 14 58 18 80 13.5 0.481 0.213 3.45 #> # ℹ 11 more rows #> # ℹ 2 more variables: .cooksd , .std.resid glance(r) #> # A tibble: 1 × 7 #> sigma converged logLik AIC BIC deviance nobs #> #> 1 2.44 TRUE -52.954 116. 121. 191. 21"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) rma object — glance.rma","title":"Glance at a(n) rma object — glance.rma","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) rma object — glance.rma","text":"","code":"# S3 method for class 'rma' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) rma object — glance.rma","text":"x rma object created metafor::rma(), metafor::rma.uni(), metafor::rma.glmm(), metafor::rma.mh(), metafor::rma.mv(), metafor::rma.peto(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) rma object — glance.rma","text":"tibble::tibble() exactly one row columns: cochran.qe meta-analysis, test statistic Cochran's Q_e test residual heterogeneity. cochran.qm meta-analysis, test statistic Cochran's Q_m omnibus test coefficients. df.residual Residual degrees freedom. h.squared Value H-Squared statistic. .squared Value -Squared statistic. measure measure used meta-analysis. method method used. nobs Number observations used. p.value.cochran.qe meta-analysis, p-value Cochran's Q_e test residual heterogeneity. p.value.cochran.qm meta-analysis, p-value Cochran's Q_m omnibus test coefficients. tau.squared meta-analysis, estimated amount residual heterogeneity. tau.squared.se meta-analysis, standard error residual heterogeneity.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) rma object — glance.rma","text":"","code":"library(metafor) df <- escalc( measure = \"RR\", ai = tpos, bi = tneg, ci = cpos, di = cneg, data = dat.bcg ) meta_analysis <- rma(yi, vi, data = df, method = \"EB\") glance(meta_analysis) #> # A tibble: 1 × 15 #> i.squared h.squared tau.squared tau.squared.se cochran.qe #> #> 1 92.3 13.0 0.318 0.174 152. #> # ℹ 10 more variables: p.value.cochran.qe , cochran.qm , #> # p.value.cochran.qm , df.residual , logLik , #> # deviance , AIC , BIC , AICc , nobs "},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) lmrob object — glance.lmrob","title":"Glance at a(n) lmrob object — glance.lmrob","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) lmrob object — glance.lmrob","text":"","code":"# S3 method for class 'lmrob' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) lmrob object — glance.lmrob","text":"x lmrob object returned robustbase::lmrob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) lmrob object — glance.lmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) lmrob object — glance.lmrob","text":"tibble::tibble() exactly one row columns: df.residual Residual degrees freedom. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.robustbase.lmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) lmrob object — glance.lmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) rq object — glance.rq","title":"Glance at a(n) rq object — glance.rq","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) rq object — glance.rq","text":"","code":"# S3 method for class 'rq' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) rq object — glance.rq","text":"x rq object returned quantreg::rq(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) rq object — glance.rq","text":"models single tau value may passed. multiple values, please use purrr::map() workflow instead, e.g.","code":"taus %>% map(function(tau_val) rq(y ~ x, tau = tau_val)) %>% map_dfr(glance)"},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) rq object — glance.rq","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. tau Quantile.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.rq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) rq object — glance.rq","text":"","code":"# load modeling library and data library(quantreg) data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.124 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -78.76986 160. 161. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 0.393 0.696 0.269 0.124 0.5 #> 2 0.458 0.266 0.334 0.124 0.5 #> 3 -1.22 0.660 -1.34 0.124 0.5 #> 4 -1.12 0.212 -1.25 0.124 0.5 #> 5 0.993 0.00527 0.869 0.124 0.5 #> 6 -1.83 0.103 -1.96 0.124 0.5 #> 7 0.124 0.287 0 0.124 0.5 #> 8 0.591 0.444 0.467 0.124 0.5 #> 9 0.805 0.693 0.681 0.124 0.5 #> 10 0.00754 0.0209 -0.116 0.124 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) spatialreg object — glance.sarlm","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"","code":"# S3 method for class 'sarlm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"x object returned spatialreg::lagsarlm() spatialreg::errorsarlm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.sarlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) spatialreg object — glance.sarlm","text":"","code":"# load libraries for models and data library(spatialreg) library(spdep) # load data data(oldcol, package = \"spdep\") listw <- nb2listw(COL.nb, style = \"W\") # fit model crime_sar <- lagsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw = listw, method = \"eigen\" ) # summarize model fit with tidiers tidy(crime_sar) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 tidy(crime_sar, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 0.200 0.662 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 31.0 59.1 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 -1.63 -0.434 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 -0.439 -0.0925 glance(crime_sar) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 375. 384. 4679. -182. 49 augment(crime_sar) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.6 -3.84 #> 2 1 4.48 33.2 32.4 46.6 -14.2 #> 3 1 11.3 37.1 38.4 41.4 -2.97 #> 4 1 8.44 75 0.178 37.9 -37.7 #> 5 1 19.5 80.5 15.7 14.2 1.54 #> 6 1 16.0 26.4 30.6 34.3 -3.66 #> 7 1 11.3 23.2 50.7 44.7 5.99 #> 8 1 16.0 28.8 26.1 38.4 -12.3 #> 9 1 9.87 18 48.6 51.7 -3.12 #> 10 1 13.6 96.4 34.0 16.3 17.7 #> # ℹ 39 more rows # fit another model crime_sem <- errorsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sem) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 59.9 5.37 11.2 0 #> 2 INC -0.941 0.331 -2.85 0.00441 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 #> 4 lambda 0.562 0.134 4.20 0.0000271 tidy(crime_sem, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 59.9 5.37 11.2 0 49.4 70.4 #> 2 INC -0.941 0.331 -2.85 0.00441 -1.59 -0.293 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 -0.480 -0.125 #> 4 lambda 0.562 0.134 4.20 0.0000271 0.299 0.824 glance(crime_sem) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.658 377. 386. 4683. -183. 49 augment(crime_sem) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.5 -3.70 #> 2 1 4.48 33.2 32.4 44.9 -12.5 #> 3 1 11.3 37.1 38.4 38.2 0.223 #> 4 1 8.44 75 0.178 35.0 -34.8 #> 5 1 19.5 80.5 15.7 13.3 2.45 #> 6 1 16.0 26.4 30.6 35.0 -4.33 #> 7 1 11.3 23.2 50.7 42.3 8.41 #> 8 1 16.0 28.8 26.1 39.4 -13.3 #> 9 1 9.87 18 48.6 49.3 -0.721 #> 10 1 13.6 96.4 34.0 16.6 17.4 #> # ℹ 39 more rows # fit another model crime_sac <- sacsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sac) #> # A tibble: 5 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.368 0.197 1.87 0.0613 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 #> 3 INC -1.03 0.326 -3.14 0.00167 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 #> 5 lambda 0.167 0.297 0.562 0.574 tidy(crime_sac, conf.int = TRUE) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.368 0.197 1.87 0.0613 -0.0174 0.754 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 28.4 67.2 #> 3 INC -1.03 0.326 -3.14 0.00167 -1.67 -0.386 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 -0.458 -0.105 #> 5 lambda 0.167 0.297 0.562 0.574 -0.415 0.748 glance(crime_sac) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 376. 388. 4685. -182. 49 augment(crime_sac) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.2 -3.37 #> 2 1 4.48 33.2 32.4 46.4 -14.0 #> 3 1 11.3 37.1 38.4 40.4 -2.00 #> 4 1 8.44 75 0.178 37.5 -37.3 #> 5 1 19.5 80.5 15.7 13.5 2.25 #> 6 1 16.0 26.4 30.6 34.4 -3.74 #> 7 1 11.3 23.2 50.7 44.1 6.60 #> 8 1 16.0 28.8 26.1 39.0 -12.9 #> 9 1 9.87 18 48.6 51.5 -2.93 #> 10 1 13.6 96.4 34.0 15.8 18.2 #> # ℹ 39 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) smooth.spine object — glance.smooth.spline","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"","code":"# S3 method for class 'smooth.spline' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"x smooth.spline object returned stats::smooth.spline(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"tibble::tibble() exactly one row columns: crit Minimized criterion cv.crit Cross-validation score df Degrees freedom used model. lambda Choice lambda corresponding `spar`. nobs Number observations used. pen.crit Penalized criterion. spar Smoothing parameter.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.smooth.spline.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) smooth.spine object — glance.smooth.spline","text":"","code":"# fit model spl <- smooth.spline(mtcars$wt, mtcars$mpg, df = 4) # summarize model fit with tidiers augment(spl, mtcars) #> # A tibble: 32 × 13 #> mpg cyl disp hp drat wt qsec vs am gear carb #> #> 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 #> 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 #> 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 #> 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 #> 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 #> 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1 #> 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4 #> 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2 #> 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2 #> 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4 #> # ℹ 22 more rows #> # ℹ 2 more variables: .fitted , .resid # calls original columns x and y augment(spl) #> # A tibble: 32 × 5 #> x y w .fitted .resid #> #> 1 2.62 21 1 22.9 -1.87 #> 2 2.88 21 1 21.1 -0.117 #> 3 2.32 22.8 1 25.3 -2.48 #> 4 3.22 21.4 1 19.1 2.33 #> 5 3.44 18.7 1 17.8 0.928 #> 6 3.46 18.1 1 17.7 0.437 #> 7 3.57 14.3 1 17.1 -2.79 #> 8 3.19 24.4 1 19.2 5.19 #> 9 3.15 22.8 1 19.5 3.35 #> 10 3.44 19.2 1 17.8 1.43 #> # ℹ 22 more rows library(ggplot2) ggplot(augment(spl, mtcars), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted))"},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) speedglm object — glance.speedglm","title":"Glance at a(n) speedglm object — glance.speedglm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) speedglm object — glance.speedglm","text":"","code":"# S3 method for class 'speedglm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) speedglm object — glance.speedglm","text":"x speedglm object returned speedglm::speedglm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) speedglm object — glance.speedglm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) speedglm object — glance.speedglm","text":"","code":"# load libraries for models and data library(speedglm) # generate data clotting <- data.frame( u = c(5, 10, 15, 20, 30, 40, 60, 80, 100), lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18) ) # fit model fit <- speedglm(lot1 ~ log(u), data = clotting, family = Gamma(log)) # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 5.50 0.190 28.9 0.0000000152 #> 2 log(u) -0.602 0.0553 -10.9 0.0000122 glance(fit) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 3.51 8 -26.2 58.5 59.1 0.163 7 9"},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) speedlm object — glance.speedlm","title":"Glance at a(n) speedlm object — glance.speedlm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) speedlm object — glance.speedlm","text":"","code":"# S3 method for class 'speedlm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) speedlm object — glance.speedlm","text":"x speedlm object returned speedglm::speedlm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) speedlm object — glance.speedlm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. statistic F-statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.speedlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) speedlm object — glance.speedlm","text":"","code":"# load modeling library library(speedglm) # fit model mod <- speedlm(mpg ~ wt + qsec, data = mtcars, fitted = TRUE) # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 11 #> r.squared adj.r.squared statistic p.value df logLik AIC BIC #> #> 1 0.826 0.814 69.0 9.39e-12 3 -74.4 157. 163. #> # ℹ 3 more variables: deviance , df.residual , nobs augment(mod) #> # A tibble: 32 × 6 #> .rownames mpg wt qsec .fitted .resid #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 #> 5 Hornet Sportabout 18.7 3.44 17.0 18.2 0.504 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 #> # ℹ 22 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) summary.lm object — glance.summary.lm","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"","code":"# S3 method for class 'summary.lm' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"x lm object created stats::lm(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"glance.summary.lm() method potentially useful alternative glance.lm(). instance, users already converted large lm objects leaner summary.lm equivalents conserve memory. Note, however, method return columns non-summary method (e.g. AIC BIC missing.)","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"tibble::tibble() exactly one row columns: adj.r.squared Adjusted R squared statistic, like R squared statistic except taking degrees freedom account. df.residual Residual degrees freedom. nobs Number observations used. p.value P-value corresponding test statistic. r.squared R squared statistic, percent variation explained model. Also known coefficient determination. sigma Estimated standard error residuals. statistic Test statistic. df degrees freedom numerator overall F-statistic. new broom 0.7.0. Previously, reported rank design matrix, one numerator degrees freedom overall F-statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.summary.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) summary.lm object — glance.summary.lm","text":"","code":"library(ggplot2) library(dplyr) mod <- lm(mpg ~ wt + qsec, data = mtcars) tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # coefficient plot d <- tidy(mod, conf.int = TRUE) ggplot(d, aes(estimate, term, xmin = conf.low, xmax = conf.high, height = 0)) + geom_point() + geom_vline(xintercept = 0, lty = 4) + geom_errorbarh() # aside: There are tidy() and glance() methods for lm.summary objects too. # this can be useful when you want to conserve memory by converting large lm # objects into their leaner summary.lm equivalents. s <- summary(mod) tidy(s, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(s) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32 augment(mod) #> # A tibble: 32 × 10 #> .rownames mpg wt qsec .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 0.0693 2.64 2.63e-3 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 0.0444 2.64 5.59e-6 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 0.0607 2.60 2.17e-2 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 0.0576 2.64 1.05e-4 #> 5 Hornet Sportab… 18.7 3.44 17.0 18.2 0.504 0.0389 2.64 5.29e-4 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 0.0957 2.58 5.10e-2 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 0.0729 2.61 1.93e-2 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 0.0791 2.61 2.18e-2 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 0.295 2.59 1.59e-1 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 0.0358 2.64 6.55e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid augment(mod, mtcars, interval = \"confidence\") #> # A tibble: 32 × 20 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 9 more variables: carb , .fitted , .lower , #> # .upper , .resid , .hat , .sigma , .cooksd , #> # .std.resid # predict on new data newdata <- mtcars %>% head(6) %>% mutate(wt = wt + 1) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid # ggplot2 example where we also construct 95% prediction interval # simpler bivariate model since we're plotting in 2D mod2 <- lm(mpg ~ wt, data = mtcars) au <- augment(mod2, newdata = newdata, interval = \"prediction\") ggplot(au, aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) + geom_ribbon(aes(ymin = .lower, ymax = .upper), col = NA, alpha = 0.3) # predict on new data without outcome variable. Output does not include .resid newdata <- newdata %>% select(-mpg) augment(mod, newdata = newdata) #> # A tibble: 6 × 12 #> .rownames cyl disp hp drat wt qsec vs am gear carb #> #> 1 Mazda RX4 6 160 110 3.9 3.62 16.5 0 1 4 4 #> 2 Mazda RX4 W… 6 160 110 3.9 3.88 17.0 0 1 4 4 #> 3 Datsun 710 4 108 93 3.85 3.32 18.6 1 1 4 1 #> 4 Hornet 4 Dr… 6 258 110 3.08 4.22 19.4 1 0 3 1 #> 5 Hornet Spor… 8 360 175 3.15 4.44 17.0 0 0 3 2 #> 6 Valiant 6 225 105 2.76 4.46 20.2 1 0 3 1 #> # ℹ 1 more variable: .fitted au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + geom_vline(size = 2, colour = \"white\", xintercept = 0) + geom_hline(size = 2, colour = \"white\", yintercept = 0) + geom_point() + geom_smooth(se = FALSE) #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' plot(mod, which = 6) ggplot(au, aes(.hat, .cooksd)) + geom_vline(xintercept = 0, colour = NA) + geom_abline(slope = seq(0, 3, by = 0.5), colour = \"white\") + geom_smooth(se = FALSE) + geom_point() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # column-wise models a <- matrix(rnorm(20), nrow = 10) b <- a + rnorm(length(a)) result <- lm(b ~ a) tidy(result) #> # A tibble: 6 × 6 #> response term estimate std.error statistic p.value #> #> 1 Y1 (Intercept) 0.419 0.295 1.42 0.199 #> 2 Y1 a1 0.786 0.307 2.55 0.0378 #> 3 Y1 a2 0.196 0.374 0.524 0.617 #> 4 Y2 (Intercept) 0.579 0.219 2.64 0.0335 #> 5 Y2 a1 0.738 0.228 3.23 0.0144 #> 6 Y2 a2 0.616 0.278 2.22 0.0622"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) survdiff object — glance.survdiff","title":"Glance at a(n) survdiff object — glance.survdiff","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) survdiff object — glance.survdiff","text":"","code":"# S3 method for class 'survdiff' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) survdiff object — glance.survdiff","text":"x survdiff object returned survival::survdiff(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) survdiff object — glance.survdiff","text":"tibble::tibble() exactly one row columns: df Degrees freedom used model. p.value P-value corresponding test statistic. statistic Test statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survdiff.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) survdiff object — glance.survdiff","text":"","code":"# load libraries for models and data library(survival) # fit model s <- survdiff( Surv(time, status) ~ pat.karno + strata(inst), data = lung ) # summarize model fit with tidiers tidy(s) #> # A tibble: 8 × 4 #> pat.karno N obs exp #> #> 1 30 2 1 0.692 #> 2 40 2 1 1.10 #> 3 50 4 4 1.17 #> 4 60 30 27 16.3 #> 5 70 41 31 26.4 #> 6 80 50 38 41.9 #> 7 90 60 38 47.2 #> 8 100 35 21 26.2 glance(s) #> # A tibble: 1 × 3 #> statistic df p.value #> #> 1 21.4 7 0.00326"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) survexp object — glance.survexp","title":"Glance at a(n) survexp object — glance.survexp","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) survexp object — glance.survexp","text":"","code":"# S3 method for class 'survexp' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) survexp object — glance.survexp","text":"x survexp object returned survival::survexp(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) survexp object — glance.survexp","text":"tibble::tibble() exactly one row columns: n.max Maximum number subjects risk. n.start Initial number subjects risk. timepoints Number timepoints.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survexp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) survexp object — glance.survexp","text":"","code":"# load libraries for models and data library(survival) # fit model sexpfit <- survexp( futime ~ 1, rmap = list( sex = \"male\", year = accept.dt, age = (accept.dt - birth.dt) ), method = \"conditional\", data = jasa ) # summarize model fit with tidiers tidy(sexpfit) #> # A tibble: 88 × 3 #> time estimate n.risk #> #> 1 0 1 102 #> 2 1 1.00 102 #> 3 2 1.00 99 #> 4 4 1.00 96 #> 5 5 1.00 94 #> 6 7 1.00 92 #> 7 8 1.00 91 #> 8 10 1.00 90 #> 9 11 1.00 89 #> 10 15 1.00 88 #> # ℹ 78 more rows glance(sexpfit) #> # A tibble: 1 × 3 #> n.max n.start timepoints #> #> 1 102 102 88"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) survfit object — glance.survfit","title":"Glance at a(n) survfit object — glance.survfit","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) survfit object — glance.survfit","text":"","code":"# S3 method for class 'survfit' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) survfit object — glance.survfit","text":"x survfit object returned survival::survfit(). ... Additional arguments passed survival::summary.survfit(). Important arguments include rmean.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) survfit object — glance.survfit","text":"tibble::tibble() exactly one row columns: events Number events. n.max Maximum number subjects risk. n.start Initial number subjects risk. nobs Number observations used. records Number observations rmean Restricted mean (see [survival::print.survfit()]). rmean.std.error Restricted mean standard error. conf.low lower end confidence interval median conf.high upper end confidence interval median median median survival","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) survfit object — glance.survfit","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) sfit <- survfit(cfit) # summarize model fit with tidiers + visualization tidy(sfit) #> # A tibble: 186 × 8 #> time n.risk n.event n.censor estimate std.error conf.high conf.low #> #> 1 5 228 1 0 0.996 0.00419 1 0.988 #> 2 11 227 3 0 0.983 0.00845 1.00 0.967 #> 3 12 224 1 0 0.979 0.00947 0.997 0.961 #> 4 13 223 2 0 0.971 0.0113 0.992 0.949 #> 5 15 221 1 0 0.966 0.0121 0.990 0.944 #> 6 26 220 1 0 0.962 0.0129 0.987 0.938 #> 7 30 219 1 0 0.958 0.0136 0.984 0.933 #> 8 31 218 1 0 0.954 0.0143 0.981 0.927 #> 9 53 217 2 0 0.945 0.0157 0.975 0.917 #> 10 54 215 1 0 0.941 0.0163 0.972 0.911 #> # ℹ 176 more rows glance(sfit) #> # A tibble: 1 × 10 #> records n.max n.start events rmean rmean.std.error median conf.low #> #> 1 228 228 228 165 381. 20.3 320 285 #> # ℹ 2 more variables: conf.high , nobs library(ggplot2) ggplot(tidy(sfit), aes(time, estimate)) + geom_line() + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25) # multi-state fitCI <- survfit(Surv(stop, status * as.numeric(event), type = \"mstate\") ~ 1, data = mgus1, subset = (start == 0) ) td_multi <- tidy(fitCI) td_multi #> # A tibble: 711 × 9 #> time n.risk n.event n.censor estimate std.error conf.high conf.low #> #> 1 6 241 0 0 0.996 0.00414 1 0.988 #> 2 7 240 0 0 0.992 0.00584 1 0.980 #> 3 31 239 0 0 0.988 0.00714 1 0.974 #> 4 32 238 0 0 0.983 0.00823 1.00 0.967 #> 5 39 237 0 0 0.979 0.00918 0.997 0.961 #> 6 60 236 0 0 0.975 0.0100 0.995 0.956 #> 7 61 235 0 0 0.967 0.0115 0.990 0.944 #> 8 152 233 0 0 0.963 0.0122 0.987 0.939 #> 9 153 232 0 0 0.959 0.0128 0.984 0.934 #> 10 174 231 0 0 0.954 0.0134 0.981 0.928 #> # ℹ 701 more rows #> # ℹ 1 more variable: state ggplot(td_multi, aes(time, estimate, group = state)) + geom_line(aes(color = state)) + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) survreg object — glance.survreg","title":"Glance at a(n) survreg object — glance.survreg","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) survreg object — glance.survreg","text":"","code":"# S3 method for class 'survreg' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) survreg object — glance.survreg","text":"x survreg object returned survival::survreg(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) survreg object — glance.survreg","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. df Degrees freedom used model. df.residual Residual degrees freedom. iter Iterations algorithm/fitting procedure completed. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used. p.value P-value corresponding test statistic. statistic Chi-squared statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.survreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) survreg object — glance.survreg","text":"","code":"# load libraries for models and data library(survival) # fit model sr <- survreg( Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = \"exponential\" ) # summarize model fit with tidiers + visualization tidy(sr) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 6.96 1.32 5.27 0.000000139 #> 2 ecog.ps -0.433 0.587 -0.738 0.461 #> 3 rx 0.582 0.587 0.991 0.322 augment(sr, ovarian) #> # A tibble: 26 × 9 #> futime fustat age resid.ds rx ecog.ps .fitted .se.fit .resid #> #> 1 59 1 72.3 2 1 1 1224. 639. -1165. #> 2 115 1 74.5 2 1 1 1224. 639. -1109. #> 3 156 1 66.5 2 1 2 794. 350. -638. #> 4 421 0 53.4 2 2 1 2190. 1202. -1769. #> 5 431 1 50.3 2 1 1 1224. 639. -793. #> 6 448 0 56.4 1 1 2 794. 350. -346. #> 7 464 1 56.9 2 2 2 1420. 741. -956. #> 8 475 1 59.9 2 2 2 1420. 741. -945. #> 9 477 0 64.2 2 1 1 1224. 639. -747. #> 10 563 1 55.2 1 2 2 1420. 741. -857. #> # ℹ 16 more rows glance(sr) #> # A tibble: 1 × 9 #> iter df statistic logLik AIC BIC df.residual nobs p.value #> #> 1 4 3 1.67 -97.2 200. 204. 23 26 0.434 # coefficient plot td <- tidy(sr, conf.int = TRUE) library(ggplot2) ggplot(td, aes(estimate, term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) svyglm object — glance.svyglm","title":"Glance at a(n) svyglm object — glance.svyglm","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) svyglm object — glance.svyglm","text":"","code":"# S3 method for class 'svyglm' glance(x, maximal = x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) svyglm object — glance.svyglm","text":"x svyglm object returned survey::svyglm(). maximal svyglm object corresponding maximal model compute BIC. See Lumley Scott (2015) details. Defaults x, equivalent using maximal model. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Glance at a(n) svyglm object — glance.svyglm","text":"Lumley T, Scott (2015). AIC BIC modelling complex survey data. Journal Survey Statistics Methodology, 3(1).","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) svyglm object — glance.svyglm","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df.null Degrees freedom used null model. df.residual Residual degrees freedom. null.deviance Deviance null model.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) svyglm object — glance.svyglm","text":"","code":"# load libraries for models and data library(survey) #> Loading required package: grid #> #> Attaching package: ‘survey’ #> The following object is masked from ‘package:drc’: #> #> twophase #> The following object is masked from ‘package:graphics’: #> #> dotchart set.seed(123) data(api) # survey design dstrat <- svydesign( id = ~1, strata = ~stype, weights = ~pw, data = apistrat, fpc = ~fpc ) # model m <- svyglm( formula = sch.wide ~ ell + meals + mobility, design = dstrat, family = quasibinomial() ) glance(m) #> # A tibble: 1 × 7 #> null.deviance df.null AIC BIC deviance df.residual nobs #> #> 1 184. 199 184. 199. 178. 194 200"},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) svyolr object — glance.svyolr","title":"Glance at a(n) svyolr object — glance.svyolr","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) svyolr object — glance.svyolr","text":"","code":"# S3 method for class 'svyolr' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) svyolr object — glance.svyolr","text":"x svyolr object returned survey::svyolr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) svyolr object — glance.svyolr","text":"tibble::tibble() exactly one row columns: df.residual Residual degrees freedom. edf effective degrees freedom. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.svyolr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) svyolr object — glance.svyolr","text":"","code":"library(broom) library(survey) data(api) dclus1 <- svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) dclus1 <- update(dclus1, mealcat = cut(meals, c(0, 25, 50, 75, 100))) m <- svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1) m #> Call: #> svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1) #> #> Coefficients: #> avg.ed mobility stypeH stypeM #> -2.6999217 0.0325042 -1.7574715 -0.6191463 #> #> Intercepts: #> (0,25]|(25,50] (25,50]|(50,75] (50,75]|(75,100] #> -8.857919 -6.586464 -4.924938 tidy(m, conf.int = TRUE) #> # A tibble: 7 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 avg.ed -2.70 1.13 -2.38 -4.92e+0 -0.477 coeffici… #> 2 mobility 0.0325 0.0207 1.57 -7.98e-3 0.0730 coeffici… #> 3 stypeH -1.76 0.700 -2.51 -3.13e+0 -0.386 coeffici… #> 4 stypeM -0.619 0.310 -2.00 -1.23e+0 -0.0123 coeffici… #> 5 (0,25]|(25,50] -8.86 3.69 -2.40 -1.61e+1 -1.63 scale #> 6 (25,50]|(50,7… -6.59 3.11 -2.12 -1.27e+1 -0.493 scale #> 7 (50,75]|(75,1… -4.92 2.86 -1.72 -1.05e+1 0.687 scale"},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) varest object — glance.varest","title":"Glance at a(n) varest object — glance.varest","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) varest object — glance.varest","text":"","code":"# S3 method for class 'varest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) varest object — glance.varest","text":"x varest object produced call vars::VAR(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) varest object — glance.varest","text":"tibble::tibble() exactly one row columns: lag.order Lag order. logLik log-likelihood model. [stats::logLik()] may useful reference. n total number observations. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance.varest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Glance at a(n) varest object — glance.varest","text":"","code":"# load libraries for models and data library(vars) #> Loading required package: strucchange #> Loading required package: urca # load data data(\"Canada\", package = \"vars\") # fit models mod <- VAR(Canada, p = 1, type = \"both\") # summarize model fit with tidiers tidy(mod) #> # A tibble: 24 × 6 #> group term estimate std.error statistic p.value #> #> 1 e e.l1 1.24 0.0863 14.4 1.82e-23 #> 2 e prod.l1 0.195 0.0361 5.39 7.49e- 7 #> 3 e rw.l1 -0.0678 0.0283 -2.40 1.90e- 2 #> 4 e U.l1 0.623 0.169 3.68 4.30e- 4 #> 5 e const -279. 75.2 -3.71 3.92e- 4 #> 6 e trend -0.0407 0.0197 -2.06 4.24e- 2 #> 7 prod e.l1 0.0129 0.126 0.103 9.19e- 1 #> 8 prod prod.l1 0.963 0.0527 18.3 9.43e-30 #> 9 prod rw.l1 -0.0391 0.0412 -0.948 3.46e- 1 #> 10 prod U.l1 0.211 0.247 0.855 3.95e- 1 #> # ℹ 14 more rows glance(mod) #> # A tibble: 1 × 4 #> lag.order logLik nobs n #> #> 1 1 -208. 83 84"},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":null,"dir":"Reference","previous_headings":"","what":"Glance at a(n) Gam object — glance.Gam","title":"Glance at a(n) Gam object — glance.Gam","text":"Glance accepts model object returns tibble::tibble() exactly one row model summaries. summaries typically goodness fit measures, p-values hypothesis tests residuals, model convergence information. Glance never returns information original call modeling function. includes name modeling function arguments passed modeling function. Glance calculate summary measures. Rather, farms computations appropriate methods gathers results together. Sometimes goodness fit measure undefined. cases measure reported NA. Glance returns number columns regardless whether model matrix rank-deficient . , entries columns longer well-defined value filled NA appropriate type.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Glance at a(n) Gam object — glance.Gam","text":"","code":"# S3 method for class 'Gam' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Glance at a(n) Gam object — glance.Gam","text":"x Gam object returned call gam::gam(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Glance at a(n) Gam object — glance.Gam","text":"Glance gam objects created calls mgcv::gam() glance.gam().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance_gam_hastie.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Glance at a(n) Gam object — glance.Gam","text":"tibble::tibble() exactly one row columns: AIC Akaike's Information Criterion model. BIC Bayesian Information Criterion model. deviance Deviance model. df Degrees freedom used model. df.residual Residual degrees freedom. logLik log-likelihood model. [stats::logLik()] may useful reference. nobs Number observations used.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) optim object masquerading as list — glance_optim","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"","code":"glance_optim(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"x list returned stats::optim(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"tibble::tibble() exactly one row columns: convergence Convergence code. function.count Number calls `fn`. gradient.count Number calls `gr`. value Minimized maximized output value.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/glance_optim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) optim object masquerading as list — glance_optim","text":"","code":"f <- function(x) (x[1] - 2)^2 + (x[2] - 3)^2 + (x[3] - 8)^2 o <- optim(c(1, 1, 1), f)"},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"models single component, tidy() glance() methods identical. Please see documentation methods.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"","code":"# S3 method for class 'leveneTest' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"x object class anova created call car::leveneTest(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"tibble::tibble() columns: df Degrees freedom used term model. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. df.residual Residual degrees freedom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/leveneTest_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy/glance a(n) leveneTest object — leveneTest_tidiers","text":"","code":"# load libraries for models and data library(car) data(Moore) lt <- with(Moore, leveneTest(conformity, fcategory)) tidy(lt) #> # A tibble: 1 × 4 #> statistic p.value df df.residual #> #> 1 0.0460 0.955 2 42 glance(lt) #> # A tibble: 0 × 0"},{"path":"https://broom.tidymodels.org/dev/reference/list_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","title":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), base::svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/list_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","text":"","code":"# S3 method for class 'list' tidy(x, ...) # S3 method for class 'list' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/list_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","text":"x list, potentially representing object can tidied. ... Additionally, arguments passed tidying function.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/list_tidiers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidying methods for lists / returned values that are not S3 objects — list_tidiers","text":"functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throws error.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rma object — tidy.rma","title":"Tidy a(n) rma object — tidy.rma","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rma object — tidy.rma","text":"","code":"# S3 method for class 'rma' tidy( x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, include_studies = FALSE, measure = \"GEN\", ... )"},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rma object — tidy.rma","text":"x rma object created metafor::rma(), metafor::rma.uni(), metafor::rma.glmm(), metafor::rma.mh(), metafor::rma.mv(), metafor::rma.peto(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. include_studies Logical. individual studies included output? Defaults FALSE. measure Measure type. See metafor::escalc() ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) rma object — tidy.rma","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name individual study type estimate type (summary vs individual study)","code":""},{"path":"https://broom.tidymodels.org/dev/reference/metafor_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) rma object — tidy.rma","text":"","code":"# load libraries for models and data library(metafor) df <- escalc( measure = \"RR\", ai = tpos, bi = tneg, ci = cpos, di = cneg, data = dat.bcg ) meta_analysis <- rma(yi, vi, data = df, method = \"EB\") tidy(meta_analysis) #> # A tibble: 1 × 6 #> term type estimate std.error statistic p.value #> #> 1 overall summary -0.715 0.181 -3.95 0.0000774"},{"path":"https://broom.tidymodels.org/dev/reference/null_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidiers for NULL inputs — null_tidiers","title":"Tidiers for NULL inputs — null_tidiers","text":"tidy(NULL), glance(NULL) augment(NULL) return empty tibble::tibble. empty tibble can treated tibble zero rows, making convenient combine tibbles using functions like purrr::map_df() lists potentially NULL objects.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/null_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidiers for NULL inputs — null_tidiers","text":"","code":"# S3 method for class '`NULL`' tidy(x, ...) # S3 method for class '`NULL`' glance(x, ...) # S3 method for class '`NULL`' augment(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/null_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidiers for NULL inputs — null_tidiers","text":"x value NULL. ... Additional arguments (used).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/null_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidiers for NULL inputs — null_tidiers","text":"empty tibble::tibble.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. generics augment, glance, tidy","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/sp_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) SpatialPolygonsDataFrame object — sp_tidiers","title":"Tidy a(n) SpatialPolygonsDataFrame object — sp_tidiers","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. Note sf package now defines tidy spatial objects recommended approach spatial data. sp tidiers now deprecated favor sf::st_as_sf() coercion methods found packages. See https://r-spatial.org/r/2023/05/15/evolution4.html migration retiring spatial packages.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/sp_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) SpatialPolygonsDataFrame object — sp_tidiers","text":"","code":"# S3 method for class 'SpatialPolygonsDataFrame' tidy(x, region = NULL, ...) # S3 method for class 'SpatialPolygons' tidy(x, ...) # S3 method for class 'Polygons' tidy(x, ...) # S3 method for class 'Polygon' tidy(x, ...) # S3 method for class 'SpatialLinesDataFrame' tidy(x, ...) # S3 method for class 'Lines' tidy(x, ...) # S3 method for class 'Line' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/sp_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) SpatialPolygonsDataFrame object — sp_tidiers","text":"x SpatialPolygonsDataFrame, SpatialPolygons, Polygons, Polygon, SpatialLinesDataFrame, Lines Line object. region name variable used split regions ... used method","code":""},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"Tidiers summaryDefault objects deprecated broom 0.7.0 favor skimr::skim().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"","code":"# S3 method for class 'summaryDefault' tidy(x, ...) # S3 method for class 'summaryDefault' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"x summaryDefault object, created calling summary() vector. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"one-row tibble::tibble columns: minimum Minimum value original vector. q1 First quartile original vector. median Median original vector. mean Mean original vector. q3 Third quartile original vector. maximum Maximum value original vector. na Number NA values original vector. Column present original vector least one NA entry.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/summary_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"(Deprecated) Tidy summaryDefault objects — summary_tidiers","text":"","code":"v <- rnorm(1000) s <- summary(v) s #> Min. 1st Qu. Median Mean 3rd Qu. Max. #> -2.80978 -0.62832 0.00921 0.01613 0.66460 3.24104 tidy(s) #> Warning: `tidy.summaryDefault()` is deprecated. Please use `skimr::skim()` instead. #> # A tibble: 1 × 6 #> minimum q1 median mean q3 maximum #> #> 1 -2.81 -0.628 0.00921 0.0161 0.665 3.24 glance(s) #> Warning: `tidy.summaryDefault()` is deprecated. Please use `skimr::skim()` instead. #> # A tibble: 1 × 6 #> minimum q1 median mean q3 maximum #> #> 1 -2.81 -0.628 0.00921 0.0161 0.665 3.24 v2 <- c(v,NA) tidy(summary(v2)) #> Warning: `tidy.summaryDefault()` is deprecated. Please use `skimr::skim()` instead. #> # A tibble: 1 × 7 #> minimum q1 median mean q3 maximum na #> #> 1 -2.81 -0.628 0.00921 0.0161 0.665 3.24 1"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) Arima object — tidy.Arima","title":"Tidy a(n) Arima object — tidy.Arima","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) Arima object — tidy.Arima","text":"","code":"# S3 method for class 'Arima' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) Arima object — tidy.Arima","text":"x object class Arima created stats::arima(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) Arima object — tidy.Arima","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Arima.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) Arima object — tidy.Arima","text":"","code":"# fit model fit <- arima(lh, order = c(1, 0, 0)) # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 3 #> term estimate std.error #> #> 1 ar1 0.574 0.116 #> 2 intercept 2.41 0.147 glance(fit) #> # A tibble: 1 × 5 #> sigma logLik AIC BIC nobs #> #> 1 0.444 -29.4 64.8 70.4 48"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) Kendall object — tidy.Kendall","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"","code":"# S3 method for class 'Kendall' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"x Kendall object returned call Kendall::Kendall(), Kendall::MannKendall(), Kendall::SeasonalMannKendall(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"tibble::tibble() columns: kendall_score Kendall score. p.value two-sided p-value associated observed statistic. var_kendall_score Variance kendall_score. statistic Kendall's tau statistic denominator denominator, tau=kendall_score/denominator.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Kendall.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) Kendall object — tidy.Kendall","text":"","code":"# load libraries for models and data library(Kendall) A <- c(2.5, 2.5, 2.5, 2.5, 5, 6.5, 6.5, 10, 10, 10, 10, 10, 14, 14, 14, 16, 17) B <- c(1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2) # fit models and summarize results f_res <- Kendall(A, B) tidy(f_res) #> # A tibble: 1 × 5 #> statistic p.value kendall_score denominator var_kendall_score #> #> 1 0.408 0.0754 34 83.4 345. s_res <- MannKendall(B) tidy(s_res) #> # A tibble: 1 × 5 #> statistic p.value kendall_score denominator var_kendall_score #> #> 1 0.354 0.102 32 90.3 360 t_res <- SeasonalMannKendall(ts(A)) tidy(t_res) #> # A tibble: 1 × 5 #> statistic p.value kendall_score denominator var_kendall_score #> #> 1 0.924 0.000000935 116 126. 559."},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) Mclust object — tidy.Mclust","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"","code":"# S3 method for class 'Mclust' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"x Mclust object return mclust::Mclust(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"tibble::tibble() columns: proportion mixing proportion component size Number points assigned cluster. mean mean component. case 2+ dimensional models, column mean added dimension. NA noise component variance case one-dimensional spherical models, variance component, omitted otherwise. NA noise component component Cluster id factor.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.Mclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) Mclust object — tidy.Mclust","text":"","code":"# load library for models and data library(mclust) # load data manipulation libraries library(dplyr) library(tibble) library(purrr) library(tidyr) set.seed(27) centers <- tibble( cluster = factor(1:3), # number points in each cluster num_points = c(100, 150, 50), # x1 coordinate of cluster center x1 = c(5, 0, -3), # x2 coordinate of cluster center x2 = c(-1, 1, -2) ) points <- centers %>% mutate( x1 = map2(num_points, x1, rnorm), x2 = map2(num_points, x2, rnorm) ) %>% select(-num_points, -cluster) %>% unnest(c(x1, x2)) # fit model m <- Mclust(points) # summarize model fit with tidiers tidy(m) #> # A tibble: 3 × 6 #> component size proportion variance mean.x1 mean.x2 #> #> 1 1 101 0.335 1.12 5.01 -1.04 #> 2 2 150 0.503 1.12 0.0594 1.00 #> 3 3 49 0.161 1.12 -3.20 -2.06 augment(m, points) #> # A tibble: 300 × 4 #> x1 x2 .class .uncertainty #> #> 1 6.91 -2.74 1 3.98e-11 #> 2 6.14 -2.45 1 1.99e- 9 #> 3 4.24 -0.946 1 1.47e- 4 #> 4 3.54 0.287 1 2.94e- 2 #> 5 3.91 0.408 1 7.48e- 3 #> 6 5.30 -1.58 1 4.22e- 7 #> 7 5.01 -1.77 1 1.06e- 6 #> 8 6.16 -1.68 1 7.64e- 9 #> 9 7.13 -2.17 1 4.16e-11 #> 10 5.24 -2.42 1 1.16e- 7 #> # ℹ 290 more rows glance(m) #> # A tibble: 1 × 7 #> model G BIC logLik df hypvol nobs #> #> 1 EII 3 -2402. -1175. 9 NA 300"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"","code":"# S3 method for class 'TukeyHSD' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"x TukeyHSD object return stats::TukeyHSD(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"tibble::tibble() columns: adj.p.value P-value adjusted multiple comparisons. conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. contrast Levels compared. estimate estimated value regression term. null.value Value estimate compared. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.TukeyHSD.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) TukeyHSD object — tidy.TukeyHSD","text":"","code":"fm1 <- aov(breaks ~ wool + tension, data = warpbreaks) thsd <- TukeyHSD(fm1, \"tension\", ordered = TRUE) tidy(thsd) #> # A tibble: 3 × 7 #> term contrast null.value estimate conf.low conf.high adj.p.value #> #> 1 tension M-H 0 4.72 -4.63 14.1 0.447 #> 2 tension L-H 0 14.7 5.37 24.1 0.00112 #> 3 tension L-M 0 10.0 0.647 19.4 0.0336 # may include comparisons on multiple terms fm2 <- aov(mpg ~ as.factor(gear) * as.factor(cyl), data = mtcars) tidy(TukeyHSD(fm2)) #> # A tibble: 42 × 7 #> term contrast null.value estimate conf.low conf.high adj.p.value #> #> 1 as.factor(… 4-3 0 8.43 5.19 11.7 0.00000297 #> 2 as.factor(… 5-3 0 5.27 0.955 9.59 0.0147 #> 3 as.factor(… 5-4 0 -3.15 -7.60 1.30 0.201 #> 4 as.factor(… 6-4 0 -5.40 -9.45 -1.36 0.00748 #> 5 as.factor(… 8-4 0 -5.23 -8.60 -1.86 0.00201 #> 6 as.factor(… 8-6 0 0.172 -3.70 4.04 0.993 #> 7 as.factor(… 4:4-3:4 0 5.43 -6.65 17.5 0.832 #> 8 as.factor(… 5:4-3:4 0 6.70 -7.24 20.6 0.778 #> 9 as.factor(… 3:6-3:4 0 -1.75 -15.7 12.2 1.00 #> 10 as.factor(… 4:6-3:4 0 -1.75 -14.5 11.0 1.00 #> # ℹ 32 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) aareg object — tidy.aareg","title":"Tidy a(n) aareg object — tidy.aareg","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) aareg object — tidy.aareg","text":"","code":"# S3 method for class 'aareg' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) aareg object — tidy.aareg","text":"x aareg object returned survival::aareg(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) aareg object — tidy.aareg","text":"robust.se present x created dfbeta = TRUE.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) aareg object — tidy.aareg","text":"tibble::tibble() columns: estimate estimated value regression term. p.value two-sided p-value associated observed statistic. robust.se robust version standard error estimate. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. z z score.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) aareg object — tidy.aareg","text":"","code":"# load libraries for models and data library(survival) # fit model afit <- aareg( Surv(time, status) ~ age + sex + ph.ecog, data = lung, dfbeta = TRUE ) # summarize model fit with tidiers tidy(afit) #> # A tibble: 4 × 7 #> term estimate statistic std.error robust.se statistic.z p.value #> #> 1 Intercept 0.00505 0.00587 0.00474 0.00477 1.23 0.219 #> 2 age 0.0000401 0.0000715 0.0000723 0.0000700 1.02 0.307 #> 3 sex -0.00316 -0.00403 0.00122 0.00123 -3.28 0.00103 #> 4 ph.ecog 0.00301 0.00367 0.00102 0.00102 3.62 0.000299"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) acf object — tidy.acf","title":"Tidy a(n) acf object — tidy.acf","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) acf object — tidy.acf","text":"","code":"# S3 method for class 'acf' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) acf object — tidy.acf","text":"x acf object created stats::acf(), stats::pacf() stats::ccf(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) acf object — tidy.acf","text":"tibble::tibble() columns: acf Autocorrelation. lag Lag values.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.acf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) acf object — tidy.acf","text":"","code":"tidy(acf(lh, plot = FALSE)) #> # A tibble: 17 × 2 #> lag acf #> #> 1 0 1 #> 2 1 0.576 #> 3 2 0.182 #> 4 3 -0.145 #> 5 4 -0.175 #> 6 5 -0.150 #> 7 6 -0.0210 #> 8 7 -0.0203 #> 9 8 -0.00420 #> 10 9 -0.136 #> 11 10 -0.154 #> 12 11 -0.0972 #> 13 12 0.0490 #> 14 13 0.120 #> 15 14 0.0867 #> 16 15 0.119 #> 17 16 0.151 tidy(ccf(mdeaths, fdeaths, plot = FALSE)) #> # A tibble: 31 × 2 #> lag acf #> #> 1 -1.25 0.0151 #> 2 -1.17 0.366 #> 3 -1.08 0.615 #> 4 -1 0.708 #> 5 -0.917 0.622 #> 6 -0.833 0.340 #> 7 -0.75 -0.0245 #> 8 -0.667 -0.382 #> 9 -0.583 -0.612 #> 10 -0.5 -0.678 #> # ℹ 21 more rows tidy(pacf(lh, plot = FALSE)) #> # A tibble: 16 × 2 #> lag acf #> #> 1 1 0.576 #> 2 2 -0.223 #> 3 3 -0.227 #> 4 4 0.103 #> 5 5 -0.0759 #> 6 6 0.0676 #> 7 7 -0.104 #> 8 8 0.0120 #> 9 9 -0.188 #> 10 10 0.00255 #> 11 11 0.0656 #> 12 12 0.0320 #> 13 13 0.0219 #> 14 14 -0.0931 #> 15 15 0.230 #> 16 16 0.0444"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) anova object — tidy.anova","title":"Tidy a(n) anova object — tidy.anova","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) anova object — tidy.anova","text":"","code":"# S3 method for class 'anova' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) anova object — tidy.anova","text":"x anova object, created stats::anova(), car::Anova(), car::leveneTest(), car::linearHypothesis(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) anova object — tidy.anova","text":"term column ANOVA table can come leading trailing whitespace, tidying method trims. documentation tidier car::leveneTest() output, see tidy.leveneTest()","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) anova object — tidy.anova","text":"tibble::tibble() columns: df Degrees freedom used term model. meansq Mean sum squares. Equal total sum squares divided degrees freedom. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. sumsq Sum squares explained term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.anova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) anova object — tidy.anova","text":"","code":"if (FALSE) { # fit models a <- lm(mpg ~ wt + qsec + disp, mtcars) b <- lm(mpg ~ wt + qsec, mtcars) mod <- anova(a, b) # summarize model fit with tidiers tidy(mod) glance(mod) # car::linearHypothesis() example library(car) mod_lht <- linearHypothesis(a, \"wt - disp\") tidy(mod_lht) glance(mod_lht) }"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) aov object — tidy.aov","title":"Tidy a(n) aov object — tidy.aov","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) aov object — tidy.aov","text":"","code":"# S3 method for class 'aov' tidy(x, intercept = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) aov object — tidy.aov","text":"x aov object, created stats::aov(). intercept logical indicating whether information intercept included. Passed stats::summary.aov(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) aov object — tidy.aov","text":"term column ANOVA table can come leading trailing whitespace, tidying method trims. documentation tidier car::leveneTest() output, see tidy.leveneTest()","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aov.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) aov object — tidy.aov","text":"","code":"a <- aov(mpg ~ wt + qsec + disp, mtcars) tidy(a) #> # A tibble: 4 × 6 #> term df sumsq meansq statistic p.value #> #> 1 wt 1 848. 848. 121. 1.08e-11 #> 2 qsec 1 82.9 82.9 11.9 1.82e- 3 #> 3 disp 1 0.00102 0.00102 0.000147 9.90e- 1 #> 4 Residuals 28 195. 6.98 NA NA"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) aovlist object — tidy.aovlist","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"","code":"# S3 method for class 'aovlist' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"x aovlist objects, created stats::aov(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"term column ANOVA table can come leading trailing whitespace, tidying method trims. documentation tidier car::leveneTest() output, see tidy.leveneTest()","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"tibble::tibble() columns: df Degrees freedom used term model. meansq Mean sum squares. Equal total sum squares divided degrees freedom. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. stratum error stratum. sumsq Sum squares explained term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.aovlist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) aovlist object — tidy.aovlist","text":"","code":"a <- aov(mpg ~ wt + qsec + Error(disp / am), mtcars) tidy(a) #> # A tibble: 5 × 7 #> stratum term df sumsq meansq statistic p.value #> #> 1 disp wt 1 809. 809. NA NA #> 2 disp:am wt 1 0.389 0.389 NA NA #> 3 Within wt 1 87.2 87.2 12.0 0.00176 #> 4 Within qsec 1 34.2 34.2 4.72 0.0387 #> 5 Within Residuals 27 195. 7.24 NA NA"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) betamfx object — tidy.betamfx","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"","code":"# S3 method for class 'betamfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"x betamfx object. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"mfx package provides methods calculating marginal effects various generalized linear models (GLMs). Unlike standard linear models, estimated model coefficients GLM directly interpreted marginal effects (.e., change response variable predicted one unit change one regressors). estimated coefficients multiplicative, dependent link function used estimation variables included model. calculating marginal effects, users must typically choose whether want use ) average observation data, ii) average sample marginal effects. See vignette(\"mfxarticle\") mfx package details.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. atmean TRUE marginal effects originally calculated partial effects average observation. FALSE, instead calculated average partial effects.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betamfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) betamfx object — tidy.betamfx","text":"","code":"library(mfx) # Simulate some data set.seed(12345) n <- 1000 x <- rnorm(n) # Beta outcome y <- rbeta(n, shape1 = plogis(1 + 0.5 * x), shape2 = (abs(0.2 * x))) # Use Smithson and Verkuilen correction y <- (y * (n - 1) + 0.5) / n d <- data.frame(y, x) mod_betamfx <- betamfx(y ~ x | x, data = d) tidy(mod_betamfx, conf.int = TRUE) #> # A tibble: 1 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 x TRUE 0.0226 0.00801 2.82 0.00483 0.00686 0.0383 # Compare with the naive model coefficients of the equivalent betareg call (not run) # tidy(betamfx(y ~ x | x, data = d), conf.int = TRUE) augment(mod_betamfx) #> # A tibble: 1,000 × 4 #> y x .fitted .cooksd #> #> 1 0.951 0.586 0.809 0.000189 #> 2 0.714 0.709 0.811 0.0000993 #> 3 0.999 -0.109 0.793 0.000273 #> 4 0.998 -0.453 0.785 0.000334 #> 5 0.999 0.606 0.809 0.000342 #> 6 0.562 -1.82 0.751 0.000878 #> 7 0.999 0.630 0.810 0.000348 #> 8 0.999 -0.276 0.789 0.000294 #> 9 0.744 -0.284 0.789 0.0000134 #> 10 0.999 -0.919 0.774 0.000551 #> # ℹ 990 more rows glance(mod_betamfx) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.00726 998 1897. -3787. -3767. 996 1000"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) betareg object — tidy.betareg","title":"Tidy a(n) betareg object — tidy.betareg","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) betareg object — tidy.betareg","text":"","code":"# S3 method for class 'betareg' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) betareg object — tidy.betareg","text":"x betareg object produced call betareg::betareg(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) betareg object — tidy.betareg","text":"tibble one row term regression. component column indicates whether particular term used model either \"mean\" \"precision\". precision inverse variance, often referred phi. least one term used model precision phi.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) betareg object — tidy.betareg","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. component Whether particular term used model mean precision regression. See details.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.betareg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) betareg object — tidy.betareg","text":"","code":"# load libraries for models and data library(betareg) # load dats data(\"GasolineYield\", package = \"betareg\") # fit model mod <- betareg(yield ~ batch + temp, data = GasolineYield) mod #> #> Call: #> betareg(formula = yield ~ batch + temp, data = GasolineYield) #> #> Coefficients (mean model with logit link): #> (Intercept) batch1 batch2 batch3 batch4 #> -6.15957 1.72773 1.32260 1.57231 1.05971 #> batch5 batch6 batch7 batch8 batch9 #> 1.13375 1.04016 0.54369 0.49590 0.38579 #> temp #> 0.01097 #> #> Phi coefficients (precision model with identity link): #> (phi) #> 440.3 #> # summarize model fit with tidiers tidy(mod) #> # A tibble: 12 × 6 #> component term estimate std.error statistic p.value #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 tidy(mod, conf.int = TRUE) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.52 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.53 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.09 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.34 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.859 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.931 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.832 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.330 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.282 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.153 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.0102 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 225. #> # ℹ 1 more variable: conf.high tidy(mod, conf.int = TRUE, conf.level = .99) #> # A tibble: 12 × 8 #> component term estimate std.error statistic p.value conf.low #> #> 1 mean (Intercept) -6.16 0.182 -33.8 3.44e-250 -6.63 #> 2 mean batch1 1.73 0.101 17.1 2.59e- 65 1.47 #> 3 mean batch2 1.32 0.118 11.2 3.34e- 29 1.02 #> 4 mean batch3 1.57 0.116 13.5 8.81e- 42 1.27 #> 5 mean batch4 1.06 0.102 10.4 4.06e- 25 0.796 #> 6 mean batch5 1.13 0.104 11.0 6.52e- 28 0.867 #> 7 mean batch6 1.04 0.106 9.81 1.03e- 22 0.767 #> 8 mean batch7 0.544 0.109 4.98 6.29e- 7 0.263 #> 9 mean batch8 0.496 0.109 4.55 5.30e- 6 0.215 #> 10 mean batch9 0.386 0.119 3.25 1.14e- 3 0.0803 #> 11 mean temp 0.0110 0.000413 26.6 1.26e-155 0.00990 #> 12 precision (phi) 440. 110. 4.00 6.29e- 5 157. #> # ℹ 1 more variable: conf.high augment(mod) #> # A tibble: 32 × 6 #> yield batch temp .fitted .resid .cooksd #> #> 1 0.122 1 205 0.101 1.41 0.0791 #> 2 0.223 1 275 0.195 1.44 0.0917 #> 3 0.347 1 345 0.343 0.170 0.00155 #> 4 0.457 1 407 0.508 -2.14 0.606 #> 5 0.08 2 218 0.0797 0.0712 0.0000168 #> 6 0.131 2 273 0.137 -0.318 0.00731 #> 7 0.266 2 347 0.263 0.169 0.00523 #> 8 0.074 3 212 0.0943 -1.52 0.0805 #> 9 0.182 3 272 0.167 0.831 0.0441 #> 10 0.304 3 340 0.298 0.304 0.0170 #> # ℹ 22 more rows glance(mod) #> # A tibble: 1 × 7 #> pseudo.r.squared df.null logLik AIC BIC df.residual nobs #> #> 1 0.962 30 84.8 -146. -128. 20 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) biglm object — tidy.biglm","title":"Tidy a(n) biglm object — tidy.biglm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) biglm object — tidy.biglm","text":"","code":"# S3 method for class 'biglm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) biglm object — tidy.biglm","text":"x biglm object created call biglm::biglm() biglm::bigglm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) biglm object — tidy.biglm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.biglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) biglm object — tidy.biglm","text":"","code":"# load modeling library library(biglm) # fit model -- linear regression bfit <- biglm(mpg ~ wt + disp, mtcars) # summarize model fit with tidiers tidy(bfit) #> # A tibble: 3 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) 35.0 2.16 1.11e-58 #> 2 wt -3.35 1.16 4.00e- 3 #> 3 disp -0.0177 0.00919 5.38e- 2 tidy(bfit, conf.int = TRUE) #> # A tibble: 3 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 35.0 2.16 1.11e-58 30.7 39.2 #> 2 wt -3.35 1.16 4.00e- 3 -5.63 -1.07 #> 3 disp -0.0177 0.00919 5.38e- 2 -0.0357 0.000288 tidy(bfit, conf.int = TRUE, conf.level = .9) #> # A tibble: 3 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 35.0 2.16 1.11e-58 31.4 38.5 #> 2 wt -3.35 1.16 4.00e- 3 -5.27 -1.44 #> 3 disp -0.0177 0.00919 5.38e- 2 -0.0328 -0.00261 glance(bfit) #> # A tibble: 1 × 5 #> r.squared AIC deviance df.residual nobs #> #> 1 0.781 253. 247. 29 32 # fit model -- logistic regression bgfit <- bigglm(am ~ mpg, mtcars, family = binomial()) # summarize model fit with tidiers tidy(bgfit) #> # A tibble: 2 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) -6.60 2.35 0.00498 #> 2 mpg 0.307 0.115 0.00751 tidy(bgfit, exponentiate = TRUE) #> # A tibble: 2 × 4 #> term estimate std.error p.value #> #> 1 (Intercept) 0.00136 2.35 0.00498 #> 2 mpg 1.36 0.115 0.00751 tidy(bgfit, conf.int = TRUE) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) -6.60 2.35 0.00498 -11.2 -1.99 #> 2 mpg 0.307 0.115 0.00751 0.0819 0.532 tidy(bgfit, conf.int = TRUE, conf.level = .9) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) -6.60 2.35 0.00498 -10.5 -2.74 #> 2 mpg 0.307 0.115 0.00751 0.118 0.496 tidy(bgfit, conf.int = TRUE, conf.level = .9, exponentiate = TRUE) #> # A tibble: 2 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 (Intercept) 0.00136 2.35 0.00498 0.0000283 0.0648 #> 2 mpg 1.36 0.115 0.00751 1.13 1.64 glance(bgfit) #> # A tibble: 1 × 5 #> r.squared AIC deviance df.residual nobs #> #> 1 0.175 33.7 29.7 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) binDesign object — tidy.binDesign","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"","code":"# S3 method for class 'binDesign' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"x binGroup::binDesign() object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"tibble::tibble() columns: n Number trials given iteration. power Power achieved given value n.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binDesign.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) binDesign object — tidy.binDesign","text":"","code":"library(binGroup) des <- binDesign( nmax = 300, delta = 0.06, p.hyp = 0.1, power = .8 ) glance(des) #> # A tibble: 1 × 4 #> power n power.reached maxit #> #> 1 0.805 240 TRUE 238 tidy(des) #> # A tibble: 238 × 2 #> n power #> #> 1 3 0.0000640 #> 2 4 0.000248 #> 3 5 0.000602 #> 4 6 0.00117 #> 5 7 0.0000813 #> 6 8 0.000157 #> 7 9 0.000274 #> 8 10 0.000443 #> 9 11 0.000673 #> 10 12 0.0000640 #> # ℹ 228 more rows # the ggplot2 equivalent of plot(des) library(ggplot2) ggplot(tidy(des), aes(n, power)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) binWidth object — tidy.binWidth","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"","code":"# S3 method for class 'binWidth' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"x binGroup::binWidth() object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"tibble::tibble() columns: alternative Alternative hypothesis (character). ci.width Expected width confidence interval. p True proportion. n Total sample size","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.binWidth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) binWidth object — tidy.binWidth","text":"","code":"# load libraries library(binGroup) # fit model bw <- binWidth(100, .1) bw #> $expCIWidth #> [1] 0.1256172 #> #> $alternative #> [1] \"two.sided\" #> #> $p #> [1] 0.1 #> #> $n #> [1] 100 #> #> attr(,\"class\") #> [1] \"binWidth\" # summarize model fit with tidiers tidy(bw) #> # A tibble: 1 × 4 #> ci.width alternative p n #> #> 1 0.126 two.sided 0.1 100"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) boot object — tidy.boot","title":"Tidy a(n) boot object — tidy.boot","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) boot object — tidy.boot","text":"","code":"# S3 method for class 'boot' tidy( x, conf.int = FALSE, conf.level = 0.95, conf.method = c(\"perc\", \"bca\", \"basic\", \"norm\"), exponentiate = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) boot object — tidy.boot","text":"x boot::boot() object. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. conf.method Passed type argument boot::boot.ci(). Defaults \"perc\". allowed types \"perc\", \"basic\", \"bca\", \"norm\". support \"stud\" \"\". exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) boot object — tidy.boot","text":"weights provided boot function, estimate column included showing weighted bootstrap estimate, standard error estimate. original statistics \"boot\" object, call tsboot orig.t = FALSE, original statistic columns omitted, estimate std.error columns shown.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) boot object — tidy.boot","text":"tibble::tibble() columns: bias Bias statistic. std.error standard error regression term. term name regression term. statistic Original value statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.boot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) boot object — tidy.boot","text":"","code":"# load modeling library library(boot) #> #> Attaching package: ‘boot’ #> The following object is masked from ‘package:speedglm’: #> #> control #> The following object is masked from ‘package:robustbase’: #> #> salinity #> The following object is masked from ‘package:car’: #> #> logit #> The following object is masked from ‘package:survival’: #> #> aml clotting <- data.frame( u = c(5, 10, 15, 20, 30, 40, 60, 80, 100), lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18), lot2 = c(69, 35, 26, 21, 18, 16, 13, 12, 12) ) # fit models g1 <- glm(lot2 ~ log(u), data = clotting, family = Gamma) bootfun <- function(d, i) { coef(update(g1, data = d[i, ])) } bootres <- boot(clotting, bootfun, R = 999) # summarize model fits with tidiers tidy(g1, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) -0.0239 0.00133 -18.0 4.00e-7 -0.0265 -0.0213 #> 2 log(u) 0.0236 0.000577 40.9 1.36e-9 0.0225 0.0247 tidy(bootres, conf.int = TRUE) #> # A tibble: 2 × 6 #> term statistic bias std.error conf.low conf.high #> #> 1 (Intercept) -0.0239 -0.00171 0.00336 -0.0328 -0.0222 #> 2 log(u) 0.0236 0.000504 0.00107 0.0227 0.0265"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) btergm object — tidy.btergm","title":"Tidy a(n) btergm object — tidy.btergm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. method tidies coefficients bootstrapped temporal exponential random graph model estimated xergm. simply returns coefficients confidence intervals.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) btergm object — tidy.btergm","text":"","code":"# S3 method for class 'btergm' tidy(x, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) btergm object — tidy.btergm","text":"x btergm::btergm() object. conf.level Confidence level confidence intervals. Defaults 0.95. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) btergm object — tidy.btergm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.btergm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) btergm object — tidy.btergm","text":"","code":"library(btergm) #> Package: btergm #> Version: 1.10.12 #> Date: 2024-03-31 #> Authors: Philip Leifeld (University of Manchester) #> Skyler J. Cranmer (The Ohio State University) #> Bruce A. Desmarais (Pennsylvania State University) library(network) #> #> ‘network’ 1.18.2 (2023-12-04), part of the Statnet Project #> * ‘news(package=\"network\")’ for changes since last version #> * ‘citation(\"network\")’ for citation information #> * ‘https://statnet.org’ for help, support, and other information set.seed(5) # create 10 random networks with 10 actors networks <- list() for (i in 1:10) { mat <- matrix(rbinom(100, 1, .25), nrow = 10, ncol = 10) diag(mat) <- 0 nw <- network(mat) networks[[i]] <- nw } # create 10 matrices as covariates covariates <- list() for (i in 1:10) { mat <- matrix(rnorm(100), nrow = 10, ncol = 10) covariates[[i]] <- mat } # fit the model mod <- btergm(networks ~ edges + istar(2) + edgecov(covariates), R = 100) #> #> Initial dimensions of the network and covariates: #> t=1 t=2 t=3 t=4 t=5 t=6 t=7 t=8 t=9 t=10 #> networks (row) 10 10 10 10 10 10 10 10 10 10 #> networks (col) 10 10 10 10 10 10 10 10 10 10 #> covariates (row) 10 10 10 10 10 10 10 10 10 10 #> covariates (col) 10 10 10 10 10 10 10 10 10 10 #> #> All networks are conformable. #> #> Dimensions of the network and covariates after adjustment: #> t=1 t=2 t=3 t=4 t=5 t=6 t=7 t=8 t=9 t=10 #> networks (row) 10 10 10 10 10 10 10 10 10 10 #> networks (col) 10 10 10 10 10 10 10 10 10 10 #> covariates (row) 10 10 10 10 10 10 10 10 10 10 #> covariates (col) 10 10 10 10 10 10 10 10 10 10 #> #> Starting pseudolikelihood estimation with 100 bootstrapping replications on a single computing core... #> Done. # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 4 #> term estimate conf.low conf.high #> #> 1 edges -1.23 -1.37 -1.01 #> 2 istar2 0.0837 -0.0571 0.165 #> 3 edgecov.covariates[[i]] -0.0345 -0.177 0.112"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) cch object — tidy.cch","title":"Tidy a(n) cch object — tidy.cch","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) cch object — tidy.cch","text":"","code":"# S3 method for class 'cch' tidy(x, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) cch object — tidy.cch","text":"x cch object returned survival::cch(). conf.level confidence level CI ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) cch object — tidy.cch","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) cch object — tidy.cch","text":"","code":"# load libraries for models and data library(survival) # examples come from cch documentation subcoh <- nwtco$in.subcohort selccoh <- with(nwtco, rel == 1 | subcoh == 1) ccoh.data <- nwtco[selccoh, ] ccoh.data$subcohort <- subcoh[selccoh] # central-lab histology ccoh.data$histol <- factor(ccoh.data$histol, labels = c(\"FH\", \"UH\")) # tumour stage ccoh.data$stage <- factor(ccoh.data$stage, labels = c(\"I\", \"II\", \"III\", \"IV\")) ccoh.data$age <- ccoh.data$age / 12 # age in years # fit model fit.ccP <- cch(Surv(edrel, rel) ~ stage + histol + age, data = ccoh.data, subcoh = ~subcohort, id = ~seqno, cohort.size = 4028 ) # summarize model fit with tidiers + visualization tidy(fit.ccP) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 stageII 0.735 0.168 4.36 1.30e- 5 0.404 1.06 #> 2 stageIII 0.597 0.173 3.44 5.77e- 4 0.257 0.937 #> 3 stageIV 1.38 0.205 6.76 1.40e-11 0.983 1.79 #> 4 histolUH 1.50 0.160 9.38 0 1.19 1.81 #> 5 age 0.0433 0.0237 1.82 6.83e- 2 -0.00324 0.0898 # coefficient plot library(ggplot2) ggplot(tidy(fit.ccP), aes(x = estimate, y = term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) cld object — tidy.cld","title":"Tidy a(n) cld object — tidy.cld","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) cld object — tidy.cld","text":"","code":"# S3 method for class 'cld' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) cld object — tidy.cld","text":"x cld object created calling multcomp::cld() glht, confint.glht() summary.glht() object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) cld object — tidy.cld","text":"tibble::tibble() columns: contrast Levels compared. letters Compact letter display denoting pair-wise comparisons.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cld.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) cld object — tidy.cld","text":"","code":"# load libraries for models and data library(multcomp) #> Loading required package: mvtnorm #> #> Attaching package: ‘mvtnorm’ #> The following object is masked from ‘package:mclust’: #> #> dmvnorm #> Loading required package: TH.data #> #> Attaching package: ‘TH.data’ #> The following object is masked from ‘package:MASS’: #> #> geyser library(ggplot2) amod <- aov(breaks ~ wool + tension, data = warpbreaks) wht <- glht(amod, linfct = mcp(tension = \"Tukey\")) tidy(wht) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0336 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00110 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(wht, aes(lhs, estimate)) + geom_point() CI <- confint(wht) tidy(CI) #> # A tibble: 3 × 5 #> term contrast estimate conf.low conf.high #> #> 1 tension M - L -10 -19.4 -0.644 #> 2 tension H - L -14.7 -24.1 -5.37 #> 3 tension H - M -4.72 -14.1 4.63 ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + geom_pointrange() tidy(summary(wht)) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0335 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00108 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(mapping = aes(lhs, estimate)) + geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + geom_point(aes(size = p), data = summary(wht)) + scale_size(trans = \"reverse\") cld <- cld(wht) tidy(cld) #> # A tibble: 3 × 2 #> tension letters #> #> 1 L a #> 2 M b #> 3 H b"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) clm object — tidy.clm","title":"Tidy a(n) clm object — tidy.clm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) clm object — tidy.clm","text":"","code":"# S3 method for class 'clm' tidy( x, conf.int = FALSE, conf.level = 0.95, conf.type = c(\"profile\", \"Wald\"), exponentiate = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) clm object — tidy.clm","text":"x clm object returned ordinal::clm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. conf.type Whether use \"profile\" \"Wald\" confidence intervals, passed type argument ordinal::confint.clm(). Defaults \"profile\". exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) clm object — tidy.clm","text":"broom 0.7.0 coefficient_type column renamed coef.type, contents changed well. Note intercept type coefficients correspond alpha parameters, location type coefficients correspond beta parameters, scale type coefficients correspond zeta parameters.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) clm object — tidy.clm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) clm object — tidy.clm","text":"","code":"# load libraries for models and data library(ordinal) # fit model fit <- clm(rating ~ temp * contact, data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 7 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 intercept #> 5 tempwarm 2.32 0.701 3.31 9.28e- 4 location #> 6 contactyes 1.35 0.660 2.04 4.13e- 2 location #> 7 tempwarm:contactyes 0.360 0.924 0.389 6.97e- 1 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.41 0.545 -2.59 9.66e- 3 NA NA intercept #> 2 2|3 1.14 0.510 2.24 2.48e- 2 NA NA intercept #> 3 3|4 3.38 0.638 5.29 1.21e- 7 NA NA intercept #> 4 4|5 4.94 0.751 6.58 4.66e-11 NA NA intercept #> 5 temp… 2.32 0.701 3.31 9.28e- 4 1.20 3.52 location #> 6 cont… 1.35 0.660 2.04 4.13e- 2 0.284 2.47 location #> 7 temp… 0.360 0.924 0.389 6.97e- 1 -1.17 1.89 location tidy(fit, conf.int = TRUE, conf.type = \"Wald\", exponentiate = TRUE) #> # A tibble: 7 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.244 0.545 -2.59 9.66e- 3 0.0837 0.710 intercept #> 2 2|3 3.14 0.510 2.24 2.48e- 2 1.16 8.52 intercept #> 3 3|4 29.3 0.638 5.29 1.21e- 7 8.38 102. intercept #> 4 4|5 140. 0.751 6.58 4.66e-11 32.1 610. intercept #> 5 temp… 10.2 0.701 3.31 9.28e- 4 2.58 40.2 location #> 6 cont… 3.85 0.660 2.04 4.13e- 2 1.05 14.0 location #> 7 temp… 1.43 0.924 0.389 6.97e- 1 0.234 8.76 location glance(fit) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 7 187. 203. -86.4162 65 72 augment(fit, type.predict = \"prob\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 0.562 #> 2 3 cold no 0.209 #> 3 3 cold yes 0.435 #> 4 4 cold yes 0.0894 #> 5 4 warm no 0.190 #> 6 4 warm no 0.190 #> 7 5 warm yes 0.286 #> 8 5 warm yes 0.286 #> 9 1 cold no 0.196 #> 10 2 cold no 0.562 #> # ℹ 62 more rows augment(fit, type.predict = \"class\") #> # A tibble: 72 × 4 #> rating temp contact .fitted #> #> 1 2 cold no 2 #> 2 3 cold no 2 #> 3 3 cold yes 3 #> 4 4 cold yes 3 #> 5 4 warm no 3 #> 6 4 warm no 3 #> 7 5 warm yes 4 #> 8 5 warm yes 4 #> 9 1 cold no 2 #> 10 2 cold no 2 #> # ℹ 62 more rows # ...and again with another model specification fit2 <- clm(rating ~ temp, nominal = ~contact, data = wine) tidy(fit2) #> # A tibble: 9 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2.(Intercept) -1.32 0.562 -2.35 0.0186 intercept #> 2 2|3.(Intercept) 1.25 0.475 2.63 0.00866 intercept #> 3 3|4.(Intercept) 3.55 0.656 5.41 0.0000000625 intercept #> 4 4|5.(Intercept) 4.66 0.860 5.42 0.0000000608 intercept #> 5 1|2.contactyes -1.62 1.16 -1.39 0.164 intercept #> 6 2|3.contactyes -1.51 0.591 -2.56 0.0105 intercept #> 7 3|4.contactyes -1.67 0.649 -2.58 0.00985 intercept #> 8 4|5.contactyes -1.05 0.897 -1.17 0.241 intercept #> 9 tempwarm 2.52 0.535 4.71 0.00000250 location glance(fit2) #> # A tibble: 1 × 6 #> edf AIC BIC logLik df.residual nobs #> #> 1 9 190. 211. -86.20855 63 72"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) clmm object — tidy.clmm","title":"Tidy a(n) clmm object — tidy.clmm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) clmm object — tidy.clmm","text":"","code":"# S3 method for class 'clmm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) clmm object — tidy.clmm","text":"x clmm object returned ordinal::clmm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Tidy a(n) clmm object — tidy.clmm","text":"broom 0.7.0 coefficient_type column renamed coef.type, contents changed well. Note intercept type coefficients correspond alpha parameters, location type coefficients correspond beta parameters, scale type coefficients correspond zeta parameters.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) clmm object — tidy.clmm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.clmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) clmm object — tidy.clmm","text":"","code":"# load libraries for models and data library(ordinal) # fit model fit <- clmm(rating ~ temp + contact + (1 | judge), data = wine) # summarize model fit with tidiers tidy(fit) #> # A tibble: 6 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -1.62 0.682 -2.38 1.74e- 2 intercept #> 2 2|3 1.51 0.604 2.51 1.22e- 2 intercept #> 3 3|4 4.23 0.809 5.23 1.72e- 7 intercept #> 4 4|5 6.09 0.972 6.26 3.82e-10 intercept #> 5 tempwarm 3.06 0.595 5.14 2.68e- 7 location #> 6 contactyes 1.83 0.513 3.58 3.44e- 4 location tidy(fit, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 6 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 -1.62 0.682 -2.38 1.74e- 2 -2.75 -0.501 intercept #> 2 2|3 1.51 0.604 2.51 1.22e- 2 0.520 2.51 intercept #> 3 3|4 4.23 0.809 5.23 1.72e- 7 2.90 5.56 intercept #> 4 4|5 6.09 0.972 6.26 3.82e-10 4.49 7.69 intercept #> 5 temp… 3.06 0.595 5.14 2.68e- 7 2.08 4.04 location #> 6 cont… 1.83 0.513 3.58 3.44e- 4 0.992 2.68 location tidy(fit, conf.int = TRUE, exponentiate = TRUE) #> # A tibble: 6 × 8 #> term estimate std.error statistic p.value conf.low conf.high coef.type #> #> 1 1|2 0.197 0.682 -2.38 1.74e- 2 0.0518 0.751 intercept #> 2 2|3 4.54 0.604 2.51 1.22e- 2 1.39 14.8 intercept #> 3 3|4 68.6 0.809 5.23 1.72e- 7 14.1 335. intercept #> 4 4|5 441. 0.972 6.26 3.82e-10 65.5 2965. intercept #> 5 temp… 21.4 0.595 5.14 2.68e- 7 6.66 68.7 location #> 6 cont… 6.26 0.513 3.58 3.44e- 4 2.29 17.1 location glance(fit) #> # A tibble: 1 × 5 #> edf AIC BIC logLik nobs #> #> 1 7 177. 193. -81.56541 72 # ...and again with another model specification fit2 <- clmm(rating ~ temp + (1 | judge), nominal = ~contact, data = wine) #> Warning: unrecognized control elements named ‘nominal’ ignored tidy(fit2) #> # A tibble: 5 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 1|2 -2.20 0.613 -3.59 0.000333 intercept #> 2 2|3 0.545 0.476 1.15 0.252 intercept #> 3 3|4 2.84 0.607 4.68 0.00000291 intercept #> 4 4|5 4.48 0.751 5.96 0.00000000256 intercept #> 5 tempwarm 2.67 0.554 4.81 0.00000147 location glance(fit2) #> # A tibble: 1 × 5 #> edf AIC BIC logLik nobs #> #> 1 6 189. 203. -88.73882 72"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) coeftest object — tidy.coeftest","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"","code":"# S3 method for class 'coeftest' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"x coeftest object returned lmtest::coeftest(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coeftest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) coeftest object — tidy.coeftest","text":"","code":"# load libraries for models and data library(lmtest) m <- lm(dist ~ speed, data = cars) coeftest(m) #> #> t test of coefficients: #> #> Estimate Std. Error t value Pr(>|t|) #> (Intercept) -17.57909 6.75844 -2.6011 0.01232 * #> speed 3.93241 0.41551 9.4640 1.49e-12 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> tidy(coeftest(m)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 #> 2 speed 3.93 0.416 9.46 1.49e-12 tidy(coeftest(m, conf.int = TRUE)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 6.76 -2.60 1.23e- 2 #> 2 speed 3.93 0.416 9.46 1.49e-12 # a very common workflow is to combine lmtest::coeftest with alternate # variance-covariance matrices via the sandwich package. The lmtest # tidiers support this workflow too, enabling you to adjust the standard # errors of your tidied models on the fly. library(sandwich) # \"HC3\" (default) robust SEs tidy(coeftest(m, vcov = vcovHC)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 5.93 -2.96 4.72e- 3 #> 2 speed 3.93 0.428 9.20 3.64e-12 # \"HC2\" robust SEs tidy(coeftest(m, vcov = vcovHC, type = \"HC2\")) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 5.73 -3.07 3.55e- 3 #> 2 speed 3.93 0.413 9.53 1.21e-12 # N-W HAC robust SEs tidy(coeftest(m, vcov = NeweyWest)) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -17.6 7.02 -2.50 0.0157 #> 2 speed 3.93 0.551 7.14 0.00000000453 # the columns of the returned tibble for glance.coeftest() will vary # depending on whether the coeftest object retains the underlying model. # Users can control this with the \"save = TRUE\" argument of coeftest(). glance(coeftest(m)) #> # A tibble: 1 × 4 #> logLik AIC BIC nobs #> #> 1 -206.578 419. 425. 50 glance(coeftest(m, save = TRUE)) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.651 0.644 15.4 89.6 1.49e-12 1 -207. 419. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) confint.glht object — tidy.confint.glht","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"","code":"# S3 method for class 'confint.glht' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"x confint.glht object created calling multcomp::confint.glht() glht object created multcomp::glht(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. contrast Levels compared. estimate estimated value regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confint.glht.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) confint.glht object — tidy.confint.glht","text":"","code":"# load libraries for models and data library(multcomp) library(ggplot2) amod <- aov(breaks ~ wool + tension, data = warpbreaks) wht <- glht(amod, linfct = mcp(tension = \"Tukey\")) tidy(wht) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0337 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00118 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(wht, aes(lhs, estimate)) + geom_point() CI <- confint(wht) tidy(CI) #> # A tibble: 3 × 5 #> term contrast estimate conf.low conf.high #> #> 1 tension M - L -10 -19.4 -0.647 #> 2 tension H - L -14.7 -24.1 -5.37 #> 3 tension H - M -4.72 -14.1 4.63 ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + geom_pointrange() tidy(summary(wht)) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0336 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00112 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(mapping = aes(lhs, estimate)) + geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + geom_point(aes(size = p), data = summary(wht)) + scale_size(trans = \"reverse\") cld <- cld(wht) tidy(cld) #> # A tibble: 3 × 2 #> tension letters #> #> 1 L a #> 2 M b #> 3 H b"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"","code":"# S3 method for class 'confusionMatrix' tidy(x, by_class = TRUE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"x object class confusionMatrix created call caret::confusionMatrix(). by_class Logical indicating whether show performance measures broken class. Defaults TRUE. by_class = FALSE returns tibble accuracy, kappa, McNemar statistics. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"tibble::tibble() columns: class class consideration. conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. term name regression term. p.value P-value accuracy kappa statistics.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.confusionMatrix.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) confusionMatrix object — tidy.confusionMatrix","text":"","code":"# load libraries for models and data library(caret) #> Loading required package: lattice #> #> Attaching package: ‘lattice’ #> The following object is masked from ‘package:boot’: #> #> melanoma #> #> Attaching package: ‘caret’ #> The following object is masked from ‘package:survival’: #> #> cluster #> The following object is masked from ‘package:purrr’: #> #> lift set.seed(27) # generate data two_class_sample1 <- as.factor(sample(letters[1:2], 100, TRUE)) two_class_sample2 <- as.factor(sample(letters[1:2], 100, TRUE)) two_class_cm <- confusionMatrix( two_class_sample1, two_class_sample2 ) # summarize model fit with tidiers tidy(two_class_cm) #> # A tibble: 14 × 6 #> term class estimate conf.low conf.high p.value #> #> 1 accuracy NA 0.52 0.418 0.621 0.619 #> 2 kappa NA 0.0295 NA NA NA #> 3 mcnemar NA NA NA NA 0.470 #> 4 sensitivity a 0.604 NA NA NA #> 5 specificity a 0.426 NA NA NA #> 6 pos_pred_value a 0.542 NA NA NA #> 7 neg_pred_value a 0.488 NA NA NA #> 8 precision a 0.542 NA NA NA #> 9 recall a 0.604 NA NA NA #> 10 f1 a 0.571 NA NA NA #> 11 prevalence a 0.53 NA NA NA #> 12 detection_rate a 0.32 NA NA NA #> 13 detection_prevalence a 0.59 NA NA NA #> 14 balanced_accuracy a 0.515 NA NA NA tidy(two_class_cm, by_class = FALSE) #> # A tibble: 3 × 5 #> term estimate conf.low conf.high p.value #> #> 1 accuracy 0.52 0.418 0.621 0.619 #> 2 kappa 0.0295 NA NA NA #> 3 mcnemar NA NA NA 0.470 # multiclass example six_class_sample1 <- as.factor(sample(letters[1:6], 100, TRUE)) six_class_sample2 <- as.factor(sample(letters[1:6], 100, TRUE)) six_class_cm <- confusionMatrix( six_class_sample1, six_class_sample2 ) # summarize model fit with tidiers tidy(six_class_cm) #> # A tibble: 69 × 6 #> term class estimate conf.low conf.high p.value #> #> 1 accuracy NA 0.2 0.127 0.292 0.795 #> 2 kappa NA 0.0351 NA NA NA #> 3 mcnemar NA NA NA NA 0.873 #> 4 sensitivity a 0.2 NA NA NA #> 5 specificity a 0.888 NA NA NA #> 6 pos_pred_value a 0.308 NA NA NA #> 7 neg_pred_value a 0.816 NA NA NA #> 8 precision a 0.308 NA NA NA #> 9 recall a 0.2 NA NA NA #> 10 f1 a 0.242 NA NA NA #> # ℹ 59 more rows tidy(six_class_cm, by_class = FALSE) #> # A tibble: 3 × 5 #> term estimate conf.low conf.high p.value #> #> 1 accuracy 0.2 0.127 0.292 0.795 #> 2 kappa 0.0351 NA NA NA #> 3 mcnemar NA NA NA 0.873"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) coxph object — tidy.coxph","title":"Tidy a(n) coxph object — tidy.coxph","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) coxph object — tidy.coxph","text":"","code":"# S3 method for class 'coxph' tidy(x, exponentiate = FALSE, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) coxph object — tidy.coxph","text":"x coxph object returned survival::coxph(). exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... tidy(), additional arguments passed summary(x, ...). Otherwise ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) coxph object — tidy.coxph","text":"tibble::tibble() columns: estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.coxph.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) coxph object — tidy.coxph","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) # summarize model fit with tidiers tidy(cfit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 0.0170 0.00922 1.85 0.0646 #> 2 sex -0.513 0.167 -3.06 0.00218 tidy(cfit, exponentiate = TRUE) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 age 1.02 0.00922 1.85 0.0646 #> 2 sex 0.599 0.167 -3.06 0.00218 lp <- augment(cfit, lung) risks <- augment(cfit, lung, type.predict = \"risk\") expected <- augment(cfit, lung, type.predict = \"expected\") glance(cfit) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 228 165 14.1 0.000857 13.7 0.00105 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs # also works on clogit models resp <- levels(logan$occupation) n <- nrow(logan) indx <- rep(1:n, length(resp)) logan2 <- data.frame( logan[indx, ], id = indx, tocc = factor(rep(resp, each = n)) ) logan2$case <- (logan2$occupation == logan2$tocc) cl <- clogit(case ~ tocc + tocc:education + strata(id), logan2) tidy(cl) #> # A tibble: 9 × 5 #> term estimate std.error statistic p.value #> #> 1 toccfarm -1.90 1.38 -1.37 1.70e- 1 #> 2 toccoperatives 1.17 0.566 2.06 3.91e- 2 #> 3 toccprofessional -8.10 0.699 -11.6 4.45e-31 #> 4 toccsales -5.03 0.770 -6.53 6.54e-11 #> 5 tocccraftsmen:education -0.332 0.0569 -5.84 5.13e- 9 #> 6 toccfarm:education -0.370 0.116 -3.18 1.47e- 3 #> 7 toccoperatives:education -0.422 0.0584 -7.23 4.98e-13 #> 8 toccprofessional:education 0.278 0.0510 5.45 4.94e- 8 #> 9 toccsales:education NA 0 NA NA glance(cl) #> # A tibble: 1 × 18 #> n nevent statistic.log p.value.log statistic.sc p.value.sc #> #> 1 4190 838 666. 1.90e-138 682. 5.01e-142 #> # ℹ 12 more variables: statistic.wald , p.value.wald , #> # statistic.robust , p.value.robust , r.squared , #> # r.squared.max , concordance , std.error.concordance , #> # logLik , AIC , BIC , nobs library(ggplot2) ggplot(lp, aes(age, .fitted, color = sex)) + geom_point() ggplot(risks, aes(age, .fitted, color = sex)) + geom_point() ggplot(expected, aes(time, .fitted, color = sex)) + geom_point()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) cmprsk object — tidy.crr","title":"Tidy a(n) cmprsk object — tidy.crr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) cmprsk object — tidy.crr","text":"","code":"# S3 method for class 'crr' tidy(x, exponentiate = FALSE, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) cmprsk object — tidy.crr","text":"x crr object returned cmprsk::crr(). exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) cmprsk object — tidy.crr","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.crr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) cmprsk object — tidy.crr","text":"","code":"library(cmprsk) # time to loco-regional failure (lrf) lrf_time <- rexp(100) lrf_event <- sample(0:2, 100, replace = TRUE) trt <- sample(0:1, 100, replace = TRUE) strt <- sample(1:2, 100, replace = TRUE) # fit model x <- crr(lrf_time, lrf_event, cbind(trt, strt)) # summarize model fit with tidiers tidy(x, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 trt -0.467 0.362 -1.29 0.2 -1.18 0.242 #> 2 strt 0.237 0.360 0.660 0.51 -0.468 0.943 glance(x) #> # A tibble: 1 × 5 #> converged logLik nobs df statistic #> #> 1 TRUE -125. 100 2 2.03"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"","code":"# S3 method for class 'cv.glmnet' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"x cv.glmnet object returned glmnet::cv.glmnet(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"tibble::tibble() columns: lambda Value penalty parameter lambda. nzero Number non-zero coefficients given lambda. std.error standard error regression term. conf.low lower bound confidence interval cross-validation estimated loss. conf.high upper bound confidence interval cross-validation estimated loss. estimate Median loss across cross-validation folds given lamdba","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.cv.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) cv.glmnet object — tidy.cv.glmnet","text":"","code":"# load libraries for models and data library(glmnet) set.seed(27) nobs <- 100 nvar <- 50 real <- 5 x <- matrix(rnorm(nobs * nvar), nobs, nvar) beta <- c(rnorm(real, 0, 1), rep(0, nvar - real)) y <- c(t(beta) %*% t(x)) + rnorm(nvar, sd = 3) cvfit1 <- cv.glmnet(x, y) tidy(cvfit1) #> # A tibble: 74 × 6 #> lambda estimate std.error conf.low conf.high nzero #> #> 1 1.45 17.4 2.28 15.1 19.7 0 #> 2 1.32 17.4 2.28 15.1 19.7 1 #> 3 1.20 17.2 2.22 15.0 19.5 1 #> 4 1.09 17.0 2.15 14.8 19.1 1 #> 5 0.997 16.8 2.09 14.7 18.9 1 #> 6 0.909 16.7 2.03 14.7 18.7 2 #> 7 0.828 16.7 1.99 14.7 18.6 3 #> 8 0.754 16.7 1.95 14.7 18.6 5 #> 9 0.687 16.8 1.93 14.8 18.7 7 #> 10 0.626 16.9 1.91 15.0 18.8 7 #> # ℹ 64 more rows glance(cvfit1) #> # A tibble: 1 × 3 #> lambda.min lambda.1se nobs #> #> 1 0.828 1.45 100 library(ggplot2) tidied_cv <- tidy(cvfit1) glance_cv <- glance(cvfit1) # plot of MSE as a function of lambda g <- ggplot(tidied_cv, aes(lambda, estimate)) + geom_line() + scale_x_log10() g # plot of MSE as a function of lambda with confidence ribbon g <- g + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25) g # plot of MSE as a function of lambda with confidence ribbon and choices # of minimum lambda marked g <- g + geom_vline(xintercept = glance_cv$lambda.min) + geom_vline(xintercept = glance_cv$lambda.1se, lty = 2) g # plot of number of zeros for each choice of lambda ggplot(tidied_cv, aes(lambda, nzero)) + geom_line() + scale_x_log10() # coefficient plot with min lambda shown tidied <- tidy(cvfit1$glmnet.fit) ggplot(tidied, aes(lambda, estimate, group = term)) + scale_x_log10() + geom_line() + geom_vline(xintercept = glance_cv$lambda.min) + geom_vline(xintercept = glance_cv$lambda.1se, lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.density.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Tidy density objects — tidy.density","title":"(Deprecated) Tidy density objects — tidy.density","text":"(Deprecated) Tidy density objects","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.density.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Tidy density objects — tidy.density","text":"","code":"# S3 method for class 'density' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.density.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Tidy density objects — tidy.density","text":"x density object returned stats::density(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.density.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Tidy density objects — tidy.density","text":"tibble::tibble two columns: points x density estimated, estimated density y.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Tidy dist objects — tidy.dist","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"(Deprecated) Tidy dist objects","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"","code":"# S3 method for class 'dist' tidy(x, diagonal = attr(x, \"Diag\"), upper = attr(x, \"Upper\"), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"x dist object returned stats::dist(). diagonal Logical indicating whether tidy diagonal elements distance matrix. Defaults whatever based diag argument stats::dist(). upper Logical indicating whether tidy upper half distance matrix. Defaults whatever based upper argument stats::dist(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"tibble::tibble one row pair items distance matrix, columns: item1 First item item2 Second item distance Distance items","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"distance matrix include upper triangle /diagonal, tidied version either.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.dist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"(Deprecated) Tidy dist objects — tidy.dist","text":"","code":"cars_dist <- dist(t(mtcars[, 1:4])) cars_dist #> mpg cyl disp #> cyl 89.32586 #> disp 1391.49546 1441.25177 #> hp 824.37547 878.17652 656.64044 tidy(cars_dist) #> # A tibble: 6 × 3 #> item1 item2 distance #> #> 1 mpg cyl 89.3 #> 2 mpg disp 1391. #> 3 mpg hp 824. #> 4 cyl disp 1441. #> 5 cyl hp 878. #> 6 disp hp 657. tidy(cars_dist, upper = TRUE) #> # A tibble: 12 × 3 #> item1 item2 distance #> #> 1 mpg cyl 89.3 #> 2 mpg disp 1391. #> 3 mpg hp 824. #> 4 cyl mpg 89.3 #> 5 cyl disp 1441. #> 6 cyl hp 878. #> 7 disp mpg 1391. #> 8 disp cyl 1441. #> 9 disp hp 657. #> 10 hp mpg 824. #> 11 hp cyl 878. #> 12 hp disp 657. tidy(cars_dist, diagonal = TRUE) #> # A tibble: 10 × 3 #> item1 item2 distance #> #> 1 mpg mpg 0 #> 2 mpg cyl 89.3 #> 3 mpg disp 1391. #> 4 mpg hp 824. #> 5 cyl cyl 0 #> 6 cyl disp 1441. #> 7 cyl hp 878. #> 8 disp disp 0 #> 9 disp hp 657. #> 10 hp hp 0"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) drc object — tidy.drc","title":"Tidy a(n) drc object — tidy.drc","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) drc object — tidy.drc","text":"","code":"# S3 method for class 'drc' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) drc object — tidy.drc","text":"x drc object produced call drc::drm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) drc object — tidy.drc","text":"tibble one row curve term regression. curveid column indicates curve.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) drc object — tidy.drc","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. curve Index identifying curve.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.drc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) drc object — tidy.drc","text":"","code":"# load libraries for models and data library(drc) # fit model mod <- drm(dead / total ~ conc, type, weights = total, data = selenium, fct = LL.2(), type = \"binomial\" ) # summarize model fit with tidiers tidy(mod) #> # A tibble: 8 × 6 #> term curve estimate std.error statistic p.value #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 #> 5 e 1 252. 13.8 18.2 1.16e-74 #> 6 e 2 378. 39.4 9.61 3.53e-22 #> 7 e 3 120. 5.91 20.3 1.14e-91 #> 8 e 4 88.8 8.62 10.3 3.28e-25 tidy(mod, conf.int = TRUE) #> # A tibble: 8 × 8 #> term curve estimate std.error statistic p.value conf.low conf.high #> #> 1 b 1 -1.50 0.155 -9.67 2.01e-22 -1.81 -1.20 #> 2 b 2 -0.843 0.139 -6.06 1.35e- 9 -1.12 -0.571 #> 3 b 3 -2.16 0.138 -15.7 1.65e-55 -2.43 -1.89 #> 4 b 4 -1.45 0.169 -8.62 3.41e-18 -1.78 -1.12 #> 5 e 1 252. 13.8 18.2 1.16e-74 225. 279. #> 6 e 2 378. 39.4 9.61 3.53e-22 301. 456. #> 7 e 3 120. 5.91 20.3 1.14e-91 108. 131. #> 8 e 4 88.8 8.62 10.3 3.28e-25 71.9 106. glance(mod) #> # A tibble: 1 × 4 #> AIC BIC logLik df.residual #> #> 1 768. 778. -376.2099 17 augment(mod, selenium) #> # A tibble: 25 × 7 #> type conc total dead .fitted .resid .cooksd #> #> 1 1 0 151 3 0 0.0199 0 #> 2 1 100 146 40 0.199 0.0748 0.0000909 #> 3 1 200 116 31 0.414 -0.146 0.000104 #> 4 1 300 159 85 0.565 -0.0302 0.00000516 #> 5 1 400 150 102 0.667 0.0133 0.00000220 #> 6 1 500 140 112 0.737 0.0633 0.0000720 #> 7 2 0 141 2 0 0.0142 0 #> 8 2 100 153 30 0.246 -0.0495 0.000168 #> 9 2 200 142 59 0.369 0.0468 0.0000347 #> 10 2 300 139 82 0.451 0.139 0.0000430 #> # ℹ 15 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) emmGrid object — tidy.emmGrid","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"","code":"# S3 method for class 'emmGrid' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"x emmGrid object. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid(). Cautionary note: misspecified arguments may silently ignored!","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"Returns data frame one observation estimated marginal mean, one column combination factors. input contrast, row contain one estimated contrast. large number arguments can passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. df Degrees freedom used term model. p.value two-sided p-value associated observed statistic. std.error standard error regression term. estimate Expected marginal mean statistic T-ratio statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.emmGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) emmGrid object — tidy.emmGrid","text":"","code":"# load libraries for models and data library(emmeans) #> Welcome to emmeans. #> Caution: You lose important information if you filter this package's results. #> See '? untidy' # linear model for sales of oranges per day oranges_lm1 <- lm(sales1 ~ price1 + price2 + day + store, data = oranges) # reference grid; see vignette(\"basics\", package = \"emmeans\") oranges_rg1 <- ref_grid(oranges_lm1) td <- tidy(oranges_rg1) td #> # A tibble: 36 × 9 #> price1 price2 day store estimate std.error df statistic p.value #> #> 1 51.2 48.6 1 1 2.92 2.72 23 1.07 0.294 #> 2 51.2 48.6 2 1 3.85 2.70 23 1.42 0.168 #> 3 51.2 48.6 3 1 11.0 2.53 23 4.35 0.000237 #> 4 51.2 48.6 4 1 6.10 2.65 23 2.30 0.0309 #> 5 51.2 48.6 5 1 12.8 2.44 23 5.23 0.0000261 #> 6 51.2 48.6 6 1 8.75 2.79 23 3.14 0.00459 #> 7 51.2 48.6 1 2 4.96 2.38 23 2.09 0.0482 #> 8 51.2 48.6 2 2 5.89 2.34 23 2.52 0.0190 #> 9 51.2 48.6 3 2 13.1 2.42 23 5.41 0.0000172 #> 10 51.2 48.6 4 2 8.14 2.35 23 3.46 0.00212 #> # ℹ 26 more rows # marginal averages marginal <- emmeans(oranges_rg1, \"day\") tidy(marginal) #> # A tibble: 6 × 6 #> day estimate std.error df statistic p.value #> #> 1 1 5.56 1.77 23 3.15 0.00451 #> 2 2 6.49 1.73 23 3.76 0.00103 #> 3 3 13.7 1.75 23 7.80 0.0000000658 #> 4 4 8.74 1.73 23 5.04 0.0000420 #> 5 5 15.4 1.79 23 8.65 0.0000000110 #> 6 6 11.4 1.77 23 6.45 0.00000140 # contrasts tidy(contrast(marginal)) #> # A tibble: 6 × 8 #> term contrast null.value estimate std.error df statistic adj.p.value #> #> 1 day day1 ef… 0 -4.65 1.62 23 -2.87 0.0261 #> 2 day day2 ef… 0 -3.72 1.58 23 -2.36 0.0547 #> 3 day day3 ef… 0 3.45 1.60 23 2.15 0.0637 #> 4 day day4 ef… 0 -1.47 1.59 23 -0.930 0.434 #> 5 day day5 ef… 0 5.22 1.64 23 3.18 0.0249 #> 6 day day6 ef… 0 1.18 1.62 23 0.726 0.475 tidy(contrast(marginal, method = \"pairwise\")) #> # A tibble: 15 × 8 #> term contrast null.value estimate std.error df statistic #> #> 1 day day1 - day2 0 -0.930 2.47 23 -0.377 #> 2 day day1 - day3 0 -8.10 2.47 23 -3.29 #> 3 day day1 - day4 0 -3.18 2.51 23 -1.27 #> 4 day day1 - day5 0 -9.88 2.56 23 -3.86 #> 5 day day1 - day6 0 -5.83 2.52 23 -2.31 #> 6 day day2 - day3 0 -7.17 2.48 23 -2.89 #> 7 day day2 - day4 0 -2.25 2.44 23 -0.920 #> 8 day day2 - day5 0 -8.95 2.52 23 -3.56 #> 9 day day2 - day6 0 -4.90 2.45 23 -2.00 #> 10 day day3 - day4 0 4.92 2.49 23 1.98 #> 11 day day3 - day5 0 -1.78 2.47 23 -0.719 #> 12 day day3 - day6 0 2.27 2.54 23 0.894 #> 13 day day4 - day5 0 -6.70 2.49 23 -2.69 #> 14 day day4 - day6 0 -2.65 2.45 23 -1.08 #> 15 day day5 - day6 0 4.05 2.56 23 1.58 #> # ℹ 1 more variable: adj.p.value # plot confidence intervals library(ggplot2) ggplot(tidy(marginal, conf.int = TRUE), aes(day, estimate)) + geom_point() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # by multiple prices by_price <- emmeans(oranges_lm1, \"day\", by = \"price2\", at = list( price1 = 50, price2 = c(40, 60, 80), day = c(\"2\", \"3\", \"4\") ) ) by_price #> price2 = 40: #> day emmean SE df lower.CL upper.CL #> 2 6.24 1.89 23 2.33 10.1 #> 3 13.41 2.12 23 9.02 17.8 #> 4 8.48 1.87 23 4.62 12.3 #> #> price2 = 60: #> day emmean SE df lower.CL upper.CL #> 2 9.21 2.11 23 4.85 13.6 #> 3 16.38 1.91 23 12.44 20.3 #> 4 11.46 2.18 23 6.96 16.0 #> #> price2 = 80: #> day emmean SE df lower.CL upper.CL #> 2 12.19 3.65 23 4.65 19.7 #> 3 19.36 3.27 23 12.59 26.1 #> 4 14.44 3.74 23 6.71 22.2 #> #> Results are averaged over the levels of: store #> Confidence level used: 0.95 tidy(by_price) #> # A tibble: 9 × 7 #> day price2 estimate std.error df statistic p.value #> #> 1 2 40 6.24 1.89 23 3.30 0.00310 #> 2 3 40 13.4 2.12 23 6.33 0.00000187 #> 3 4 40 8.48 1.87 23 4.55 0.000145 #> 4 2 60 9.21 2.11 23 4.37 0.000225 #> 5 3 60 16.4 1.91 23 8.60 0.0000000122 #> 6 4 60 11.5 2.18 23 5.26 0.0000244 #> 7 2 80 12.2 3.65 23 3.34 0.00282 #> 8 3 80 19.4 3.27 23 5.91 0.00000502 #> 9 4 80 14.4 3.74 23 3.86 0.000788 ggplot(tidy(by_price, conf.int = TRUE), aes(price2, estimate, color = day)) + geom_line() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # joint_tests tidy(joint_tests(oranges_lm1)) #> # A tibble: 4 × 5 #> term num.df den.df statistic p.value #> #> 1 price1 1 23 30.3 0.0000134 #> 2 price2 1 23 2.23 0.149 #> 3 day 5 23 4.88 0.00346 #> 4 store 5 23 2.52 0.0583"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"","code":"# S3 method for class 'epi.2by2' tidy(x, parameters = c(\"moa\", \"stat\"), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"x epi.2by2 object produced call epiR::epi.2by2() parameters Return measures association (moa) test statistics (stat), default moa (measures association) ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"tibble column measures association tests contained massoc massoc.detail epiR::epi.2by2() called.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. df Degrees freedom used term model. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. term name regression term. estimate Estimated measure association","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.epi.2by2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) epi.2by2 object — tidy.epi.2by2","text":"","code":"# load libraries for models and data library(epiR) #> Package epiR 2.0.76 is loaded #> Type help(epi.about) for summary information #> Type browseVignettes(package = 'epiR') to learn how to use epiR for applied epidemiological analyses #> # generate data dat <- matrix(c(13, 2163, 5, 3349), nrow = 2, byrow = TRUE) rownames(dat) <- c(\"DF+\", \"DF-\") colnames(dat) <- c(\"FUS+\", \"FUS-\") # fit model fit <- epi.2by2( dat = as.table(dat), method = \"cross.sectional\", conf.level = 0.95, units = 100, outcome = \"as.columns\" ) # summarize model fit with tidiers tidy(fit, parameters = \"moa\") #> # A tibble: 15 × 4 #> term estimate conf.low conf.high #> #> 1 PR.strata.wald 4.01 1.43 11.2 #> 2 PR.strata.taylor 4.01 1.43 11.2 #> 3 PR.strata.score 1.84 1.25 2.24 #> 4 OR.strata.wald 4.03 1.43 11.3 #> 5 OR.strata.cfield 4.03 NA NA #> 6 OR.strata.score 4.03 1.49 10.9 #> 7 OR.strata.mle 4.02 1.34 14.4 #> 8 ARisk.strata.wald 0.448 0.0992 0.797 #> 9 ARisk.strata.score 0.448 0.142 0.882 #> 10 NNT.strata.wald 223. 125. 1008. #> 11 NNT.strata.score 223. 113. 705. #> 12 PARisk.strata.wald 0.176 -0.0225 0.375 #> 13 PARisk.strata.piri 0.176 0.0389 0.314 #> 14 AFRisk.strata.wald 0.750 0.301 0.911 #> 15 PAFRisk.strata.wald 0.542 0.0361 0.782 tidy(fit, parameters = \"stat\") #> # A tibble: 3 × 4 #> term statistic df p.value #> #> 1 chi2.strata.uncor 8.18 1 0.00424 #> 2 chi2.strata.yates 6.85 1 0.00885 #> 3 chi2.strata.fisher NA NA 0.00635"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ergm object — tidy.ergm","title":"Tidy a(n) ergm object — tidy.ergm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. methods work model conforms ergm class, produced weighted networks ergm.count package.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ergm object — tidy.ergm","text":"","code":"# S3 method for class 'ergm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ergm object — tidy.ergm","text":"x ergm object returned call ergm::ergm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments pass ergm::summary(). Cautionary note: Misspecified arguments may silently ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ergm object — tidy.ergm","text":"tibble::tibble one row coefficient exponential random graph model, columns: term term model estimated tested estimate estimated coefficient std.error standard error mcmc.error MCMC error p.value two-sided p-value","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tidy a(n) ergm object — tidy.ergm","text":"Hunter DR, Handcock MS, Butts CT, Goodreau SM, Morris M (2008b). ergm: Package Fit, Simulate Diagnose Exponential-Family Models Networks. Journal Statistical Software, 24(3). https://www.jstatsoft.org/v24/i03/.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ergm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ergm object — tidy.ergm","text":"","code":"# load libraries for models and data library(ergm) #> #> ‘ergm’ 4.7.1 (2024-10-07), part of the Statnet Project #> * ‘news(package=\"ergm\")’ for changes since last version #> * ‘citation(\"ergm\")’ for citation information #> * ‘https://statnet.org’ for help, support, and other information #> ‘ergm’ 4 is a major update that introduces some #> backwards-incompatible changes. Please type #> ‘news(package=\"ergm\")’ for a list of major changes. #> #> Attaching package: ‘ergm’ #> The following object is masked from ‘package:btergm’: #> #> gof # load the Florentine marriage network data data(florentine) # fit a model where the propensity to form ties between # families depends on the absolute difference in wealth gest <- ergm(flomarriage ~ edges + absdiff(\"wealth\")) #> Starting maximum pseudolikelihood estimation (MPLE): #> Obtaining the responsible dyads. #> Evaluating the predictor and response matrix. #> Maximizing the pseudolikelihood. #> Finished MPLE. #> Evaluating log-likelihood at the estimate. #> # show terms, coefficient estimates and errors tidy(gest) #> # A tibble: 2 × 6 #> term estimate std.error mcmc.error statistic p.value #> #> 1 edges -2.30 0.402 0 -5.73 0.0000000102 #> 2 absdiff.wealth 0.0155 0.00616 0 2.52 0.0117 # show coefficients as odds ratios with a 99% CI tidy(gest, exponentiate = TRUE, conf.int = TRUE, conf.level = 0.99) #> Warning: Coefficients will be exponentiated, but the model didn't use a `log` or #> `logit` link. #> # A tibble: 2 × 8 #> term estimate std.error mcmc.error statistic p.value conf.low conf.high #> #> 1 edges 0.100 0.402 0 -5.73 1.02e-8 0.0355 0.282 #> 2 absd… 1.02 0.00616 0 2.52 1.17e-2 1.00 1.03 # take a look at likelihood measures and other # control parameters used during MCMC estimation glance(gest) #> # A tibble: 1 × 5 #> independence iterations logLik AIC BIC #> #> 1 TRUE 4 -51.0 106. 112. glance(gest, deviance = TRUE) #> # A tibble: 1 × 9 #> independence iterations logLik null.deviance df.null residual.deviance #> #> 1 TRUE 4 -51.0 166.3553 120 102. #> # ℹ 3 more variables: df.residual , AIC , BIC glance(gest, mcmc = TRUE) #> Though `glance()` was supplied `mcmc = TRUE`, the model was not fitted #> using MCMC, #> ℹ The corresponding columns will be omitted. #> # A tibble: 1 × 5 #> independence iterations logLik AIC BIC #> #> 1 TRUE 4 -51.0 106. 112."},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) factanal object — tidy.factanal","title":"Tidy a(n) factanal object — tidy.factanal","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) factanal object — tidy.factanal","text":"","code":"# S3 method for class 'factanal' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) factanal object — tidy.factanal","text":"x factanal object created stats::factanal(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) factanal object — tidy.factanal","text":"tibble::tibble() columns: variable Variable consideration. uniqueness Proportion residual, unexplained variance flX Factor loading level X.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.factanal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) factanal object — tidy.factanal","text":"","code":"set.seed(123) # generate data library(dplyr) library(purrr) m1 <- tibble( v1 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 4, 5, 6), v2 = c(1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 3, 4, 3, 3, 3, 4, 6, 5), v3 = c(3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 4, 6), v4 = c(3, 3, 4, 3, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 5, 6, 4), v5 = c(1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 6, 4, 5), v6 = c(1, 1, 1, 2, 1, 3, 3, 3, 4, 3, 1, 1, 1, 2, 1, 6, 5, 4) ) # new data m2 <- map_dfr(m1, rev) # factor analysis objects fit1 <- factanal(m1, factors = 3, scores = \"Bartlett\") fit2 <- factanal(m1, factors = 3, scores = \"regression\") # tidying the object tidy(fit1) #> # A tibble: 6 × 5 #> variable uniqueness fl1 fl2 fl3 #> #> 1 v1 0.005 0.944 0.182 0.267 #> 2 v2 0.101 0.905 0.235 0.159 #> 3 v3 0.005 0.236 0.210 0.946 #> 4 v4 0.224 0.180 0.242 0.828 #> 5 v5 0.0843 0.242 0.881 0.286 #> 6 v6 0.005 0.193 0.959 0.196 tidy(fit2) #> # A tibble: 6 × 5 #> variable uniqueness fl1 fl2 fl3 #> #> 1 v1 0.005 0.944 0.182 0.267 #> 2 v2 0.101 0.905 0.235 0.159 #> 3 v3 0.005 0.236 0.210 0.946 #> 4 v4 0.224 0.180 0.242 0.828 #> 5 v5 0.0843 0.242 0.881 0.286 #> 6 v6 0.005 0.193 0.959 0.196 # augmented dataframe augment(fit1) #> # A tibble: 18 × 4 #> .rownames .fs1 .fs2 .fs3 #> #> 1 1 -0.904 -0.931 0.948 #> 2 2 -0.869 -0.933 0.935 #> 3 3 -0.908 -0.932 0.962 #> 4 4 -1.00 -0.253 0.818 #> 5 5 -0.904 -0.931 0.948 #> 6 6 -0.745 0.727 -0.788 #> 7 7 -0.710 0.725 -0.801 #> 8 8 -0.750 0.726 -0.774 #> 9 9 -0.808 1.40 -0.930 #> 10 10 -0.745 0.727 -0.788 #> 11 11 0.927 -0.931 -0.837 #> 12 12 0.963 -0.933 -0.849 #> 13 13 0.923 -0.932 -0.823 #> 14 14 0.829 -0.253 -0.967 #> 15 15 0.927 -0.931 -0.837 #> 16 16 0.422 2.05 1.29 #> 17 17 1.47 1.29 0.545 #> 18 18 1.88 0.309 1.95 augment(fit2) #> # A tibble: 18 × 4 #> .rownames .fs1 .fs2 .fs3 #> #> 1 1 -0.897 -0.925 0.936 #> 2 2 -0.861 -0.927 0.924 #> 3 3 -0.901 -0.926 0.950 #> 4 4 -0.993 -0.251 0.809 #> 5 5 -0.897 -0.925 0.936 #> 6 6 -0.741 0.720 -0.784 #> 7 7 -0.706 0.718 -0.796 #> 8 8 -0.745 0.719 -0.770 #> 9 9 -0.803 1.39 -0.923 #> 10 10 -0.741 0.720 -0.784 #> 11 11 0.917 -0.925 -0.830 #> 12 12 0.952 -0.927 -0.842 #> 13 13 0.913 -0.926 -0.816 #> 14 14 0.820 -0.252 -0.958 #> 15 15 0.917 -0.925 -0.830 #> 16 16 0.426 2.04 1.28 #> 17 17 1.46 1.29 0.548 #> 18 18 1.88 0.314 1.95 # augmented dataframe (with new data) augment(fit1, data = m2) #> # A tibble: 18 × 10 #> .rownames v1 v2 v3 v4 v5 v6 .fs1 .fs2 .fs3 #> #> 1 1 6 5 6 4 5 4 -0.904 -0.931 0.948 #> 2 2 5 6 4 6 4 5 -0.869 -0.933 0.935 #> 3 3 4 4 5 5 6 6 -0.908 -0.932 0.962 #> 4 4 3 3 1 1 1 1 -1.00 -0.253 0.818 #> 5 5 3 3 1 1 1 2 -0.904 -0.931 0.948 #> 6 6 3 3 1 2 1 1 -0.745 0.727 -0.788 #> 7 7 3 4 1 1 1 1 -0.710 0.725 -0.801 #> 8 8 3 3 1 1 1 1 -0.750 0.726 -0.774 #> 9 9 1 1 1 1 3 3 -0.808 1.40 -0.930 #> 10 10 1 2 1 1 3 4 -0.745 0.727 -0.788 #> 11 11 1 1 1 2 3 3 0.927 -0.931 -0.837 #> 12 12 1 2 1 1 3 3 0.963 -0.933 -0.849 #> 13 13 1 1 1 1 3 3 0.923 -0.932 -0.823 #> 14 14 1 1 3 3 1 1 0.829 -0.253 -0.967 #> 15 15 1 1 3 3 1 2 0.927 -0.931 -0.837 #> 16 16 1 1 3 4 1 1 0.422 2.05 1.29 #> 17 17 1 2 3 3 1 1 1.47 1.29 0.545 #> 18 18 1 1 3 3 1 1 1.88 0.309 1.95 augment(fit2, data = m2) #> # A tibble: 18 × 10 #> .rownames v1 v2 v3 v4 v5 v6 .fs1 .fs2 .fs3 #> #> 1 1 6 5 6 4 5 4 -0.897 -0.925 0.936 #> 2 2 5 6 4 6 4 5 -0.861 -0.927 0.924 #> 3 3 4 4 5 5 6 6 -0.901 -0.926 0.950 #> 4 4 3 3 1 1 1 1 -0.993 -0.251 0.809 #> 5 5 3 3 1 1 1 2 -0.897 -0.925 0.936 #> 6 6 3 3 1 2 1 1 -0.741 0.720 -0.784 #> 7 7 3 4 1 1 1 1 -0.706 0.718 -0.796 #> 8 8 3 3 1 1 1 1 -0.745 0.719 -0.770 #> 9 9 1 1 1 1 3 3 -0.803 1.39 -0.923 #> 10 10 1 2 1 1 3 4 -0.741 0.720 -0.784 #> 11 11 1 1 1 2 3 3 0.917 -0.925 -0.830 #> 12 12 1 2 1 1 3 3 0.952 -0.927 -0.842 #> 13 13 1 1 1 1 3 3 0.913 -0.926 -0.816 #> 14 14 1 1 3 3 1 1 0.820 -0.252 -0.958 #> 15 15 1 1 3 3 1 2 0.917 -0.925 -0.830 #> 16 16 1 1 3 4 1 1 0.426 2.04 1.28 #> 17 17 1 2 3 3 1 1 1.46 1.29 0.548 #> 18 18 1 1 3 3 1 1 1.88 0.314 1.95"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) felm object — tidy.felm","title":"Tidy a(n) felm object — tidy.felm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) felm object — tidy.felm","text":"","code":"# S3 method for class 'felm' tidy( x, conf.int = FALSE, conf.level = 0.95, fe = FALSE, se.type = c(\"default\", \"iid\", \"robust\", \"cluster\"), ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) felm object — tidy.felm","text":"x felm object returned lfe::felm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. fe Logical indicating whether include estimates fixed effects. Defaults FALSE. se.type Character indicating type standard errors. Defaults using underlying felm() model object, e.g. clustered errors models provided cluster specification. Users can override defaults specifying appropriate alternative: \"iid\" (homoskedastic errors), \"robust\" (Eicker-Huber-White robust errors), \"cluster\" (clustered standard errors; model object supports ). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) felm object — tidy.felm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.felm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) felm object — tidy.felm","text":"","code":"# load libraries for models and data library(lfe) # use built-in `airquality` dataset head(airquality) #> Ozone Solar.R Wind Temp Month Day #> 1 41 190 7.4 67 5 1 #> 2 36 118 8.0 72 5 2 #> 3 12 149 12.6 74 5 3 #> 4 18 313 11.5 62 5 4 #> 5 NA NA 14.3 56 5 5 #> 6 28 NA 14.9 66 5 6 # no FEs; same as lm() est0 <- felm(Ozone ~ Temp + Wind + Solar.R, airquality) # summarize model fit with tidiers tidy(est0) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) -64.3 23.1 -2.79 0.00623 #> 2 Temp 1.65 0.254 6.52 0.00000000242 #> 3 Wind -3.33 0.654 -5.09 0.00000152 #> 4 Solar.R 0.0598 0.0232 2.58 0.0112 augment(est0) #> # A tibble: 111 × 7 #> .rownames Ozone Temp Wind Solar.R .fitted .resid #> #> 1 1 41 67 7.4 190 33.0 7.95 #> 2 2 36 72 8 118 35.0 1.00 #> 3 3 12 74 12.6 149 24.8 -12.8 #> 4 4 18 62 11.5 313 18.5 -0.475 #> 5 7 23 65 8.6 299 32.3 -9.26 #> 6 8 19 59 13.8 99 -6.95 25.9 #> 7 9 8 61 20.1 19 -29.4 37.4 #> 8 12 16 69 9.7 256 32.6 -16.6 #> 9 13 11 66 9.2 290 31.4 -20.4 #> 10 14 14 68 10.9 274 28.1 -14.1 #> # ℹ 101 more rows # add month fixed effects est1 <- felm(Ozone ~ Temp + Wind + Solar.R | Month, airquality) # summarize model fit with tidiers tidy(est1) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, fe = TRUE) #> # A tibble: 8 × 7 #> term estimate std.error statistic p.value N comp #> #> 1 Temp 1.88 0.341 5.50 0.000000274 NA NA #> 2 Wind -3.11 0.660 -4.71 0.00000778 NA NA #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 NA NA #> 4 Month.5 -74.2 4.23 -17.5 2.00 24 1 #> 5 Month.6 -89.0 6.91 -12.9 2.00 9 1 #> 6 Month.7 -83.0 4.06 -20.4 2 26 1 #> 7 Month.8 -78.4 4.32 -18.2 2.00 23 1 #> 8 Month.9 -90.2 3.85 -23.4 2 29 1 augment(est1) #> # A tibble: 111 × 8 #> .rownames Ozone Temp Wind Solar.R Month .fitted .resid #> #> 1 1 41 67 7.4 190 5 38.3 2.69 #> 2 2 36 72 8 118 5 42.1 -6.07 #> 3 3 12 74 12.6 149 5 33.1 -21.1 #> 4 4 18 62 11.5 313 5 22.6 -4.62 #> 5 7 23 65 8.6 299 5 36.5 -13.5 #> 6 8 19 59 13.8 99 5 -1.33 20.3 #> 7 9 8 61 20.1 19 5 -21.3 29.3 #> 8 12 16 69 9.7 256 5 38.4 -22.4 #> 9 13 11 66 9.2 290 5 36.1 -25.1 #> 10 14 14 68 10.9 274 5 33.7 -19.7 #> # ℹ 101 more rows glance(est1) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.637 0.612 20.7 25.8 4.57e-20 103 103 111 # the \"se.type\" argument can be used to switch out different standard errors # types on the fly. In turn, this can be useful exploring the effect of # different error structures on model inference. tidy(est1, se.type = \"iid\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.341 5.50 0.000000274 #> 2 Wind -3.11 0.660 -4.71 0.00000778 #> 3 Solar.R 0.0522 0.0237 2.21 0.0296 tidy(est1, se.type = \"robust\") #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Temp 1.88 0.344 5.45 0.000000344 #> 2 Wind -3.11 0.903 -3.44 0.000834 #> 3 Solar.R 0.0522 0.0226 2.31 0.0227 # add clustered SEs (also by month) est2 <- felm(Ozone ~ Temp + Wind + Solar.R | Month | 0 | Month, airquality) # summarize model fit with tidiers tidy(est2, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"cluster\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.182 10.3 0.000497 1.37 2.38 #> 2 Wind -3.11 1.31 -2.38 0.0760 -6.74 0.518 #> 3 Solar.R 0.0522 0.0408 1.28 0.270 -0.0611 0.166 tidy(est2, conf.int = TRUE, se.type = \"robust\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.344 5.45 0.00550 0.920 2.83 #> 2 Wind -3.11 0.903 -3.44 0.0262 -5.62 -0.602 #> 3 Solar.R 0.0522 0.0226 2.31 0.0817 -0.0104 0.115 tidy(est2, conf.int = TRUE, se.type = \"iid\") #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Temp 1.88 0.341 5.50 0.00532 0.929 2.82 #> 2 Wind -3.11 0.660 -4.71 0.00924 -4.94 -1.28 #> 3 Solar.R 0.0522 0.0237 2.21 0.0920 -0.0135 0.118"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) fitdistr object — tidy.fitdistr","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"","code":"# S3 method for class 'fitdistr' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"x fitdistr object returned MASS::fitdistr(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"tibble::tibble() columns: estimate estimated value regression term. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fitdistr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) fitdistr object — tidy.fitdistr","text":"","code":"# load libraries for models and data library(MASS) # generate data set.seed(2015) x <- rnorm(100, 5, 2) # fit models fit <- fitdistr(x, dnorm, list(mean = 3, sd = 1)) #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced #> Warning: NaNs produced # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 3 #> term estimate std.error #> #> 1 mean 4.90 0.201 #> 2 sd 2.01 0.142 glance(fit) #> # A tibble: 1 × 4 #> logLik AIC BIC nobs #> #> 1 -211.6533 427. 433. 100"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) fixest object — tidy.fixest","title":"Tidy a(n) fixest object — tidy.fixest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) fixest object — tidy.fixest","text":"","code":"# S3 method for class 'fixest' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) fixest object — tidy.fixest","text":"x fixest object returned fixest estimators conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed summary confint. Important arguments se cluster. arguments dof, exact_dof, forceCovariance, keepBounded. See summary.fixest.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) fixest object — tidy.fixest","text":"fixest package provides family functions estimating models arbitrary numbers fixed-effects, OLS GLM context. package also supports robust (.e. White) clustered standard error reporting via generic summary.fixest() command. similar vein, tidy() method models allows users specify desired standard error correction either 1) implicitly via supplied fixest object, 2) explicitly part tidy call. See examples . Note fixest confidence intervals calculated assuming normal distribution – assumes infinite degrees freedom CI. (assumption distinct degrees freedom used calculate standard errors. degrees freedom clusters fixed effects, see https://github.com/lrberge/fixest/issues/6 https://github.com/sgaure/lfe/issues/1#issuecomment-530646990)","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) fixest object — tidy.fixest","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.fixest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) fixest object — tidy.fixest","text":"","code":"# load libraries for models and data library(fixest) gravity <- feols( log(Euros) ~ log(dist_km) | Origin + Destination + Product + Year, trade ) tidy(gravity) #> # A tibble: 1 × 5 #> term estimate std.error statistic p.value #> #> 1 log(dist_km) -2.17 0.154 -14.1 0.00000000119 glance(gravity) #> # A tibble: 1 × 9 #> r.squared adj.r.squared within.r.squared pseudo.r.squared sigma nobs #> #> 1 0.706 0.705 0.219 NA 1.74 38325 #> # ℹ 3 more variables: AIC , BIC , logLik augment(gravity, trade) #> # A tibble: 38,325 × 9 #> .rownames Destination Origin Product Year dist_km Euros .fitted #> #> 1 1 LU BE 1 2007 140. 2966697 14.1 #> 2 2 BE LU 1 2007 140. 6755030 13.0 #> 3 3 LU BE 2 2007 140. 57078782 16.9 #> 4 4 BE LU 2 2007 140. 7117406 15.8 #> 5 5 LU BE 3 2007 140. 17379821 16.3 #> 6 6 BE LU 3 2007 140. 2622254 15.2 #> 7 7 LU BE 4 2007 140. 64867588 17.4 #> 8 8 BE LU 4 2007 140. 10731757 16.3 #> 9 9 LU BE 5 2007 140. 330702 14.1 #> 10 10 BE LU 5 2007 140. 7706 13.0 #> # ℹ 38,315 more rows #> # ℹ 1 more variable: .resid # to get robust or clustered SEs, users can either: # 1) specify the arguments directly in the `tidy()` call tidy(gravity, conf.int = TRUE, cluster = c(\"Product\", \"Year\")) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 tidy(gravity, conf.int = TRUE, se = \"threeway\") #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.175 -12.4 6.08e-9 -2.54 -1.79 # 2) or, feed tidy() a summary.fixest object that has already accepted # these arguments gravity_summ <- summary(gravity, cluster = c(\"Product\", \"Year\")) tidy(gravity_summ, conf.int = TRUE) #> # A tibble: 1 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(dist_km) -2.17 0.0760 -28.5 3.88e-10 -2.34 -2.00 # approach (1) is preferred."},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ftable.html","id":null,"dir":"Reference","previous_headings":"","what":"(Deprecated) Tidy ftable objects — tidy.ftable","title":"(Deprecated) Tidy ftable objects — tidy.ftable","text":"function deprecated. Please use tibble::as_tibble() instead.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ftable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Deprecated) Tidy ftable objects — tidy.ftable","text":"","code":"# S3 method for class 'ftable' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ftable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Deprecated) Tidy ftable objects — tidy.ftable","text":"x ftable object returned stats::ftable(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ftable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Deprecated) Tidy ftable objects — tidy.ftable","text":"ftable contains \"flat\" contingency table. melts tibble::tibble one column variable, Freq column.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) gam object — tidy.gam","title":"Tidy a(n) gam object — tidy.gam","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) gam object — tidy.gam","text":"","code":"# S3 method for class 'gam' tidy( x, parametric = FALSE, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) gam object — tidy.gam","text":"x gam object returned call mgcv::gam(). parametric Logical indicating parametric smooth terms tidied. Defaults FALSE, meaning smooth terms tidied default. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) gam object — tidy.gam","text":"parametric = FALSE return columns edf ref.df rather estimate std.error.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) gam object — tidy.gam","text":"tibble::tibble() columns: estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. edf effective degrees freedom. reported `parametric = FALSE` ref.df reference degrees freedom. reported `parametric = FALSE`","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) gam object — tidy.gam","text":"","code":"# load libraries for models and data library(mgcv) # fit model g <- gam(mpg ~ s(hp) + am + qsec, data = mtcars) # summarize model fit with tidiers tidy(g) #> # A tibble: 1 × 5 #> term edf ref.df statistic p.value #> #> 1 s(hp) 2.36 3.02 6.34 0.00218 tidy(g, parametric = TRUE) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 16.7 9.83 1.70 0.101 #> 2 am 4.37 1.56 2.81 0.00918 #> 3 qsec 0.0904 0.525 0.172 0.865 glance(g) #> # A tibble: 1 × 9 #> df logLik AIC BIC deviance df.residual nobs adj.r.squared npar #> #> 1 5.36 -74.4 162. 171. 196. 26.6 32 0.797 12 augment(g) #> # A tibble: 32 × 11 #> .rownames mpg am qsec hp .fitted .se.fit .resid .hat .sigma #> #> 1 Mazda RX4 21 1 16.5 110 24.3 1.03 -3.25 0.145 NA #> 2 Mazda RX4… 21 1 17.0 110 24.3 0.925 -3.30 0.116 NA #> 3 Datsun 710 22.8 1 18.6 93 26.0 0.894 -3.22 0.109 NA #> 4 Hornet 4 … 21.4 0 19.4 110 20.2 0.827 1.25 0.0930 NA #> 5 Hornet Sp… 18.7 0 17.0 175 15.7 0.815 3.02 0.0902 NA #> 6 Valiant 18.1 0 20.2 105 20.7 0.914 -2.56 0.113 NA #> 7 Duster 360 14.3 0 15.8 245 12.7 1.11 1.63 0.167 NA #> 8 Merc 240D 24.4 0 20 62 25.0 1.45 -0.618 0.287 NA #> 9 Merc 230 22.8 0 22.9 95 21.8 1.81 0.959 0.446 NA #> 10 Merc 280 19.2 0 18.3 123 19.0 0.864 0.211 0.102 NA #> # ℹ 22 more rows #> # ℹ 1 more variable: .cooksd "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) garch object — tidy.garch","title":"Tidy a(n) garch object — tidy.garch","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) garch object — tidy.garch","text":"","code":"# S3 method for class 'garch' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) garch object — tidy.garch","text":"x garch object returned tseries::garch(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) garch object — tidy.garch","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.garch.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) garch object — tidy.garch","text":"","code":"# load libraries for models and data library(tseries) # load data data(EuStockMarkets) # fit model dax <- diff(log(EuStockMarkets))[, \"DAX\"] dax.garch <- garch(dax) #> #> ***** ESTIMATION WITH ANALYTICAL GRADIENT ***** #> #> #> I INITIAL X(I) D(I) #> #> 1 9.549651e-05 1.000e+00 #> 2 5.000000e-02 1.000e+00 #> 3 5.000000e-02 1.000e+00 #> #> IT NF F RELDF PRELDF RELDX STPPAR D*STEP NPRELDF #> 0 1 -7.584e+03 #> 1 8 -7.585e+03 1.45e-05 2.60e-05 1.4e-05 1.0e+11 1.4e-06 1.35e+06 #> 2 9 -7.585e+03 1.88e-07 1.97e-07 1.3e-05 2.0e+00 1.4e-06 1.50e+00 #> 3 18 -7.589e+03 6.22e-04 1.10e-03 3.5e-01 2.0e+00 5.5e-02 1.50e+00 #> 4 21 -7.601e+03 1.58e-03 1.81e-03 6.2e-01 1.9e+00 2.2e-01 3.07e-01 #> 5 23 -7.634e+03 4.22e-03 3.55e-03 4.3e-01 9.6e-01 4.4e-01 3.06e-02 #> 6 25 -7.646e+03 1.61e-03 1.85e-03 2.9e-02 2.0e+00 4.4e-02 5.43e-02 #> 7 27 -7.646e+03 3.82e-05 5.23e-04 1.3e-02 2.0e+00 2.0e-02 1.46e-02 #> 8 28 -7.648e+03 1.86e-04 1.46e-04 6.5e-03 2.0e+00 9.9e-03 1.54e-03 #> 9 29 -7.648e+03 3.12e-05 4.83e-05 6.4e-03 2.0e+00 9.9e-03 3.34e-03 #> 10 30 -7.648e+03 1.39e-05 6.31e-05 6.2e-03 1.9e+00 9.9e-03 1.86e-03 #> 11 31 -7.650e+03 2.70e-04 3.24e-04 6.0e-03 1.9e+00 9.9e-03 4.99e-03 #> 12 34 -7.656e+03 8.42e-04 8.57e-04 2.2e-02 1.7e-01 3.9e-02 2.22e-03 #> 13 36 -7.661e+03 6.12e-04 6.40e-04 1.9e-02 4.2e-01 3.9e-02 2.09e-03 #> 14 38 -7.665e+03 4.87e-04 8.63e-04 4.9e-02 4.1e-01 9.6e-02 9.69e-04 #> 15 48 -7.666e+03 1.02e-04 1.86e-04 1.9e-07 4.5e+00 3.5e-07 3.94e-04 #> 16 49 -7.666e+03 1.12e-07 1.01e-07 1.9e-07 2.0e+00 3.5e-07 6.22e-05 #> 17 57 -7.666e+03 1.60e-05 2.70e-05 2.0e-03 9.3e-01 3.7e-03 6.10e-05 #> 18 59 -7.666e+03 5.23e-06 7.01e-06 3.7e-03 3.9e-01 8.0e-03 7.77e-06 #> 19 60 -7.666e+03 4.08e-08 3.74e-08 1.4e-04 0.0e+00 3.1e-04 3.74e-08 #> 20 61 -7.666e+03 2.31e-09 8.57e-10 8.6e-06 0.0e+00 2.0e-05 8.57e-10 #> 21 62 -7.666e+03 5.35e-11 2.25e-13 7.6e-07 0.0e+00 1.6e-06 2.25e-13 #> 22 63 -7.666e+03 1.81e-12 7.06e-16 1.7e-08 0.0e+00 3.4e-08 7.06e-16 #> 23 64 -7.666e+03 7.00e-14 1.69e-17 1.0e-09 0.0e+00 2.4e-09 1.69e-17 #> 24 65 -7.666e+03 -1.16e-14 1.76e-20 1.9e-10 0.0e+00 4.0e-10 1.76e-20 #> #> ***** X- AND RELATIVE FUNCTION CONVERGENCE ***** #> #> FUNCTION -7.665775e+03 RELDX 1.874e-10 #> FUNC. EVALS 65 GRAD. EVALS 24 #> PRELDF 1.760e-20 NPRELDF 1.760e-20 #> #> I FINAL X(I) D(I) G(I) #> #> 1 4.639289e-06 1.000e+00 -2.337e-02 #> 2 6.832875e-02 1.000e+00 -8.294e-07 #> 3 8.890666e-01 1.000e+00 -2.230e-06 #> dax.garch #> #> Call: #> garch(x = dax) #> #> Coefficient(s): #> a0 a1 b1 #> 4.639e-06 6.833e-02 8.891e-01 #> # summarize model fit with tidiers tidy(dax.garch) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 a0 0.00000464 0.000000756 6.14 8.42e-10 #> 2 a1 0.0683 0.0113 6.07 1.25e- 9 #> 3 b1 0.889 0.0165 53.8 0 glance(dax.garch) #> # A tibble: 1 × 8 #> statistic p.value parameter method logLik AIC BIC nobs #> #> 1 0.136 0.713 1 Box-Ljung test 5958. -11911. -11894. 1859"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) geeglm object — tidy.geeglm","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"","code":"# S3 method for class 'geeglm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"x geeglm object returned call geepack::geeglm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"conf.int = TRUE, confidence interval computed internal confint.geeglm() function. missing values model data, may need refit model na.action = na.exclude deal missingness data beforehand.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.geeglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) geeglm object — tidy.geeglm","text":"","code":"# load modeling library library(geepack) # load data data(state) ds <- data.frame(state.region, state.x77) # fit model geefit <- geeglm(Income ~ Frost + Murder, id = state.region, data = ds, corstr = \"exchangeable\" ) # summarize model fit with tidiers tidy(geefit) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4406. 407. 117. 0 #> 2 Frost 1.69 2.25 0.562 0.453 #> 3 Murder -22.7 31.4 0.522 0.470 tidy(geefit, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4406. 407. 117. 0 3608. 5205. #> 2 Frost 1.69 2.25 0.562 0.453 -2.72 6.10 #> 3 Murder -22.7 31.4 0.522 0.470 -84.2 38.8"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glht object — tidy.glht","title":"Tidy a(n) glht object — tidy.glht","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glht object — tidy.glht","text":"","code":"# S3 method for class 'glht' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glht object — tidy.glht","text":"x glht object returned multcomp::glht(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed summary() tidy.summary.glht().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) glht object — tidy.glht","text":"tibble::tibble() columns: contrast Levels compared. estimate estimated value regression term. null.value Value estimate compared.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glht.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) glht object — tidy.glht","text":"","code":"# load libraries for models and data library(multcomp) library(ggplot2) amod <- aov(breaks ~ wool + tension, data = warpbreaks) wht <- glht(amod, linfct = mcp(tension = \"Tukey\")) tidy(wht) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0336 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00108 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(wht, aes(lhs, estimate)) + geom_point() CI <- confint(wht) tidy(CI) #> # A tibble: 3 × 5 #> term contrast estimate conf.low conf.high #> #> 1 tension M - L -10 -19.4 -0.649 #> 2 tension H - L -14.7 -24.1 -5.37 #> 3 tension H - M -4.72 -14.1 4.63 ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + geom_pointrange() tidy(summary(wht)) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0335 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00111 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(mapping = aes(lhs, estimate)) + geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + geom_point(aes(size = p), data = summary(wht)) + scale_size(trans = \"reverse\") cld <- cld(wht) tidy(cld) #> # A tibble: 3 × 2 #> tension letters #> #> 1 L a #> 2 M b #> 3 H b"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glm object — tidy.glm","title":"Tidy a(n) glm object — tidy.glm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glm object — tidy.glm","text":"","code":"# S3 method for class 'glm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glm object — tidy.glm","text":"x glm object returned stats::glm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glmRob object — tidy.glmRob","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"","code":"# S3 method for class 'glmRob' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"x glmRob object returned robust::glmRob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) glmRob object — tidy.glmRob","text":"","code":"# load libraries for models and data library(robust) # fit model gm <- glmRob(am ~ wt, data = mtcars, family = \"binomial\") # summarize model fit with tidiers tidy(gm) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 12.0 4.51 2.67 0.00759 #> 2 wt -4.02 1.44 -2.80 0.00509 glance(gm) #> # A tibble: 1 × 5 #> deviance sigma null.deviance df.residual nobs #> #> 1 19.2 0.800 44.4 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glmnet object — tidy.glmnet","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"","code":"# S3 method for class 'glmnet' tidy(x, return_zeros = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"x glmnet object returned glmnet::glmnet(). return_zeros Logical indicating whether coefficients value zero zero included results. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"Note representation GLMs much easier plot combine default structure, also much memory-intensive. use large, sparse matrices. augment method yet provided even though model produces predictions, input data tidy (matrix may wide) therefore combining predictions logical. Furthermore, predictions make sense specific choice lambda.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"tibble::tibble() columns: dev.ratio Fraction null deviance explained value lambda. estimate estimated value regression term. lambda Value penalty parameter lambda. step step lambda choices used. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.glmnet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) glmnet object — tidy.glmnet","text":"","code":"# load libraries for models and data library(glmnet) set.seed(2014) x <- matrix(rnorm(100 * 20), 100, 20) y <- rnorm(100) fit1 <- glmnet(x, y) # summarize model fit with tidiers + visualization tidy(fit1) #> # A tibble: 1,086 × 5 #> term step estimate lambda dev.ratio #> #> 1 (Intercept) 1 -0.207 0.152 0 #> 2 (Intercept) 2 -0.208 0.139 0.00464 #> 3 (Intercept) 3 -0.209 0.127 0.0111 #> 4 (Intercept) 4 -0.210 0.115 0.0165 #> 5 (Intercept) 5 -0.210 0.105 0.0240 #> 6 (Intercept) 6 -0.210 0.0957 0.0321 #> 7 (Intercept) 7 -0.210 0.0872 0.0412 #> 8 (Intercept) 8 -0.210 0.0795 0.0497 #> 9 (Intercept) 9 -0.209 0.0724 0.0593 #> 10 (Intercept) 10 -0.208 0.0660 0.0682 #> # ℹ 1,076 more rows glance(fit1) #> # A tibble: 1 × 3 #> nulldev npasses nobs #> #> 1 104. 255 100 library(dplyr) library(ggplot2) tidied <- tidy(fit1) %>% filter(term != \"(Intercept)\") ggplot(tidied, aes(step, estimate, group = term)) + geom_line() ggplot(tidied, aes(lambda, estimate, group = term)) + geom_line() + scale_x_log10() ggplot(tidied, aes(lambda, dev.ratio)) + geom_line() # works for other types of regressions as well, such as logistic g2 <- sample(1:2, 100, replace = TRUE) fit2 <- glmnet(x, g2, family = \"binomial\") tidy(fit2) #> # A tibble: 947 × 5 #> term step estimate lambda dev.ratio #> #> 1 (Intercept) 1 0.282 0.0906 -1.62e-15 #> 2 (Intercept) 2 0.281 0.0826 6.28e- 3 #> 3 (Intercept) 3 0.279 0.0753 1.55e- 2 #> 4 (Intercept) 4 0.277 0.0686 2.48e- 2 #> 5 (Intercept) 5 0.284 0.0625 4.17e- 2 #> 6 (Intercept) 6 0.293 0.0569 5.79e- 2 #> 7 (Intercept) 7 0.303 0.0519 7.39e- 2 #> 8 (Intercept) 8 0.314 0.0473 8.94e- 2 #> 9 (Intercept) 9 0.325 0.0431 1.03e- 1 #> 10 (Intercept) 10 0.336 0.0392 1.14e- 1 #> # ℹ 937 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) gmm object — tidy.gmm","title":"Tidy a(n) gmm object — tidy.gmm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) gmm object — tidy.gmm","text":"","code":"# S3 method for class 'gmm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) gmm object — tidy.gmm","text":"x gmm object returned gmm::gmm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) gmm object — tidy.gmm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.gmm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) gmm object — tidy.gmm","text":"","code":"# load libraries for models and data library(gmm) # examples come from the \"gmm\" package # CAPM test with GMM data(Finance) r <- Finance[1:300, 1:10] rm <- Finance[1:300, \"rm\"] rf <- Finance[1:300, \"rf\"] z <- as.matrix(r - rf) t <- nrow(z) zm <- rm - rf h <- matrix(zm, t, 1) res <- gmm(z ~ zm, x = h) # tidy result tidy(res) #> # A tibble: 20 × 5 #> term estimate std.error statistic p.value #> #> 1 WMK_(Intercept) -0.00467 0.0566 -0.0824 9.34e- 1 #> 2 UIS_(Intercept) 0.102 0.126 0.816 4.15e- 1 #> 3 ORB_(Intercept) 0.146 0.203 0.718 4.73e- 1 #> 4 MAT_(Intercept) 0.0359 0.110 0.326 7.45e- 1 #> 5 ABAX_(Intercept) 0.0917 0.288 0.318 7.50e- 1 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 #> 7 EMR_(Intercept) 0.0299 0.0552 0.542 5.88e- 1 #> 8 JCS_(Intercept) 0.117 0.155 0.756 4.50e- 1 #> 9 VOXX_(Intercept) 0.0209 0.182 0.115 9.09e- 1 #> 10 ZOOM_(Intercept) -0.219 0.202 -1.08 2.79e- 1 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 tidy(res, conf.int = TRUE) #> # A tibble: 20 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercep… -0.00467 0.0566 -0.0824 9.34e- 1 -0.116 0.106 #> 2 UIS_(Intercep… 0.102 0.126 0.816 4.15e- 1 -0.144 0.348 #> 3 ORB_(Intercep… 0.146 0.203 0.718 4.73e- 1 -0.252 0.544 #> 4 MAT_(Intercep… 0.0359 0.110 0.326 7.45e- 1 -0.180 0.252 #> 5 ABAX_(Interce… 0.0917 0.288 0.318 7.50e- 1 -0.473 0.656 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 -0.129 0.175 #> 7 EMR_(Intercep… 0.0299 0.0552 0.542 5.88e- 1 -0.0782 0.138 #> 8 JCS_(Intercep… 0.117 0.155 0.756 4.50e- 1 -0.186 0.420 #> 9 VOXX_(Interce… 0.0209 0.182 0.115 9.09e- 1 -0.335 0.377 #> 10 ZOOM_(Interce… -0.219 0.202 -1.08 2.79e- 1 -0.616 0.177 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 0.0708 0.564 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 0.812 1.71 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 0.654 2.33 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 0.588 1.44 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 -0.0451 2.22 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 0.547 1.15 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 0.545 0.936 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 0.277 1.64 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 0.758 2.21 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 1.45 2.71 tidy(res, conf.int = TRUE, conf.level = .99) #> # A tibble: 20 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercep… -0.00467 0.0566 -0.0824 9.34e- 1 -0.151 0.141 #> 2 UIS_(Intercep… 0.102 0.126 0.816 4.15e- 1 -0.221 0.426 #> 3 ORB_(Intercep… 0.146 0.203 0.718 4.73e- 1 -0.377 0.669 #> 4 MAT_(Intercep… 0.0359 0.110 0.326 7.45e- 1 -0.248 0.320 #> 5 ABAX_(Interce… 0.0917 0.288 0.318 7.50e- 1 -0.650 0.834 #> 6 T_(Intercept) 0.0231 0.0774 0.298 7.65e- 1 -0.176 0.223 #> 7 EMR_(Intercep… 0.0299 0.0552 0.542 5.88e- 1 -0.112 0.172 #> 8 JCS_(Intercep… 0.117 0.155 0.756 4.50e- 1 -0.281 0.515 #> 9 VOXX_(Interce… 0.0209 0.182 0.115 9.09e- 1 -0.447 0.489 #> 10 ZOOM_(Interce… -0.219 0.202 -1.08 2.79e- 1 -0.740 0.302 #> 11 WMK_zm 0.317 0.126 2.52 1.16e- 2 -0.00656 0.641 #> 12 UIS_zm 1.26 0.230 5.49 3.94e- 8 0.671 1.85 #> 13 ORB_zm 1.49 0.428 3.49 4.87e- 4 0.391 2.60 #> 14 MAT_zm 1.01 0.218 4.66 3.09e- 6 0.454 1.58 #> 15 ABAX_zm 1.09 0.579 1.88 5.98e- 2 -0.401 2.58 #> 16 T_zm 0.849 0.154 5.52 3.41e- 8 0.453 1.25 #> 17 EMR_zm 0.741 0.0998 7.43 1.13e-13 0.484 0.998 #> 18 JCS_zm 0.959 0.348 2.76 5.85e- 3 0.0627 1.85 #> 19 VOXX_zm 1.48 0.369 4.01 6.04e- 5 0.530 2.43 #> 20 ZOOM_zm 2.08 0.321 6.46 1.02e-10 1.25 2.91 # coefficient plot library(ggplot2) library(dplyr) tidy(res, conf.int = TRUE) %>% mutate(variable = reorder(term, estimate)) %>% ggplot(aes(estimate, variable)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_vline(xintercept = 0, color = \"red\", lty = 2) # from a function instead of a matrix g <- function(theta, x) { e <- x[, 2:11] - theta[1] - (x[, 1] - theta[1]) %*% matrix(theta[2:11], 1, 10) gmat <- cbind(e, e * c(x[, 1])) return(gmat) } x <- as.matrix(cbind(rm, r)) res_black <- gmm(g, x = x, t0 = rep(0, 11)) tidy(res_black) #> # A tibble: 11 × 5 #> term estimate std.error statistic p.value #> #> 1 Theta[1] 0.516 0.172 3.00 2.72e- 3 #> 2 Theta[2] 1.12 0.116 9.65 5.02e-22 #> 3 Theta[3] 0.680 0.197 3.45 5.65e- 4 #> 4 Theta[4] -0.0322 0.424 -0.0761 9.39e- 1 #> 5 Theta[5] 0.850 0.155 5.49 4.05e- 8 #> 6 Theta[6] -0.205 0.479 -0.429 6.68e- 1 #> 7 Theta[7] 0.625 0.122 5.14 2.73e- 7 #> 8 Theta[8] 1.05 0.0687 15.3 5.03e-53 #> 9 Theta[9] 0.640 0.233 2.75 5.92e- 3 #> 10 Theta[10] 0.596 0.295 2.02 4.36e- 2 #> 11 Theta[11] 1.16 0.240 4.82 1.45e- 6 tidy(res_black, conf.int = TRUE) #> # A tibble: 11 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 Theta[1] 0.516 0.172 3.00 2.72e- 3 0.178 0.853 #> 2 Theta[2] 1.12 0.116 9.65 5.02e-22 0.889 1.34 #> 3 Theta[3] 0.680 0.197 3.45 5.65e- 4 0.293 1.07 #> 4 Theta[4] -0.0322 0.424 -0.0761 9.39e- 1 -0.862 0.798 #> 5 Theta[5] 0.850 0.155 5.49 4.05e- 8 0.546 1.15 #> 6 Theta[6] -0.205 0.479 -0.429 6.68e- 1 -1.14 0.733 #> 7 Theta[7] 0.625 0.122 5.14 2.73e- 7 0.387 0.864 #> 8 Theta[8] 1.05 0.0687 15.3 5.03e-53 0.919 1.19 #> 9 Theta[9] 0.640 0.233 2.75 5.92e- 3 0.184 1.10 #> 10 Theta[10] 0.596 0.295 2.02 4.36e- 2 0.0171 1.17 #> 11 Theta[11] 1.16 0.240 4.82 1.45e- 6 0.686 1.63 # APT test with Fama-French factors and GMM f1 <- zm f2 <- Finance[1:300, \"hml\"] - rf f3 <- Finance[1:300, \"smb\"] - rf h <- cbind(f1, f2, f3) res2 <- gmm(z ~ f1 + f2 + f3, x = h) td2 <- tidy(res2, conf.int = TRUE) td2 #> # A tibble: 40 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 WMK_(Intercept) -0.0240 0.0548 -0.438 0.662 -0.131 0.0834 #> 2 UIS_(Intercept) 0.0723 0.127 0.567 0.570 -0.177 0.322 #> 3 ORB_(Intercept) 0.114 0.212 0.534 0.593 -0.303 0.530 #> 4 MAT_(Intercept) 0.0694 0.0979 0.709 0.478 -0.122 0.261 #> 5 ABAX_(Intercep… 0.0668 0.275 0.242 0.808 -0.473 0.606 #> 6 T_(Intercept) 0.0195 0.0745 0.262 0.793 -0.126 0.165 #> 7 EMR_(Intercept) 0.0217 0.0538 0.404 0.687 -0.0837 0.127 #> 8 JCS_(Intercept) 0.0904 0.154 0.586 0.558 -0.212 0.393 #> 9 VOXX_(Intercep… -0.00706 0.179 -0.0394 0.969 -0.359 0.344 #> 10 ZOOM_(Intercep… -0.189 0.215 -0.878 0.380 -0.610 0.233 #> # ℹ 30 more rows # coefficient plot td2 %>% mutate(variable = reorder(term, estimate)) %>% ggplot(aes(estimate, variable)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_vline(xintercept = 0, color = \"red\", lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy/glance a(n) htest object — tidy.htest","title":"Tidy/glance a(n) htest object — tidy.htest","text":"models single component, tidy() glance() methods identical. Please see documentation methods.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy/glance a(n) htest object — tidy.htest","text":"","code":"# S3 method for class 'htest' tidy(x, ...) # S3 method for class 'htest' glance(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy/glance a(n) htest object — tidy.htest","text":"x htest objected, created stats::cor.test(), stats::t.test(), stats::wilcox.test(), stats::chisq.test(), etc. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy/glance a(n) htest object — tidy.htest","text":"tibble::tibble() columns: alternative Alternative hypothesis (character). conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. estimate1 Sometimes two estimates computed, two-sample t-test. estimate2 Sometimes two estimates computed, two-sample t-test. method Method used. p.value two-sided p-value associated observed statistic. parameter parameter modeled. statistic value T-statistic use hypothesis regression term non-zero.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy/glance a(n) htest object — tidy.htest","text":"","code":"tt <- t.test(rnorm(10)) tidy(tt) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.218 -0.533 0.607 9 -1.14 0.706 One Sample t-te… #> # ℹ 1 more variable: alternative # the glance output will be the same for each of the below tests glance(tt) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.218 -0.533 0.607 9 -1.14 0.706 One Sample t-te… #> # ℹ 1 more variable: alternative tt <- t.test(mpg ~ am, data = mtcars) tidy(tt) #> # A tibble: 1 × 10 #> estimate estimate1 estimate2 statistic p.value parameter conf.low #> #> 1 -7.24 17.1 24.4 -3.77 0.00137 18.3 -11.3 #> # ℹ 3 more variables: conf.high , method , alternative wt <- wilcox.test(mpg ~ am, data = mtcars, conf.int = TRUE, exact = FALSE) tidy(wt) #> # A tibble: 1 × 7 #> estimate statistic p.value conf.low conf.high method alternative #> #> 1 -6.80 42 0.00187 -11.7 -2.90 Wilcoxon rank… two.sided ct <- cor.test(mtcars$wt, mtcars$mpg) tidy(ct) #> # A tibble: 1 × 8 #> estimate statistic p.value parameter conf.low conf.high method #> #> 1 -0.868 -9.56 1.29e-10 30 -0.934 -0.744 Pearson's prod… #> # ℹ 1 more variable: alternative chit <- chisq.test(xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic))) tidy(chit) #> # A tibble: 1 × 4 #> statistic p.value parameter method #> #> 1 350. 1.56e-75 3 Pearson's Chi-squared test augment(chit) #> # A tibble: 8 × 9 #> Sex Class .observed .prop .row.prop .col.prop .expected .resid #> #> 1 Male 1st 180 0.0818 0.104 0.554 256. -4.73 #> 2 Female 1st 145 0.0659 0.309 0.446 69.4 9.07 #> 3 Male 2nd 179 0.0813 0.103 0.628 224. -3.02 #> 4 Female 2nd 106 0.0482 0.226 0.372 60.9 5.79 #> 5 Male 3rd 510 0.232 0.295 0.722 555. -1.92 #> 6 Female 3rd 196 0.0891 0.417 0.278 151. 3.68 #> 7 Male Crew 862 0.392 0.498 0.974 696. 6.29 #> 8 Female Crew 23 0.0104 0.0489 0.0260 189. -12.1 #> # ℹ 1 more variable: .std.resid "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ivreg object — tidy.ivreg","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"","code":"# S3 method for class 'ivreg' tidy(x, conf.int = FALSE, conf.level = 0.95, instruments = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"x ivreg object created call AER::ivreg(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. instruments Logical indicating whether return coefficients second-stage diagnostics tests endogenous regressor (F-statistics). Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"tidier currently supports ivreg-classed objects outputted AER package. ivreg package also outputs objects class ivreg, supported later release.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. p.value.Sargan p-value Sargan test overidentifying restrictions. p.value.weakinst p-value weak instruments test. p.value.Wu.Hausman p-value Wu-Hausman weak instruments test endogeneity. statistic value T-statistic use hypothesis regression term non-zero. statistic.Sargan Statistic Sargan test overidentifying restrictions. statistic.weakinst Statistic Wu-Hausman test. statistic.Wu.Hausman Statistic Wu-Hausman weak instruments test endogeneity. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ivreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ivreg object — tidy.ivreg","text":"","code":"# load libraries for models and data library(AER) # load data data(\"CigarettesSW\", package = \"AER\") # fit model ivr <- ivreg( log(packs) ~ income | population, data = CigarettesSW, subset = year == \"1995\" ) # summarize model fit with tidiers tidy(ivr) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 tidy(ivr, conf.int = TRUE) #> # A tibble: 2 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 4.61e+ 0 4.45e- 2 104. 3.74e-56 4.52e+0 4.70e+ 0 #> 2 income -5.71e-10 2.33e-10 -2.44 1.84e- 2 -1.03e-9 -1.13e-10 tidy(ivr, conf.int = TRUE, instruments = TRUE) #> # A tibble: 1 × 5 #> term num.df den.df statistic p.value #> #> 1 income 1 46 3329. 1.46e-44 augment(ivr) #> # A tibble: 48 × 6 #> .rownames `log(packs)` income population .fitted .resid #> #> 1 49 4.62 83903280 4262731 4.56 0.0522 #> 2 50 4.71 45995496 2480121 4.59 0.124 #> 3 51 4.28 88870496 4306908 4.56 -0.285 #> 4 52 4.04 771470144 31493524 4.17 -0.131 #> 5 53 4.41 92946544 3738061 4.56 -0.145 #> 6 54 4.38 104315120 3265293 4.55 -0.177 #> 7 55 4.82 18237436 718265 4.60 0.223 #> 8 56 4.53 333525344 14185403 4.42 0.112 #> 9 57 4.58 159800448 7188538 4.52 0.0591 #> 10 58 4.53 60170928 2840860 4.58 -0.0512 #> # ℹ 38 more rows augment(ivr, data = CigarettesSW) #> # A tibble: 96 × 11 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.56 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.59 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.56 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.17 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.56 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.55 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.60 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.42 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.52 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.58 #> # ℹ 86 more rows #> # ℹ 1 more variable: .resid augment(ivr, newdata = CigarettesSW) #> # A tibble: 96 × 10 #> state year cpi population packs income tax price taxs .fitted #> #> 1 AL 1985 1.08 3973000 116. 46014968 32.5 102. 33.3 4.59 #> 2 AR 1985 1.08 2327000 129. 26210736 37 101. 37 4.60 #> 3 AZ 1985 1.08 3184000 105. 43956936 31 109. 36.2 4.59 #> 4 CA 1985 1.08 26444000 100. 447102816 26 108. 32.1 4.36 #> 5 CO 1985 1.08 3209000 113. 49466672 31 94.3 31 4.58 #> 6 CT 1985 1.08 3201000 109. 60063368 42 128. 51.5 4.58 #> 7 DE 1985 1.08 618000 144. 9927301 30 102. 30 4.61 #> 8 FL 1985 1.08 11352000 122. 166919248 37 115. 42.5 4.52 #> 9 GA 1985 1.08 5963000 127. 78364336 28 97.0 28.8 4.57 #> 10 IA 1985 1.08 2830000 114. 37902896 34 102. 37.9 4.59 #> # ℹ 86 more rows glance(ivr) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.131 0.112 0.229 5.98 0.0184 2 46 48"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) kappa object — tidy.kappa","title":"Tidy a(n) kappa object — tidy.kappa","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) kappa object — tidy.kappa","text":"","code":"# S3 method for class 'kappa' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) kappa object — tidy.kappa","text":"x kappa object returned psych::cohen.kappa(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) kappa object — tidy.kappa","text":"Note confidence level (alpha) confidence interval set tidy. Instead must set alpha argument psych::cohen.kappa() creating kappa object.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) kappa object — tidy.kappa","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. type Either `weighted` `unweighted`.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kappa.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) kappa object — tidy.kappa","text":"","code":"# load libraries for models and data library(psych) #> #> Attaching package: ‘psych’ #> The following object is masked from ‘package:boot’: #> #> logit #> The following object is masked from ‘package:lavaan’: #> #> cor2cov #> The following object is masked from ‘package:car’: #> #> logit #> The following object is masked from ‘package:drc’: #> #> logistic #> The following objects are masked from ‘package:ggplot2’: #> #> %+%, alpha #> The following object is masked from ‘package:mclust’: #> #> sim # generate example data rater1 <- 1:9 rater2 <- c(1, 3, 1, 6, 1, 5, 5, 6, 7) # fit model ck <- cohen.kappa(cbind(rater1, rater2)) # summarize model fit with tidiers + visualization tidy(ck) #> # A tibble: 2 × 4 #> type estimate conf.low conf.high #> #> 1 unweighted 0 -0.185 0.185 #> 2 weighted 0.678 0.430 0.926 # graph the confidence intervals library(ggplot2) ggplot(tidy(ck), aes(estimate, type)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) kde object — tidy.kde","title":"Tidy a(n) kde object — tidy.kde","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) kde object — tidy.kde","text":"","code":"# S3 method for class 'kde' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) kde object — tidy.kde","text":"x kde object returned ks::kde(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) kde object — tidy.kde","text":"Returns data frame long format four columns. Use tidyr::pivot_wider(..., names_from = variable, values_from = value) output return wide format.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) kde object — tidy.kde","text":"tibble::tibble() columns: estimate estimated value regression term. obs weighted observed number events group. value value/estimate component. Results data reshaping. variable Variable consideration.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kde.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) kde object — tidy.kde","text":"","code":"# load libraries for models and data library(ks) # generate data dat <- replicate(2, rnorm(100)) k <- kde(dat) # summarize model fit with tidiers + visualization td <- tidy(k) td #> # A tibble: 45,602 × 4 #> obs variable value estimate #> #> 1 1 x1 -5.41 0 #> 2 2 x1 -5.34 0 #> 3 3 x1 -5.28 0 #> 4 4 x1 -5.22 0 #> 5 5 x1 -5.15 0 #> 6 6 x1 -5.09 0 #> 7 7 x1 -5.03 0 #> 8 8 x1 -4.96 0 #> 9 9 x1 -4.90 0 #> 10 10 x1 -4.84 0 #> # ℹ 45,592 more rows library(ggplot2) library(dplyr) library(tidyr) td %>% pivot_wider(c(obs, estimate), names_from = variable, values_from = value ) %>% ggplot(aes(x1, x2, fill = estimate)) + geom_tile() + theme_void() #> Warning: Specifying the `id_cols` argument by position was deprecated in tidyr #> 1.3.0. #> ℹ Please explicitly name `id_cols`, like `id_cols = c(obs, estimate)`. # also works with 3 dimensions dat3 <- replicate(3, rnorm(100)) k3 <- kde(dat3) td3 <- tidy(k3) td3 #> # A tibble: 397,953 × 4 #> obs variable value estimate #> #> 1 1 x1 -4.77 0 #> 2 2 x1 -4.59 0 #> 3 3 x1 -4.41 0 #> 4 4 x1 -4.23 0 #> 5 5 x1 -4.05 0 #> 6 6 x1 -3.87 0 #> 7 7 x1 -3.69 0 #> 8 8 x1 -3.51 0 #> 9 9 x1 -3.33 0 #> 10 10 x1 -3.15 0 #> # ℹ 397,943 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) kmeans object — tidy.kmeans","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"","code":"# S3 method for class 'kmeans' tidy(x, col.names = colnames(x$centers), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"x kmeans object created stats::kmeans(). col.names Dimension names. Defaults names variables x. Set NULL get names x1, x2, .... ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"tibble::tibble() columns: cluster factor describing cluster 1:k. size Number points assigned cluster. withinss within-cluster sum squares.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.kmeans.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) kmeans object — tidy.kmeans","text":"","code":"library(cluster) library(modeldata) library(dplyr) data(hpc_data) x <- hpc_data[, 2:5] fit <- pam(x, k = 4) tidy(fit) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(fit) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(fit, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lavaan object — tidy.lavaan","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"","code":"# S3 method for class 'lavaan' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"x lavaan object, returned lavaan::cfa(), lavaan::sem(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed lavaan::parameterEstimates(). Cautionary note: Misspecified arguments may silently ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"tibble::tibble() one row estimated parameter columns: term result paste(lhs, op, rhs) op operator model syntax (e.g. ~~ covariances, ~ regression parameters) group group (specified) lavaan model estimate parameter estimate (may standardized) std.error statistic z value returned lavaan::parameterEstimates() p.value conf.low conf.high std.lv Standardized estimates based variances (continuous) latent variables std.Standardized estimates based variances (continuous) observed latent variables. std.nox Standardized estimates based variances (continuous) observed latent variables, variances exogenous covariates.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lavaan.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lavaan object — tidy.lavaan","text":"","code":"# load libraries for models and data library(lavaan) cfa.fit <- cfa(\"F =~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9\", data = HolzingerSwineford1939, group = \"school\" ) tidy(cfa.fit) #> # A tibble: 58 × 10 #> term op block group estimate std.error statistic p.value std.lv #> #> 1 F =~ x1 =~ 1 1 1 0 NA NA 0.567 #> 2 F =~ x2 =~ 1 1 0.333 0.190 1.76 7.89e-2 0.189 #> 3 F =~ x3 =~ 1 1 0.400 0.182 2.20 2.80e-2 0.227 #> 4 F =~ x4 =~ 1 1 1.66 0.280 5.92 3.28e-9 0.941 #> 5 F =~ x5 =~ 1 1 1.92 0.323 5.95 2.60e-9 1.09 #> 6 F =~ x6 =~ 1 1 1.48 0.247 5.98 2.23e-9 0.837 #> 7 F =~ x7 =~ 1 1 0.453 0.173 2.61 8.96e-3 0.257 #> 8 F =~ x8 =~ 1 1 0.376 0.155 2.43 1.51e-2 0.213 #> 9 F =~ x9 =~ 1 1 0.422 0.159 2.66 7.80e-3 0.240 #> 10 x1 ~~ x1 ~~ 1 1 1.07 0.127 8.47 0 1.07 #> # ℹ 48 more rows #> # ℹ 1 more variable: std.all "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lm.beta object — tidy.lm.beta","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"","code":"# S3 method for class 'lm.beta' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"x lm.beta object created lm.beta::lm.beta. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"linear model mlm object (multiple linear model), additional column response. missing values model data, may need refit model na.action = na.exclude.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.beta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lm.beta object — tidy.lm.beta","text":"","code":"# load libraries for models and data library(lm.beta) # fit models mod <- stats::lm(speed ~ ., data = cars) std <- lm.beta(mod) # summarize model fit with tidiers tidy(std, conf.int = TRUE) #> # A tibble: 2 × 8 #> term estimate std_estimate std.error statistic p.value conf.low #> #> 1 (Intercept) 8.28 NA 0.874 9.47 1.44e-12 NA #> 2 dist 0.166 0.807 0.0175 9.46 1.49e-12 0.772 #> # ℹ 1 more variable: conf.high # generate data ctl <- c(4.17, 5.58, 5.18, 6.11, 4.50, 4.61, 5.17, 4.53, 5.33, 5.14) trt <- c(4.81, 4.17, 4.41, 3.59, 5.87, 3.83, 6.03, 4.89, 4.32, 4.69) group <- gl(2, 10, 20, labels = c(\"Ctl\", \"Trt\")) weight <- c(ctl, trt) # fit models mod2 <- lm(weight ~ group) std2 <- lm.beta(mod2) # summarize model fit with tidiers tidy(std2, conf.int = TRUE) #> # A tibble: 2 × 8 #> term estimate std_estimate std.error statistic p.value conf.low #> #> 1 (Intercept) 5.03 NA 0.220 22.9 9.55e-15 NA #> 2 groupTrt -0.371 -0.270 0.311 -1.19 2.49e- 1 -0.925 #> # ℹ 1 more variable: conf.high "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lm object — tidy.lm","title":"Tidy a(n) lm object — tidy.lm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lm object — tidy.lm","text":"","code":"# S3 method for class 'lm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lm object — tidy.lm","text":"x lm object created stats::lm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lm object — tidy.lm","text":"linear model mlm object (multiple linear model), additional column response. See tidy.mlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lm object — tidy.lm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lm object — tidy.lm","text":"","code":"library(ggplot2) library(dplyr) mod <- lm(mpg ~ wt + qsec, data = mtcars) tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # coefficient plot d <- tidy(mod, conf.int = TRUE) ggplot(d, aes(estimate, term, xmin = conf.low, xmax = conf.high, height = 0)) + geom_point() + geom_vline(xintercept = 0, lty = 4) + geom_errorbarh() # aside: There are tidy() and glance() methods for lm.summary objects too. # this can be useful when you want to conserve memory by converting large lm # objects into their leaner summary.lm equivalents. s <- summary(mod) tidy(s, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(s) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32 augment(mod) #> # A tibble: 32 × 10 #> .rownames mpg wt qsec .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 0.0693 2.64 2.63e-3 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 0.0444 2.64 5.59e-6 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 0.0607 2.60 2.17e-2 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 0.0576 2.64 1.05e-4 #> 5 Hornet Sportab… 18.7 3.44 17.0 18.2 0.504 0.0389 2.64 5.29e-4 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 0.0957 2.58 5.10e-2 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 0.0729 2.61 1.93e-2 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 0.0791 2.61 2.18e-2 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 0.295 2.59 1.59e-1 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 0.0358 2.64 6.55e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid augment(mod, mtcars, interval = \"confidence\") #> # A tibble: 32 × 20 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 #> 2 Mazda RX4 … 21 6 160 110 3.9 2.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 #> 4 Hornet 4 D… 21.4 6 258 110 3.08 3.22 19.4 1 0 3 #> 5 Hornet Spo… 18.7 8 360 175 3.15 3.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 3.46 20.2 1 0 3 #> 7 Duster 360 14.3 8 360 245 3.21 3.57 15.8 0 0 3 #> 8 Merc 240D 24.4 4 147. 62 3.69 3.19 20 1 0 4 #> 9 Merc 230 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 #> 10 Merc 280 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 #> # ℹ 22 more rows #> # ℹ 9 more variables: carb , .fitted , .lower , #> # .upper , .resid , .hat , .sigma , .cooksd , #> # .std.resid # predict on new data newdata <- mtcars %>% head(6) %>% mutate(wt = wt + 1) augment(mod, newdata = newdata) #> # A tibble: 6 × 14 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 3 more variables: carb , .fitted , .resid # ggplot2 example where we also construct 95% prediction interval # simpler bivariate model since we're plotting in 2D mod2 <- lm(mpg ~ wt, data = mtcars) au <- augment(mod2, newdata = newdata, interval = \"prediction\") ggplot(au, aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) + geom_ribbon(aes(ymin = .lower, ymax = .upper), col = NA, alpha = 0.3) # predict on new data without outcome variable. Output does not include .resid newdata <- newdata %>% select(-mpg) augment(mod, newdata = newdata) #> # A tibble: 6 × 12 #> .rownames cyl disp hp drat wt qsec vs am gear carb #> #> 1 Mazda RX4 6 160 110 3.9 3.62 16.5 0 1 4 4 #> 2 Mazda RX4 W… 6 160 110 3.9 3.88 17.0 0 1 4 4 #> 3 Datsun 710 4 108 93 3.85 3.32 18.6 1 1 4 1 #> 4 Hornet 4 Dr… 6 258 110 3.08 4.22 19.4 1 0 3 1 #> 5 Hornet Spor… 8 360 175 3.15 4.44 17.0 0 0 3 2 #> 6 Valiant 6 225 105 2.76 4.46 20.2 1 0 3 1 #> # ℹ 1 more variable: .fitted au <- augment(mod, data = mtcars) ggplot(au, aes(.hat, .std.resid)) + geom_vline(size = 2, colour = \"white\", xintercept = 0) + geom_hline(size = 2, colour = \"white\", yintercept = 0) + geom_point() + geom_smooth(se = FALSE) #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' plot(mod, which = 6) ggplot(au, aes(.hat, .cooksd)) + geom_vline(xintercept = 0, colour = NA) + geom_abline(slope = seq(0, 3, by = 0.5), colour = \"white\") + geom_smooth(se = FALSE) + geom_point() #> `geom_smooth()` using method = 'loess' and formula = 'y ~ x' # column-wise models a <- matrix(rnorm(20), nrow = 10) b <- a + rnorm(length(a)) result <- lm(b ~ a) tidy(result) #> # A tibble: 6 × 6 #> response term estimate std.error statistic p.value #> #> 1 Y1 (Intercept) 0.120 0.460 0.260 0.802 #> 2 Y1 a1 1.40 0.400 3.51 0.00987 #> 3 Y1 a2 0.00979 0.337 0.0291 0.978 #> 4 Y2 (Intercept) -0.300 0.320 -0.940 0.379 #> 5 Y2 a1 0.160 0.278 0.578 0.582 #> 6 Y2 a2 0.913 0.234 3.90 0.00589"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lmRob object — tidy.lmRob","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"","code":"# S3 method for class 'lmRob' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"x lmRob object returned robust::lmRob(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmRob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lmRob object — tidy.lmRob","text":"","code":"# load modeling library library(robust) # fit model m <- lmRob(mpg ~ wt, data = mtcars) # summarize model fit with tidiers tidy(m) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 35.6 3.58 9.93 5.37e-11 #> 2 wt -4.91 1.09 -4.49 9.67e- 5 augment(m) #> # A tibble: 32 × 4 #> .rownames mpg wt .fitted #> #> 1 Mazda RX4 21 2.62 22.7 #> 2 Mazda RX4 Wag 21 2.88 21.4 #> 3 Datsun 710 22.8 2.32 24.2 #> 4 Hornet 4 Drive 21.4 3.22 19.8 #> 5 Hornet Sportabout 18.7 3.44 18.7 #> 6 Valiant 18.1 3.46 18.6 #> 7 Duster 360 14.3 3.57 18.0 #> 8 Merc 240D 24.4 3.19 19.9 #> 9 Merc 230 22.8 3.15 20.1 #> 10 Merc 280 19.2 3.44 18.7 #> # ℹ 22 more rows glance(m) #> # A tibble: 1 × 5 #> r.squared deviance sigma df.residual nobs #> #> 1 0.567 136. 2.95 30 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lmodel2 object — tidy.lmodel2","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"","code":"# S3 method for class 'lmodel2' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"x lmodel2 object returned lmodel2::lmodel2(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"always two terms lmodel2: \"Intercept\" \"Slope\". computed four methods: OLS (ordinary least squares), MA (major axis), SMA (standard major axis), RMA (ranged major axis). returned p-value one-tailed calculated via permutation test. permutational test used distributional assumptions may valid. information can found vignette(\"mod2user\", package = \"lmodel2\").","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. term name regression term. method Either OLS/MA/SMA/RMA","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lmodel2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lmodel2 object — tidy.lmodel2","text":"","code":"# load libraries for models and data library(lmodel2) data(mod2ex2) Ex2.res <- lmodel2(Prey ~ Predators, data = mod2ex2, \"relative\", \"relative\", 99) Ex2.res #> #> Model II regression #> #> Call: lmodel2(formula = Prey ~ Predators, data = mod2ex2, range.y #> = \"relative\", range.x = \"relative\", nperm = 99) #> #> n = 20 r = 0.8600787 r-square = 0.7397354 #> Parametric P-values: 2-tailed = 1.161748e-06 1-tailed = 5.808741e-07 #> Angle between the two OLS regression lines = 5.106227 degrees #> #> Permutation tests of OLS, MA, RMA slopes: 1-tailed, tail corresponding to sign #> A permutation test of r is equivalent to a permutation test of the OLS slope #> P-perm for SMA = NA because the SMA slope cannot be tested #> #> Regression results #> Method Intercept Slope Angle (degrees) P-perm (1-tailed) #> 1 OLS 20.02675 2.631527 69.19283 0.01 #> 2 MA 13.05968 3.465907 73.90584 0.01 #> 3 SMA 16.45205 3.059635 71.90073 NA #> 4 RMA 17.25651 2.963292 71.35239 0.01 #> #> Confidence intervals #> Method 2.5%-Intercept 97.5%-Intercept 2.5%-Slope 97.5%-Slope #> 1 OLS 12.490993 27.56251 1.858578 3.404476 #> 2 MA 1.347422 19.76310 2.663101 4.868572 #> 3 SMA 9.195287 22.10353 2.382810 3.928708 #> 4 RMA 8.962997 23.84493 2.174260 3.956527 #> #> Eigenvalues: 269.8212 6.418234 #> #> H statistic used for computing C.I. of MA: 0.006120651 #> # summarize model fit with tidiers + visualization tidy(Ex2.res) #> # A tibble: 8 × 6 #> method term estimate conf.low conf.high p.value #> #> 1 MA Intercept 13.1 1.35 19.8 0.01 #> 2 MA Slope 3.47 2.66 4.87 0.01 #> 3 OLS Intercept 20.0 12.5 27.6 0.01 #> 4 OLS Slope 2.63 1.86 3.40 0.01 #> 5 RMA Intercept 17.3 8.96 23.8 0.01 #> 6 RMA Slope 2.96 2.17 3.96 0.01 #> 7 SMA Intercept 16.5 9.20 22.1 NA #> 8 SMA Slope 3.06 2.38 3.93 NA glance(Ex2.res) #> # A tibble: 1 × 5 #> r.squared theta p.value H nobs #> #> 1 0.740 5.11 0.00000116 0.00612 20 # this allows coefficient plots with ggplot2 library(ggplot2) ggplot(tidy(Ex2.res), aes(estimate, term, color = method)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high)) + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high))"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lsmobj object — tidy.lsmobj","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"","code":"# S3 method for class 'lsmobj' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"x lsmobj object. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid(). Cautionary note: misspecified arguments may silently ignored!","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"Returns data frame one observation estimated marginal mean, one column combination factors. input contrast, row contain one estimated contrast. large number arguments can passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. contrast Levels compared. df Degrees freedom used term model. null.value Value estimate compared. p.value two-sided p-value associated observed statistic. std.error standard error regression term. estimate Expected marginal mean statistic T-ratio statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.lsmobj.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lsmobj object — tidy.lsmobj","text":"","code":"# load libraries for models and data library(emmeans) # linear model for sales of oranges per day oranges_lm1 <- lm(sales1 ~ price1 + price2 + day + store, data = oranges) # reference grid; see vignette(\"basics\", package = \"emmeans\") oranges_rg1 <- ref_grid(oranges_lm1) td <- tidy(oranges_rg1) td #> # A tibble: 36 × 9 #> price1 price2 day store estimate std.error df statistic p.value #> #> 1 51.2 48.6 1 1 2.92 2.72 23 1.07 0.294 #> 2 51.2 48.6 2 1 3.85 2.70 23 1.42 0.168 #> 3 51.2 48.6 3 1 11.0 2.53 23 4.35 0.000237 #> 4 51.2 48.6 4 1 6.10 2.65 23 2.30 0.0309 #> 5 51.2 48.6 5 1 12.8 2.44 23 5.23 0.0000261 #> 6 51.2 48.6 6 1 8.75 2.79 23 3.14 0.00459 #> 7 51.2 48.6 1 2 4.96 2.38 23 2.09 0.0482 #> 8 51.2 48.6 2 2 5.89 2.34 23 2.52 0.0190 #> 9 51.2 48.6 3 2 13.1 2.42 23 5.41 0.0000172 #> 10 51.2 48.6 4 2 8.14 2.35 23 3.46 0.00212 #> # ℹ 26 more rows # marginal averages marginal <- emmeans(oranges_rg1, \"day\") tidy(marginal) #> # A tibble: 6 × 6 #> day estimate std.error df statistic p.value #> #> 1 1 5.56 1.77 23 3.15 0.00451 #> 2 2 6.49 1.73 23 3.76 0.00103 #> 3 3 13.7 1.75 23 7.80 0.0000000658 #> 4 4 8.74 1.73 23 5.04 0.0000420 #> 5 5 15.4 1.79 23 8.65 0.0000000110 #> 6 6 11.4 1.77 23 6.45 0.00000140 # contrasts tidy(contrast(marginal)) #> # A tibble: 6 × 8 #> term contrast null.value estimate std.error df statistic adj.p.value #> #> 1 day day1 ef… 0 -4.65 1.62 23 -2.87 0.0261 #> 2 day day2 ef… 0 -3.72 1.58 23 -2.36 0.0547 #> 3 day day3 ef… 0 3.45 1.60 23 2.15 0.0637 #> 4 day day4 ef… 0 -1.47 1.59 23 -0.930 0.434 #> 5 day day5 ef… 0 5.22 1.64 23 3.18 0.0249 #> 6 day day6 ef… 0 1.18 1.62 23 0.726 0.475 tidy(contrast(marginal, method = \"pairwise\")) #> # A tibble: 15 × 8 #> term contrast null.value estimate std.error df statistic #> #> 1 day day1 - day2 0 -0.930 2.47 23 -0.377 #> 2 day day1 - day3 0 -8.10 2.47 23 -3.29 #> 3 day day1 - day4 0 -3.18 2.51 23 -1.27 #> 4 day day1 - day5 0 -9.88 2.56 23 -3.86 #> 5 day day1 - day6 0 -5.83 2.52 23 -2.31 #> 6 day day2 - day3 0 -7.17 2.48 23 -2.89 #> 7 day day2 - day4 0 -2.25 2.44 23 -0.920 #> 8 day day2 - day5 0 -8.95 2.52 23 -3.56 #> 9 day day2 - day6 0 -4.90 2.45 23 -2.00 #> 10 day day3 - day4 0 4.92 2.49 23 1.98 #> 11 day day3 - day5 0 -1.78 2.47 23 -0.719 #> 12 day day3 - day6 0 2.27 2.54 23 0.894 #> 13 day day4 - day5 0 -6.70 2.49 23 -2.69 #> 14 day day4 - day6 0 -2.65 2.45 23 -1.08 #> 15 day day5 - day6 0 4.05 2.56 23 1.58 #> # ℹ 1 more variable: adj.p.value # plot confidence intervals library(ggplot2) ggplot(tidy(marginal, conf.int = TRUE), aes(day, estimate)) + geom_point() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # by multiple prices by_price <- emmeans(oranges_lm1, \"day\", by = \"price2\", at = list( price1 = 50, price2 = c(40, 60, 80), day = c(\"2\", \"3\", \"4\") ) ) by_price #> price2 = 40: #> day emmean SE df lower.CL upper.CL #> 2 6.24 1.89 23 2.33 10.1 #> 3 13.41 2.12 23 9.02 17.8 #> 4 8.48 1.87 23 4.62 12.3 #> #> price2 = 60: #> day emmean SE df lower.CL upper.CL #> 2 9.21 2.11 23 4.85 13.6 #> 3 16.38 1.91 23 12.44 20.3 #> 4 11.46 2.18 23 6.96 16.0 #> #> price2 = 80: #> day emmean SE df lower.CL upper.CL #> 2 12.19 3.65 23 4.65 19.7 #> 3 19.36 3.27 23 12.59 26.1 #> 4 14.44 3.74 23 6.71 22.2 #> #> Results are averaged over the levels of: store #> Confidence level used: 0.95 tidy(by_price) #> # A tibble: 9 × 7 #> day price2 estimate std.error df statistic p.value #> #> 1 2 40 6.24 1.89 23 3.30 0.00310 #> 2 3 40 13.4 2.12 23 6.33 0.00000187 #> 3 4 40 8.48 1.87 23 4.55 0.000145 #> 4 2 60 9.21 2.11 23 4.37 0.000225 #> 5 3 60 16.4 1.91 23 8.60 0.0000000122 #> 6 4 60 11.5 2.18 23 5.26 0.0000244 #> 7 2 80 12.2 3.65 23 3.34 0.00282 #> 8 3 80 19.4 3.27 23 5.91 0.00000502 #> 9 4 80 14.4 3.74 23 3.86 0.000788 ggplot(tidy(by_price, conf.int = TRUE), aes(price2, estimate, color = day)) + geom_line() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # joint_tests tidy(joint_tests(oranges_lm1)) #> # A tibble: 4 × 5 #> term num.df den.df statistic p.value #> #> 1 price1 1 23 30.3 0.0000134 #> 2 price2 1 23 2.23 0.149 #> 3 day 5 23 4.88 0.00346 #> 4 store 5 23 2.52 0.0583"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) manova object — tidy.manova","title":"Tidy a(n) manova object — tidy.manova","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) manova object — tidy.manova","text":"","code":"# S3 method for class 'manova' tidy(x, test = \"Pillai\", ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) manova object — tidy.manova","text":"x manova object return stats::manova(). test One \"Pillai\" (Pillai's trace), \"Wilks\" (Wilk's lambda), \"Hotelling-Lawley\" (Hotelling-Lawley trace) \"Roy\" (Roy's greatest root) indicating test statistic used. Defaults \"Pillai\". ... Arguments passed stats::summary.manova object object class \"manova\" aov object multiple responses. intercept logical. TRUE, intercept term included table. tol tolerance used deciding residuals rank-deficient: see qr.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) manova object — tidy.manova","text":"Depending test statistic specified one pillai, wilks, hl roy included.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) manova object — tidy.manova","text":"tibble::tibble() columns: den.df Degrees freedom denominator. num.df Degrees freedom. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. term name regression term. pillai Pillai's trace. wilks Wilk's lambda. hl Hotelling-Lawley trace. roy Roy's greatest root.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.manova.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) manova object — tidy.manova","text":"","code":"npk2 <- within(npk, foo <- rnorm(24)) m <- manova(cbind(yield, foo) ~ block + N * P * K, npk2) tidy(m) #> # A tibble: 8 × 7 #> term df pillai statistic num.df den.df p.value #> #> 1 block 5 0.889 1.92 10 24 0.0925 #> 2 N 1 0.521 5.97 2 11 0.0175 #> 3 P 1 0.0505 0.293 2 11 0.752 #> 4 K 1 0.357 3.05 2 11 0.0882 #> 5 N:P 1 0.103 0.633 2 11 0.549 #> 6 N:K 1 0.294 2.29 2 11 0.147 #> 7 P:K 1 0.00855 0.0474 2 11 0.954 #> 8 Residuals 12 NA NA NA NA NA"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) map object — tidy.map","title":"Tidy a(n) map object — tidy.map","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) map object — tidy.map","text":"","code":"# S3 method for class 'map' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) map object — tidy.map","text":"x map object returned maps::map(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) map object — tidy.map","text":"tibble::tibble() columns: term name regression term. long Longitude. lat Latitude. Remaining columns give information geographic attributes depend inputted map object. See ?maps::map information.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.map.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) map object — tidy.map","text":"","code":"# load libraries for models and data library(maps) #> #> Attaching package: ‘maps’ #> The following object is masked from ‘package:cluster’: #> #> votes.repub #> The following object is masked from ‘package:purrr’: #> #> map #> The following object is masked from ‘package:mclust’: #> #> map library(ggplot2) ca <- map(\"county\", \"ca\", plot = FALSE, fill = TRUE) tidy(ca) #> # A tibble: 2,977 × 7 #> term long lat group order region subregion #> #> 1 1 -121. 37.5 1 1 california alameda #> 2 2 -122. 37.5 1 2 california alameda #> 3 3 -122. 37.5 1 3 california alameda #> 4 4 -122. 37.5 1 4 california alameda #> 5 5 -122. 37.5 1 5 california alameda #> 6 6 -122. 37.5 1 6 california alameda #> 7 7 -122. 37.5 1 7 california alameda #> 8 8 -122. 37.5 1 8 california alameda #> 9 9 -122. 37.5 1 9 california alameda #> 10 10 -122. 37.5 1 10 california alameda #> # ℹ 2,967 more rows qplot(long, lat, data = ca, geom = \"polygon\", group = group) #> Warning: `qplot()` was deprecated in ggplot2 3.4.0. tx <- map(\"county\", \"texas\", plot = FALSE, fill = TRUE) tidy(tx) #> # A tibble: 4,488 × 7 #> term long lat group order region subregion #> #> 1 1 -95.8 31.5 1 1 texas anderson #> 2 2 -95.8 31.6 1 2 texas anderson #> 3 3 -95.8 31.6 1 3 texas anderson #> 4 4 -95.7 31.6 1 4 texas anderson #> 5 5 -95.7 31.6 1 5 texas anderson #> 6 6 -95.7 31.6 1 6 texas anderson #> 7 7 -95.8 31.7 1 7 texas anderson #> 8 8 -95.8 31.7 1 8 texas anderson #> 9 9 -95.8 31.6 1 9 texas anderson #> 10 10 -95.8 31.6 1 10 texas anderson #> # ℹ 4,478 more rows qplot(long, lat, data = tx, geom = \"polygon\", group = group, colour = I(\"white\") )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) margins object — tidy.margins","title":"Tidy a(n) margins object — tidy.margins","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) margins object — tidy.margins","text":"","code":"# S3 method for class 'margins' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) margins object — tidy.margins","text":"x margins object returned margins::margins(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) margins object — tidy.margins","text":"margins package provides way obtain coefficient marginal effects variety (non-linear) models, logit models multiway interaction terms. Note glance.margins() method requires rerunning underlying model , can take time. Similarly, augment.margins() method currently supported, users can simply run underlying model obtain information.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) margins object — tidy.margins","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.margins.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) margins object — tidy.margins","text":"","code":"# load libraries for models and data library(margins) # example 1: logit model mod_log <- glm(am ~ cyl + hp + wt, data = mtcars, family = binomial) # get tidied \"naive\" model coefficients tidy(mod_log) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 #> 2 cyl 0.488 1.07 0.455 0.649 #> 3 hp 0.0326 0.0189 1.73 0.0840 #> 4 wt -9.15 4.15 -2.20 0.0276 # convert to marginal effects with margins() marg_log <- margins(mod_log) # get tidied marginal effects tidy(marg_log) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 cyl 0.0215 0.0470 0.457 0.648 #> 2 hp 0.00143 0.000618 2.32 0.0204 #> 3 wt -0.403 0.115 -3.49 0.000487 tidy(marg_log, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl 0.0215 0.0470 0.457 0.648 -0.0706 0.114 #> 2 hp 0.00143 0.000618 2.32 0.0204 0.000222 0.00265 #> 3 wt -0.403 0.115 -3.49 0.000487 -0.629 -0.176 # requires running the underlying model again. quick for this example glance(marg_log) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # augmenting `margins` outputs isn't supported, but # you can get the same info by running on the underlying model augment(mod_log) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid # example 2: threeway interaction terms mod_ie <- lm(mpg ~ wt * cyl * disp, data = mtcars) # get tidied \"naive\" model coefficients tidy(mod_ie) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 108. 23.3 4.62 0.000109 #> 2 wt -24.8 8.47 -2.92 0.00744 #> 3 cyl -10.8 4.34 -2.49 0.0201 #> 4 disp -0.593 0.213 -2.79 0.0102 #> 5 wt:cyl 2.91 1.42 2.05 0.0514 #> 6 wt:disp 0.184 0.0685 2.69 0.0127 #> 7 cyl:disp 0.0752 0.0268 2.81 0.00979 #> 8 wt:cyl:disp -0.0233 0.00861 -2.71 0.0123 # convert to marginal effects with margins() marg_ie0 <- margins(mod_ie) # get tidied marginal effects tidy(marg_ie0) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 cyl -3.85 1.46 -2.65 0.00812 #> 2 disp -0.0295 0.0174 -1.70 0.0900 #> 3 wt -2.01 1.17 -1.72 0.0860 glance(marg_ie0) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.896 0.865 2.21 29.4 2.75e-10 7 -66.2 150. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # marginal effects evaluated at specific values of a variable (here: cyl) marg_ie1 <- margins(mod_ie, at = list(cyl = c(4,6,8))) # summarize model fit with tidiers tidy(marg_ie1) #> # A tibble: 9 × 7 #> term at.variable at.value estimate std.error statistic p.value #> #> 1 cyl cyl 4 -3.85 1.46 -2.65 0.00808 #> 2 cyl cyl 6 -3.85 1.46 -2.65 0.00814 #> 3 cyl cyl 8 -3.85 1.46 -2.65 0.00812 #> 4 disp cyl 4 0.000978 0.0314 0.0312 0.975 #> 5 disp cyl 6 0.00134 0.0182 0.0737 0.941 #> 6 disp cyl 8 0.00170 0.0120 0.141 0.888 #> 7 wt cyl 4 7.91 5.06 1.56 0.118 #> 8 wt cyl 6 2.96 2.52 1.18 0.239 #> 9 wt cyl 8 -1.98 2.40 -0.825 0.409 # marginal effects of one interaction variable (here: wt), modulated at # specific values of the two other interaction variables (here: cyl and drat) marg_ie2 <- margins(mod_ie, variables = \"wt\", at = list(cyl = c(4,6,8), drat = c(3, 3.5, 4))) # summarize model fit with tidiers tidy(marg_ie2) #> # A tibble: 18 × 7 #> term at.variable at.value estimate std.error statistic p.value #> #> 1 wt cyl 4 7.91 5.06 1.56 0.118 #> 2 wt drat 3 7.91 5.06 1.56 0.118 #> 3 wt cyl 4 7.91 5.06 1.56 0.118 #> 4 wt drat 3.5 7.91 5.06 1.56 0.118 #> 5 wt cyl 4 7.91 5.06 1.56 0.118 #> 6 wt drat 4 7.91 5.06 1.56 0.118 #> 7 wt cyl 6 2.96 2.52 1.18 0.239 #> 8 wt drat 3 2.96 2.52 1.18 0.239 #> 9 wt cyl 6 2.96 2.52 1.18 0.239 #> 10 wt drat 3.5 2.96 2.52 1.18 0.239 #> 11 wt cyl 6 2.96 2.52 1.18 0.239 #> 12 wt drat 4 2.96 2.52 1.18 0.239 #> 13 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 14 wt drat 3 -1.98 2.40 -0.825 0.409 #> 15 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 16 wt drat 3.5 -1.98 2.40 -0.825 0.409 #> 17 wt cyl 8 -1.98 2.40 -0.825 0.409 #> 18 wt drat 4 -1.98 2.40 -0.825 0.409"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mediate object — tidy.mediate","title":"Tidy a(n) mediate object — tidy.mediate","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mediate object — tidy.mediate","text":"","code":"# S3 method for class 'mediate' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mediate object — tidy.mediate","text":"x mediate object produced call mediation::mediate(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) mediate object — tidy.mediate","text":"tibble four rows. first two indicate mediated effect control treatment groups, respectively. last two direct effect group.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mediate object — tidy.mediate","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mediate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mediate object — tidy.mediate","text":"","code":"# load libraries for models and data library(mediation) #> mediation: Causal Mediation Analysis #> Version: 4.5.0 #> #> Attaching package: ‘mediation’ #> The following object is masked from ‘package:psych’: #> #> mediate data(jobs) # fit models b <- lm(job_seek ~ treat + econ_hard + sex + age, data = jobs) c <- lm(depress2 ~ treat + job_seek + econ_hard + sex + age, data = jobs) mod <- mediate(b, c, sims = 50, treat = \"treat\", mediator = \"job_seek\") # summarize model fit with tidiers tidy(mod) #> # A tibble: 4 × 4 #> term estimate std.error p.value #> #> 1 acme_0 -0.0143 0.0129 0.24 #> 2 acme_1 -0.0143 0.0129 0.24 #> 3 ade_0 -0.0315 0.0377 0.24 #> 4 ade_1 -0.0315 0.0377 0.24 tidy(mod, conf.int = TRUE) #> # A tibble: 4 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 acme_0 -0.0143 0.0129 0.24 -0.0349 0.0103 #> 2 acme_1 -0.0143 0.0129 0.24 -0.0349 0.0103 #> 3 ade_0 -0.0315 0.0377 0.24 -0.105 0.0584 #> 4 ade_1 -0.0315 0.0377 0.24 -0.105 0.0584 tidy(mod, conf.int = TRUE, conf.level = .99) #> # A tibble: 4 × 6 #> term estimate std.error p.value conf.low conf.high #> #> 1 acme_0 -0.0143 0.0129 0.24 -0.0378 0.0243 #> 2 acme_1 -0.0143 0.0129 0.24 -0.0378 0.0243 #> 3 ade_0 -0.0315 0.0377 0.24 -0.106 0.0686 #> 4 ade_1 -0.0315 0.0377 0.24 -0.106 0.0686"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mfx object — tidy.mfx","title":"Tidy a(n) mfx object — tidy.mfx","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. particular functions provide generic tidy methods objects returned mfx package, preserving calculated marginal effects instead naive model coefficients. returned tidy tibble also include additional \"atmean\" column indicating marginal effects originally calculated (see Details ).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mfx object — tidy.mfx","text":"","code":"# S3 method for class 'mfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) # S3 method for class 'logitmfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) # S3 method for class 'negbinmfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) # S3 method for class 'poissonmfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...) # S3 method for class 'probitmfx' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mfx object — tidy.mfx","text":"x logitmfx, negbinmfx, poissonmfx, probitmfx object. (Note betamfx objects receive set tidiers.) conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) mfx object — tidy.mfx","text":"mfx package provides methods calculating marginal effects various generalized linear models (GLMs). Unlike standard linear models, estimated model coefficients GLM directly interpreted marginal effects (.e., change response variable predicted one unit change one regressors). estimated coefficients multiplicative, dependent link function used estimation variables included model. calculating marginal effects, users must typically choose whether want use ) average observation data, ii) average sample marginal effects. See vignette(\"mfxarticle\") mfx package details.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mfx object — tidy.mfx","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. atmean TRUE marginal effects originally calculated partial effects average observation. FALSE, instead calculated average partial effects.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mfx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mfx object — tidy.mfx","text":"","code":"# load libraries for models and data library(mfx) # get the marginal effects from a logit regression mod_logmfx <- logitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) tidy(mod_logmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0538 0.113 0.475 0.635 -0.178 0.286 #> 2 hp TRUE 0.00359 0.00290 1.24 0.216 -0.00236 0.00954 #> 3 wt TRUE -1.01 0.668 -1.51 0.131 -2.38 0.359 # compare with the naive model coefficients of the same logit call tidy( glm(am ~ cyl + hp + wt, family = binomial, data = mtcars), conf.int = TRUE ) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 8.12 2.43 0.0152 8.56 44.3 #> 2 cyl 0.488 1.07 0.455 0.649 -1.53 3.12 #> 3 hp 0.0326 0.0189 1.73 0.0840 0.00332 0.0884 #> 4 wt -9.15 4.15 -2.20 0.0276 -21.4 -3.48 augment(mod_logmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 2.24 0.449 0.278 0.595 1.42e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.0912 1.22 0.352 0.529 2.30e-1 #> 3 Datsun 7… 1 4 93 2.32 3.46 0.249 0.0960 0.602 9.26e-4 #> 4 Hornet 4… 0 6 110 3.22 -3.20 -0.282 0.0945 0.601 1.17e-3 #> 5 Hornet S… 0 8 175 3.44 -2.17 -0.466 0.220 0.595 1.03e-2 #> 6 Valiant 0 6 105 3.46 -5.61 -0.0856 0.0221 0.604 2.12e-5 #> 7 Duster 3… 0 8 245 3.57 -1.07 -0.766 0.337 0.576 6.55e-2 #> 8 Merc 240D 0 4 62 3.19 -5.51 -0.0897 0.0376 0.603 4.10e-5 #> 9 Merc 230 0 4 95 3.15 -4.07 -0.184 0.122 0.603 6.76e-4 #> 10 Merc 280 0 6 123 3.44 -4.84 -0.126 0.0375 0.603 8.02e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_logmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.92 17.8 23.7 9.84 28 32 # another example, this time using probit regression mod_probmfx <- probitmfx(am ~ cyl + hp + wt, atmean = TRUE, data = mtcars) #> Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred tidy(mod_probmfx, conf.int = TRUE) #> # A tibble: 3 × 8 #> term atmean estimate std.error statistic p.value conf.low conf.high #> #> 1 cyl TRUE 0.0616 0.112 0.548 0.583 -0.169 0.292 #> 2 hp TRUE 0.00383 0.00282 1.36 0.174 -0.00194 0.00960 #> 3 wt TRUE -1.06 0.594 -1.78 0.0753 -2.27 0.160 augment(mod_probmfx) #> # A tibble: 32 × 11 #> .rownames am cyl hp wt .fitted .resid .hat .sigma .cooksd #> #> 1 Mazda RX4 1 6 110 2.62 1.21 0.490 0.308 0.585 2.05e-2 #> 2 Mazda RX… 1 6 110 2.88 -0.129 1.27 0.249 0.526 1.36e-1 #> 3 Datsun 7… 1 4 93 2.32 1.85 0.256 0.134 0.594 1.48e-3 #> 4 Hornet 4… 0 6 110 3.22 -1.92 -0.237 0.116 0.594 1.05e-3 #> 5 Hornet S… 0 8 175 3.44 -1.25 -0.474 0.236 0.587 1.20e-2 #> 6 Valiant 0 6 105 3.46 -3.30 -0.0312 0.0111 0.596 1.39e-6 #> 7 Duster 3… 0 8 245 3.57 -0.595 -0.804 0.285 0.567 5.32e-2 #> 8 Merc 240D 0 4 62 3.19 -3.31 -0.0304 0.0179 0.596 2.15e-6 #> 9 Merc 230 0 4 95 3.15 -2.47 -0.116 0.130 0.596 2.89e-4 #> 10 Merc 280 0 6 123 3.44 -2.85 -0.0662 0.0315 0.596 1.84e-5 #> # ℹ 22 more rows #> # ℹ 1 more variable: .std.resid glance(mod_probmfx) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 43.2 31 -4.80 17.6 23.5 9.59 28 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mjoint object — tidy.mjoint","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"","code":"# S3 method for class 'mjoint' tidy( x, component = \"survival\", conf.int = FALSE, conf.level = 0.95, boot_se = NULL, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"x mjoint object returned joineRML::mjoint(). component Character specifying whether tidy survival longitudinal component model. Must either \"survival\" \"longitudinal\". Defaults \"survival\". conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. boot_se Optionally bootSE object joineRML::bootSE(). specified, calculates confidence intervals via bootstrap. Defaults NULL, case standard errors calculated empirical information matrix. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mjoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mjoint object — tidy.mjoint","text":"","code":"# broom only skips running these examples because the example models take a # while to generate—they should run just fine, though! if (FALSE) { # \\dontrun{ # load libraries for models and data library(joineRML) # fit a joint model with bivariate longitudinal outcomes data(heart.valve) hvd <- heart.valve[!is.na(heart.valve$log.grad) & !is.na(heart.valve$log.lvmi) & heart.valve$num <= 50, ] fit <- mjoint( formLongFixed = list( \"grad\" = log.grad ~ time + sex + hs, \"lvmi\" = log.lvmi ~ time + sex ), formLongRandom = list( \"grad\" = ~ 1 | num, \"lvmi\" = ~ time | num ), formSurv = Surv(fuyrs, status) ~ age, data = hvd, inits = list(\"gamma\" = c(0.11, 1.51, 0.80)), timeVar = \"time\" ) # extract the survival fixed effects tidy(fit) # extract the longitudinal fixed effects tidy(fit, component = \"longitudinal\") # extract the survival fixed effects with confidence intervals tidy(fit, ci = TRUE) # extract the survival fixed effects with confidence intervals based # on bootstrapped standard errors bSE <- bootSE(fit, nboot = 5, safe.boot = TRUE) tidy(fit, boot_se = bSE, ci = TRUE) # augment original data with fitted longitudinal values and residuals hvd2 <- augment(fit) # extract model statistics glance(fit) } # }"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mle2 object — tidy.mle2","title":"Tidy a(n) mle2 object — tidy.mle2","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mle2 object — tidy.mle2","text":"","code":"# S3 method for class 'mle2' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mle2 object — tidy.mle2","text":"x mle2 object created call bbmle::mle2(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mle2 object — tidy.mle2","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mle2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mle2 object — tidy.mle2","text":"","code":"# load libraries for models and data library(bbmle) #> Loading required package: stats4 #> #> Attaching package: ‘bbmle’ #> The following object is masked from ‘package:dfidx’: #> #> slice #> The following object is masked from ‘package:ordinal’: #> #> slice #> The following object is masked from ‘package:dplyr’: #> #> slice # generate data x <- 0:10 y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) d <- data.frame(x, y) # fit model fit <- mle2(y ~ dpois(lambda = ymean), start = list(ymean = mean(y)), data = d ) # summarize model fit with tidiers tidy(fit) #> # A tibble: 1 × 5 #> term estimate std.error statistic p.value #> #> 1 ymean 11.5 1.02 11.3 1.86e-29"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) mlm object — tidy.mlm","title":"Tidy a(n) mlm object — tidy.mlm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) mlm object — tidy.mlm","text":"","code":"# S3 method for class 'mlm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) mlm object — tidy.mlm","text":"x mlm object created stats::lm() matrix response. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) mlm object — tidy.mlm","text":"contrast lm object (simple linear model), tidy output mlm (multiple linear model) objects contain additional column response. missing values model data, may need refit model na.action = na.exclude.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) mlm object — tidy.mlm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) mlm object — tidy.mlm","text":"","code":"# fit model mod <- lm(cbind(mpg, disp) ~ wt, mtcars) # summarize model fit with tidiers tidy(mod, conf.int = TRUE) #> # A tibble: 4 × 8 #> response term estimate std.error statistic p.value conf.low conf.high #> #> 1 mpg (Inte… 37.3 1.88 19.9 8.24e-19 33.5 41.1 #> 2 mpg wt -5.34 0.559 -9.56 1.29e-10 -6.49 -4.20 #> 3 disp (Inte… -131. 35.7 -3.67 9.33e- 4 -204. -58.2 #> 4 disp wt 112. 10.6 10.6 1.22e-11 90.8 134."},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidying methods for logit models — tidy.mlogit","title":"Tidying methods for logit models — tidy.mlogit","text":"methods tidy coefficients mnl nl models generated functions mlogit package.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidying methods for logit models — tidy.mlogit","text":"","code":"# S3 method for class 'mlogit' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidying methods for logit models — tidy.mlogit","text":"x object returned mlogit::mlogit(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidying methods for logit models — tidy.mlogit","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.mlogit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidying methods for logit models — tidy.mlogit","text":"","code":"# load libraries for models and data library(mlogit) data(\"Fishing\", package = \"mlogit\") Fish <- dfidx(Fishing, varying = 2:9, shape = \"wide\", choice = \"mode\") # fit model m <- mlogit(mode ~ price + catch | income, data = Fish) # summarize model fit with tidiers tidy(m) #> # A tibble: 8 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept):boat 0.527 0.223 2.37 1.79e- 2 #> 2 (Intercept):charter 1.69 0.224 7.56 3.95e-14 #> 3 (Intercept):pier 0.778 0.220 3.53 4.18e- 4 #> 4 price -0.0251 0.00173 -14.5 0 #> 5 catch 0.358 0.110 3.26 1.12e- 3 #> 6 income:boat 0.0000894 0.0000501 1.79 7.40e- 2 #> 7 income:charter -0.0000333 0.0000503 -0.661 5.08e- 1 #> 8 income:pier -0.000128 0.0000506 -2.52 1.18e- 2 augment(m) #> # A tibble: 4,728 × 9 #> id alternative chosen price catch income .probability .fitted #> #> 1 1 beach FALSE 158. 0.0678 7083. 0.125 -3.94 #> 2 1 boat FALSE 158. 0.260 7083. 0.427 -2.71 #> 3 1 charter TRUE 183. 0.539 7083. 0.339 -2.94 #> 4 1 pier FALSE 158. 0.0503 7083. 0.109 -4.07 #> 5 2 beach FALSE 15.1 0.105 1250. 0.116 -0.342 #> 6 2 boat FALSE 10.5 0.157 1250. 0.251 0.431 #> 7 2 charter TRUE 34.5 0.467 1250. 0.423 0.952 #> 8 2 pier FALSE 15.1 0.0451 1250. 0.210 0.255 #> 9 3 beach FALSE 162. 0.533 3750. 0.00689 -3.87 #> 10 3 boat TRUE 24.3 0.241 3750. 0.465 0.338 #> # ℹ 4,718 more rows #> # ℹ 1 more variable: .resid glance(m) #> # A tibble: 1 × 6 #> logLik rho2 rho20 AIC BIC nobs #> #> 1 -1215. 0.189 0.258 2446. NA 1182"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) muhaz object — tidy.muhaz","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"","code":"# S3 method for class 'muhaz' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"x muhaz object returned muhaz::muhaz(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"tibble::tibble() columns: time Point time. estimate Estimated hazard rate.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.muhaz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) muhaz object — tidy.muhaz","text":"","code":"# load libraries for models and data library(muhaz) library(survival) # fit model x <- muhaz(ovarian$futime, ovarian$fustat) # summarize model fit with tidiers tidy(x) #> # A tibble: 101 × 2 #> time estimate #> #> 1 0 0.000255 #> 2 7.44 0.000274 #> 3 14.9 0.000293 #> 4 22.3 0.000312 #> 5 29.8 0.000332 #> 6 37.2 0.000352 #> 7 44.6 0.000372 #> 8 52.1 0.000392 #> 9 59.5 0.000411 #> 10 67.0 0.000431 #> # ℹ 91 more rows glance(x) #> # A tibble: 1 × 5 #> nobs min.time max.time min.hazard max.hazard #> #> 1 26 0 744 0.000212 0.00111"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidying methods for multinomial logistic regression models — tidy.multinom","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"methods tidy coefficients multinomial logistic regression models generated multinom nnet package.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"","code":"# S3 method for class 'multinom' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"x multinom object returned nnet::multinom(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. y.value response level.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.multinom.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidying methods for multinomial logistic regression models — tidy.multinom","text":"","code":"# load libraries for models and data library(nnet) library(MASS) example(birthwt) #> #> brthwt> bwt <- with(birthwt, { #> brthwt+ race <- factor(race, labels = c(\"white\", \"black\", \"other\")) #> brthwt+ ptd <- factor(ptl > 0) #> brthwt+ ftv <- factor(ftv) #> brthwt+ levels(ftv)[-(1:2)] <- \"2+\" #> brthwt+ data.frame(low = factor(low), age, lwt, race, smoke = (smoke > 0), #> brthwt+ ptd, ht = (ht > 0), ui = (ui > 0), ftv) #> brthwt+ }) #> #> brthwt> options(contrasts = c(\"contr.treatment\", \"contr.poly\")) #> #> brthwt> glm(low ~ ., binomial, bwt) #> #> Call: glm(formula = low ~ ., family = binomial, data = bwt) #> #> Coefficients: #> (Intercept) age lwt raceblack raceother #> 0.82302 -0.03723 -0.01565 1.19241 0.74068 #> smokeTRUE ptdTRUE htTRUE uiTRUE ftv1 #> 0.75553 1.34376 1.91317 0.68020 -0.43638 #> ftv2+ #> 0.17901 #> #> Degrees of Freedom: 188 Total (i.e. Null); 178 Residual #> Null Deviance:\t 234.7 #> Residual Deviance: 195.5 \tAIC: 217.5 bwt.mu <- multinom(low ~ ., bwt) #> # weights: 12 (11 variable) #> initial value 131.004817 #> iter 10 value 98.029803 #> final value 97.737759 #> converged tidy(bwt.mu) #> # A tibble: 11 × 6 #> y.level term estimate std.error statistic p.value #> #> 1 1 (Intercept) 0.823 1.24 0.661 0.508 #> 2 1 age -0.0372 0.0387 -0.962 0.336 #> 3 1 lwt -0.0157 0.00708 -2.21 0.0271 #> 4 1 raceblack 1.19 0.536 2.22 0.0261 #> 5 1 raceother 0.741 0.462 1.60 0.109 #> 6 1 smokeTRUE 0.756 0.425 1.78 0.0755 #> 7 1 ptdTRUE 1.34 0.481 2.80 0.00518 #> 8 1 htTRUE 1.91 0.721 2.65 0.00794 #> 9 1 uiTRUE 0.680 0.464 1.46 0.143 #> 10 1 ftv1 -0.436 0.479 -0.910 0.363 #> 11 1 ftv2+ 0.179 0.456 0.392 0.695 glance(bwt.mu) #> # A tibble: 1 × 4 #> edf deviance AIC nobs #> #> 1 11 195. 217. 189 # or, for output from a multinomial logistic regression fit.gear <- multinom(gear ~ mpg + factor(am), data = mtcars) #> # weights: 12 (6 variable) #> initial value 35.155593 #> iter 10 value 14.156582 #> iter 20 value 14.031881 #> iter 30 value 14.025659 #> iter 40 value 14.021414 #> iter 50 value 14.019824 #> iter 60 value 14.019278 #> iter 70 value 14.018601 #> iter 80 value 14.018282 #> iter 80 value 14.018282 #> iter 90 value 14.017126 #> final value 14.015374 #> converged tidy(fit.gear) #> # A tibble: 6 × 6 #> y.level term estimate std.error statistic p.value #> #> 1 4 (Intercept) -11.2 5.32 -2.10 3.60e- 2 #> 2 4 mpg 0.525 0.268 1.96 5.02e- 2 #> 3 4 factor(am)1 11.9 66.9 0.178 8.59e- 1 #> 4 5 (Intercept) -18.4 67.9 -0.271 7.87e- 1 #> 5 5 mpg 0.366 0.292 1.25 2.10e- 1 #> 6 5 factor(am)1 22.4 2.17 10.3 4.54e-25 glance(fit.gear) #> # A tibble: 1 × 4 #> edf deviance AIC nobs #> #> 1 6 28.0 40.0 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.negbin.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) negbin object — tidy.negbin","title":"Tidy a(n) negbin object — tidy.negbin","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.negbin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) negbin object — tidy.negbin","text":"","code":"# S3 method for class 'negbin' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.negbin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) negbin object — tidy.negbin","text":"x glm.nb object returned MASS::glm.nb(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... tidy(), additional arguments passed summary(). Otherwise ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.negbin.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) negbin object — tidy.negbin","text":"","code":"# load libraries for models and data library(MASS) # fit model r <- glm.nb(Days ~ Sex / (Age + Eth * Lrn), data = quine) # summarize model fit with tidiers tidy(r) #> # A tibble: 14 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 3.02 0.297 10.2 2.89e-24 #> 2 SexM -0.475 0.396 -1.20 2.29e- 1 #> 3 SexF:AgeF1 -0.709 0.323 -2.19 2.83e- 2 #> 4 SexM:AgeF1 -0.724 0.330 -2.19 2.85e- 2 #> 5 SexF:AgeF2 -0.615 0.371 -1.66 9.78e- 2 #> 6 SexM:AgeF2 0.628 0.274 2.30 2.17e- 2 #> 7 SexF:AgeF3 -0.342 0.327 -1.05 2.95e- 1 #> 8 SexM:AgeF3 1.15 0.314 3.67 2.46e- 4 #> 9 SexF:EthN -0.0731 0.265 -0.276 7.83e- 1 #> 10 SexM:EthN -0.679 0.256 -2.65 8.07e- 3 #> 11 SexF:LrnSL 0.944 0.322 2.93 3.43e- 3 #> 12 SexM:LrnSL 0.239 0.336 0.712 4.76e- 1 #> 13 SexF:EthN:LrnSL -1.36 0.377 -3.60 3.16e- 4 #> 14 SexM:EthN:LrnSL 0.761 0.441 1.73 8.45e- 2 glance(r) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 235. 145 -531.5125 1093. 1138. 168. 132 146"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) nlrq object — tidy.nlrq","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"","code":"# S3 method for class 'nlrq' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"x nlrq object returned quantreg::nlrq(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nlrq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) nlrq object — tidy.nlrq","text":"","code":"# load modeling library library(quantreg) # build artificial data with multiplicative error set.seed(1) dat <- NULL dat$x <- rep(1:25, 20) dat$y <- SSlogis(dat$x, 10, 12, 2) * rnorm(500, 1, 0.1) # fit the median using nlrq mod <- nlrq(y ~ SSlogis(x, Asym, mid, scal), data = dat, tau = 0.5, trace = TRUE ) #> 109.059 : 9.968027 11.947208 1.962113 #> final value 108.942725 #> converged #> lambda = 1 #> 108.9427 : 9.958648 11.943273 1.967144 #> final value 108.490939 #> stopped after 2 iterations #> lambda = 0.9750984 #> 108.4909 : 9.949430 11.987472 1.998607 #> final value 108.471416 #> converged #> lambda = 0.9999299 #> 108.4714 : 9.94163 11.99077 1.99344 #> final value 108.471243 #> converged #> lambda = 1 #> 108.4712 : 9.941008 11.990550 1.992921 #> final value 108.470935 #> converged #> lambda = 0.8621249 #> 108.4709 : 9.942734 11.992773 1.993209 #> final value 108.470923 #> converged #> lambda = 0.9999613 #> 108.4709 : 9.942629 11.992728 1.993136 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 #> final value 108.470919 #> converged #> lambda = 1 #> 108.4709 : 9.942644 11.992737 1.993144 # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 Asym 9.94 0.0841 118. 0 #> 2 mid 12.0 0.0673 178. 0 #> 3 scal 1.99 0.0248 80.3 0 glance(mod) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -429.0842 864. 877. 497 augment(mod) #> # A tibble: 500 × 4 #> x y .fitted .resid #> #> 1 1 0.0382 0.0399 -0.00171 #> 2 2 0.0682 0.0657 0.00250 #> 3 3 0.101 0.108 -0.00728 #> 4 4 0.209 0.177 0.0315 #> 5 5 0.303 0.289 0.0137 #> 6 6 0.435 0.469 -0.0332 #> 7 7 0.796 0.751 0.0448 #> 8 8 1.28 1.18 0.0982 #> 9 9 1.93 1.81 0.118 #> 10 10 2.61 2.67 -0.0671 #> # ℹ 490 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) nls object — tidy.nls","title":"Tidy a(n) nls object — tidy.nls","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) nls object — tidy.nls","text":"","code":"# S3 method for class 'nls' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) nls object — tidy.nls","text":"x nls object returned stats::nls(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) nls object — tidy.nls","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.nls.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) nls object — tidy.nls","text":"","code":"# fit model n <- nls(mpg ~ k * e^wt, data = mtcars, start = list(k = 1, e = 2)) # summarize model fit with tidiers + visualization tidy(n) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 k 49.7 3.79 13.1 5.96e-14 #> 2 e 0.746 0.0199 37.5 8.86e-27 augment(n) #> # A tibble: 32 × 4 #> mpg wt .fitted .resid #> #> 1 21 2.62 23.0 -2.01 #> 2 21 2.88 21.4 -0.352 #> 3 22.8 2.32 25.1 -2.33 #> 4 21.4 3.22 19.3 2.08 #> 5 18.7 3.44 18.1 0.611 #> 6 18.1 3.46 18.0 0.117 #> 7 14.3 3.57 17.4 -3.11 #> 8 24.4 3.19 19.5 4.93 #> 9 22.8 3.15 19.7 3.10 #> 10 19.2 3.44 18.1 1.11 #> # ℹ 22 more rows glance(n) #> # A tibble: 1 × 9 #> sigma isConv finTol logLik AIC BIC deviance df.residual nobs #> #> 1 2.67 TRUE 0.00000204 -75.8 158. 162. 214. 30 32 library(ggplot2) ggplot(augment(n), aes(wt, mpg)) + geom_point() + geom_line(aes(y = .fitted)) newdata <- head(mtcars) newdata$wt <- newdata$wt + 1 augment(n, newdata = newdata) #> # A tibble: 6 × 13 #> .rownames mpg cyl disp hp drat wt qsec vs am gear #> #> 1 Mazda RX4 21 6 160 110 3.9 3.62 16.5 0 1 4 #> 2 Mazda RX4 W… 21 6 160 110 3.9 3.88 17.0 0 1 4 #> 3 Datsun 710 22.8 4 108 93 3.85 3.32 18.6 1 1 4 #> 4 Hornet 4 Dr… 21.4 6 258 110 3.08 4.22 19.4 1 0 3 #> 5 Hornet Spor… 18.7 8 360 175 3.15 4.44 17.0 0 0 3 #> 6 Valiant 18.1 6 225 105 2.76 4.46 20.2 1 0 3 #> # ℹ 2 more variables: carb , .fitted "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) orcutt object — tidy.orcutt","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"","code":"# S3 method for class 'orcutt' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"x orcutt object returned orcutt::cochrane.orcutt(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"tibble::tibble() columns: estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.orcutt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) orcutt object — tidy.orcutt","text":"","code":"# load libraries for models and data library(orcutt) # fit model and summarize results reg <- lm(mpg ~ wt + qsec + disp, mtcars) tidy(reg) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.8 5.94 3.33 0.00244 #> 2 wt -5.03 1.22 -4.11 0.000310 #> 3 qsec 0.927 0.342 2.71 0.0114 #> 4 disp -0.000128 0.0106 -0.0121 0.990 co <- cochrane.orcutt(reg) tidy(co) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 21.8 6.63 3.29 0.00279 #> 2 wt -4.85 1.33 -3.65 0.00112 #> 3 qsec 0.797 0.370 2.15 0.0402 #> 4 disp -0.00136 0.0110 -0.123 0.903 glance(co) #> # A tibble: 1 × 9 #> r.squared adj.r.squared rho number.interaction dw.original #> #> 1 0.799 0.777 0.268 7 1.50 #> # ℹ 4 more variables: p.value.original , dw.transformed , #> # p.value.transformed , nobs "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"","code":"# S3 method for class 'pairwise.htest' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"x pairwise.htest object returned stats::pairwise.t.test() stats::pairwise.wilcox.test(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"Note one-sided tests, alternative hypothesis test can stated \"group1 greater/less group2\". Note also columns group1 group2 always factor, even original input (e.g.) numeric.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"tibble::tibble() columns: group1 First group compared. group2 Second group compared. p.value two-sided p-value associated observed statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pairwise.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) pairwise.htest object — tidy.pairwise.htest","text":"","code":"attach(airquality) Month <- factor(Month, labels = month.abb[5:9]) ptt <- pairwise.t.test(Ozone, Month) tidy(ptt) #> # A tibble: 10 × 3 #> group1 group2 p.value #> #> 1 Jun May 1 #> 2 Jul May 0.000264 #> 3 Jul Jun 0.0511 #> 4 Aug May 0.000195 #> 5 Aug Jun 0.0499 #> 6 Aug Jul 1 #> 7 Sep May 1 #> 8 Sep Jun 1 #> 9 Sep Jul 0.00488 #> 10 Sep Aug 0.00388 library(modeldata) data(hpc_data) attach(hpc_data) ptt2 <- pairwise.t.test(compounds, class) tidy(ptt2) #> # A tibble: 6 × 3 #> group1 group2 p.value #> #> 1 F VF 9.28e- 8 #> 2 M VF 2.55e- 61 #> 3 M F 4.26e- 34 #> 4 L VF 2.52e-126 #> 5 L F 5.44e- 95 #> 6 L M 2.45e- 25 tidy(pairwise.t.test(compounds, class, alternative = \"greater\")) #> # A tibble: 6 × 3 #> group1 group2 p.value #> #> 1 F VF 4.64e- 8 #> 2 M VF 1.27e- 61 #> 3 M F 2.13e- 34 #> 4 L VF 1.26e-126 #> 5 L F 2.72e- 95 #> 6 L M 1.22e- 25 tidy(pairwise.t.test(compounds, class, alternative = \"less\")) #> # A tibble: 6 × 3 #> group1 group2 p.value #> #> 1 F VF 1 #> 2 M VF 1 #> 3 M F 1 #> 4 L VF 1 #> 5 L F 1 #> 6 L M 1 tidy(pairwise.wilcox.test(compounds, class)) #> # A tibble: 6 × 3 #> group1 group2 p.value #> #> 1 F VF 4.85e-32 #> 2 M VF 2.41e-66 #> 3 M F 1.45e-23 #> 4 L VF 1.90e-77 #> 5 L F 1.28e-42 #> 6 L M 6.84e- 9"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) pam object — tidy.pam","title":"Tidy a(n) pam object — tidy.pam","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) pam object — tidy.pam","text":"","code":"# S3 method for class 'pam' tidy(x, col.names = paste0(\"x\", 1:ncol(x$medoids)), ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) pam object — tidy.pam","text":"x pam object returned cluster::pam() col.names Column names input data frame. Defaults names variables x. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) pam object — tidy.pam","text":"examples, see pam vignette.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) pam object — tidy.pam","text":"tibble::tibble() columns: size Size cluster. max.diss Maximal dissimilarity observations cluster cluster's medoid. avg.diss Average dissimilarity observations cluster cluster's medoid. diameter Diameter cluster. separation Separation cluster. avg.width Average silhouette width cluster. cluster factor describing cluster 1:k.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pam.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) pam object — tidy.pam","text":"","code":"# load libraries for models and data library(dplyr) library(ggplot2) library(cluster) library(modeldata) data(hpc_data) x <- hpc_data[, 2:5] p <- pam(x, k = 4) # summarize model fit with tidiers + visualization tidy(p) #> # A tibble: 4 × 11 #> size max.diss avg.diss diameter separation avg.width cluster compounds #> #> 1 3544 13865. 576. 15128. 93.6 0.711 1 242 #> 2 412 3835. 1111. 5704. 93.2 0.398 2 317 #> 3 236 3882. 1317. 5852. 93.2 0.516 3 240 #> 4 139 42999. 5582. 46451. 151. 0.0843 4 724 #> # ℹ 3 more variables: input_fields , iterations , #> # num_pending glance(p) #> # A tibble: 1 × 1 #> avg.silhouette.width #> #> 1 0.650 augment(p, x) #> # A tibble: 4,331 × 5 #> compounds input_fields iterations num_pending .cluster #> #> 1 997 137 20 0 1 #> 2 97 103 20 0 1 #> 3 101 75 10 0 1 #> 4 93 76 20 0 1 #> 5 100 82 20 0 1 #> 6 100 82 20 0 1 #> 7 105 88 20 0 1 #> 8 98 95 20 0 1 #> 9 101 91 20 0 1 #> 10 95 92 20 0 1 #> # ℹ 4,321 more rows augment(p, x) %>% ggplot(aes(compounds, input_fields)) + geom_point(aes(color = .cluster)) + geom_text(aes(label = cluster), data = tidy(p), size = 10)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) plm object — tidy.plm","title":"Tidy a(n) plm object — tidy.plm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) plm object — tidy.plm","text":"","code":"# S3 method for class 'plm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) plm object — tidy.plm","text":"x plm objected returned plm::plm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) plm object — tidy.plm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.plm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) plm object — tidy.plm","text":"","code":"# load libraries for models and data library(plm) # load data data(\"Produc\", package = \"plm\") # fit model zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, index = c(\"state\", \"year\") ) # summarize model fit with tidiers summary(zz) #> Oneway (individual) effect Within Model #> #> Call: #> plm(formula = log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, #> data = Produc, index = c(\"state\", \"year\")) #> #> Balanced Panel: n = 48, T = 17, N = 816 #> #> Residuals: #> Min. 1st Qu. Median 3rd Qu. Max. #> -0.120456 -0.023741 -0.002041 0.018144 0.174718 #> #> Coefficients: #> Estimate Std. Error t-value Pr(>|t|) #> log(pcap) -0.02614965 0.02900158 -0.9017 0.3675 #> log(pc) 0.29200693 0.02511967 11.6246 < 2.2e-16 *** #> log(emp) 0.76815947 0.03009174 25.5273 < 2.2e-16 *** #> unemp -0.00529774 0.00098873 -5.3582 1.114e-07 *** #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Total Sum of Squares: 18.941 #> Residual Sum of Squares: 1.1112 #> R-Squared: 0.94134 #> Adj. R-Squared: 0.93742 #> F-statistic: 3064.81 on 4 and 764 DF, p-value: < 2.22e-16 tidy(zz) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 tidy(zz, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0830 0.0307 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.243 0.341 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.709 0.827 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00724 -0.00336 tidy(zz, conf.int = TRUE, conf.level = 0.9) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 log(pcap) -0.0261 0.0290 -0.902 3.68e- 1 -0.0739 0.0216 #> 2 log(pc) 0.292 0.0251 11.6 7.08e- 29 0.251 0.333 #> 3 log(emp) 0.768 0.0301 25.5 2.02e-104 0.719 0.818 #> 4 unemp -0.00530 0.000989 -5.36 1.11e- 7 -0.00692 -0.00367 augment(zz) #> # A tibble: 816 × 7 #> `log(gsp)` `log(pcap)` `log(pc)` `log(emp)` unemp .fitted .resid #> #> 1 10.25478 9.617981 10.48553 6.918201 4.7 10.3 -0.046561413 #> 2 10.28790 9.648720 10.52675 6.929419 5.2 10.3 -0.030640422 #> 3 10.35147 9.678618 10.56283 6.977561 4.7 10.4 -0.016454312 #> 4 10.41721 9.705418 10.59873 7.034828 3.9 10.4 -0.008726974 #> 5 10.42671 9.726910 10.64679 7.064588 5.5 10.5 -0.027084312 #> 6 10.42240 9.759401 10.69130 7.052202 7.7 10.4 -0.022368930 #> 7 10.48470 9.783175 10.82420 7.095893 6.8 10.5 -0.036587629 #> 8 10.53111 9.804326 10.84125 7.146142 7.4 10.6 -0.030020604 #> 9 10.59573 9.824430 10.87055 7.197810 6.3 10.6 -0.018942497 #> 10 10.62082 9.845937 10.90643 7.216709 7.1 10.6 -0.014057170 #> # ℹ 806 more rows glance(zz) #> # A tibble: 1 × 7 #> r.squared adj.r.squared statistic p.value deviance df.residual nobs #> #> 1 0.941 0.937 3065. 0 1.11 764 816"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) poLCA object — tidy.poLCA","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"","code":"# S3 method for class 'poLCA' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"x poLCA object returned poLCA::poLCA(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"tibble::tibble() columns: class class consideration. outcome Outcome manifest variable. std.error standard error regression term. variable Manifest variable estimate Estimated class-conditional response probability","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.poLCA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) poLCA object — tidy.poLCA","text":"","code":"# load libraries for models and data library(poLCA) library(dplyr) # generate data data(values) f <- cbind(A, B, C, D) ~ 1 # fit model M1 <- poLCA(f, values, nclass = 2, verbose = FALSE) M1 #> Conditional item response (column) probabilities, #> by outcome variable, for each class (row) #> #> $A #> Pr(1) Pr(2) #> class 1: 0.2864 0.7136 #> class 2: 0.0068 0.9932 #> #> $B #> Pr(1) Pr(2) #> class 1: 0.6704 0.3296 #> class 2: 0.0602 0.9398 #> #> $C #> Pr(1) Pr(2) #> class 1: 0.6460 0.3540 #> class 2: 0.0735 0.9265 #> #> $D #> Pr(1) Pr(2) #> class 1: 0.8676 0.1324 #> class 2: 0.2309 0.7691 #> #> Estimated class population shares #> 0.7208 0.2792 #> #> Predicted class memberships (by modal posterior prob.) #> 0.6713 0.3287 #> #> ========================================================= #> Fit for 2 latent classes: #> ========================================================= #> number of observations: 216 #> number of estimated parameters: 9 #> residual degrees of freedom: 6 #> maximum log-likelihood: -504.4677 #> #> AIC(2): 1026.935 #> BIC(2): 1057.313 #> G^2(2): 2.719922 (Likelihood ratio/deviance statistic) #> X^2(2): 2.719764 (Chi-square goodness of fit) #> # summarize model fit with tidiers + visualization tidy(M1) #> # A tibble: 16 × 5 #> variable class outcome estimate std.error #> #> 1 A 1 1 0.286 0.0393 #> 2 A 2 1 0.00681 0.0254 #> 3 A 1 2 0.714 0.0393 #> 4 A 2 2 0.993 0.0254 #> 5 B 1 1 0.670 0.0489 #> 6 B 2 1 0.0602 0.0649 #> 7 B 1 2 0.330 0.0489 #> 8 B 2 2 0.940 0.0649 #> 9 C 1 1 0.646 0.0482 #> 10 C 2 1 0.0735 0.0642 #> 11 C 1 2 0.354 0.0482 #> 12 C 2 2 0.927 0.0642 #> 13 D 1 1 0.868 0.0379 #> 14 D 2 1 0.231 0.0929 #> 15 D 1 2 0.132 0.0379 #> 16 D 2 2 0.769 0.0929 augment(M1) #> # A tibble: 216 × 7 #> A B C D X.Intercept. .class .probability #> #> 1 2 2 2 2 1 2 0.959 #> 2 2 2 2 2 1 2 0.959 #> 3 2 2 2 2 1 2 0.959 #> 4 2 2 2 2 1 2 0.959 #> 5 2 2 2 2 1 2 0.959 #> 6 2 2 2 2 1 2 0.959 #> 7 2 2 2 2 1 2 0.959 #> 8 2 2 2 2 1 2 0.959 #> 9 2 2 2 2 1 2 0.959 #> 10 2 2 2 2 1 2 0.959 #> # ℹ 206 more rows glance(M1) #> # A tibble: 1 × 8 #> logLik AIC BIC g.squared chi.squared df df.residual nobs #> #> 1 -504. 1027. 1057. 2.72 2.72 9 6 216 library(ggplot2) ggplot(tidy(M1), aes(factor(class), estimate, fill = factor(outcome))) + geom_bar(stat = \"identity\", width = 1) + facet_wrap(~variable) # three-class model with a single covariate. data(election) f2a <- cbind( MORALG, CARESG, KNOWG, LEADG, DISHONG, INTELG, MORALB, CARESB, KNOWB, LEADB, DISHONB, INTELB ) ~ PARTY nes2a <- poLCA(f2a, election, nclass = 3, nrep = 5, verbose = FALSE) #> Error in eval(predvars, data, env): object 'MORALG' not found td <- tidy(nes2a) #> Error: object 'nes2a' not found td #> Error: object 'td' not found ggplot(td, aes(outcome, estimate, color = factor(class), group = class)) + geom_line() + facet_wrap(~variable, nrow = 2) + theme(axis.text.x = element_text(angle = 90, hjust = 1)) #> Error: object 'td' not found au <- augment(nes2a) #> Error: object 'nes2a' not found au #> Error: object 'au' not found count(au, .class) #> Error: object 'au' not found # if the original data is provided, it leads to NAs in new columns # for rows that weren't predicted au2 <- augment(nes2a, data = election) #> Error: object 'nes2a' not found au2 #> Error: object 'au2' not found dim(au2) #> Error: object 'au2' not found"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) polr object — tidy.polr","title":"Tidy a(n) polr object — tidy.polr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) polr object — tidy.polr","text":"","code":"# S3 method for class 'polr' tidy( x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, p.values = FALSE, ... )"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) polr object — tidy.polr","text":"x polr object returned MASS::polr(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. p.values Logical. p-values returned, based chi-squared tests MASS::dropterm(). Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) polr object — tidy.polr","text":"broom 0.7.0 coefficient_type column renamed coef.type, contents changed well. Now contents coefficient scale, rather coefficient zeta. Calculating p.values dropterm() function approach suggested MASS package author. approach computationally intensive p.values returned requested explicitly. Additionally, works models containing variables two categories. condition met, message shown NA returned instead p-values.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) polr object — tidy.polr","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.polr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) polr object — tidy.polr","text":"","code":"# load libraries for models and data library(MASS) # fit model fit <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) # summarize model fit with tidiers tidy(fit, exponentiate = TRUE, conf.int = TRUE) #> #> Re-fitting to get Hessian #> # A tibble: 8 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 InflMedium 1.76 0.105 5.41 1.44 2.16 coefficie… #> 2 InflHigh 3.63 0.127 10.1 2.83 4.66 coefficie… #> 3 TypeApartment 0.564 0.119 -4.80 0.446 0.712 coefficie… #> 4 TypeAtrium 0.693 0.155 -2.36 0.511 0.940 coefficie… #> 5 TypeTerrace 0.336 0.151 -7.20 0.249 0.451 coefficie… #> 6 ContHigh 1.43 0.0955 3.77 1.19 1.73 coefficie… #> 7 Low|Medium 0.609 0.125 -3.97 NA NA scale #> 8 Medium|High 2.00 0.125 5.50 NA NA scale glance(fit) #> # A tibble: 1 × 7 #> edf logLik AIC BIC deviance df.residual nobs #> #> 1 8 -1740. 3495. 3539. 3479. 1673 1681 augment(fit, type.predict = \"class\") #> # A tibble: 72 × 6 #> Sat Infl Type Cont `(weights)` .fitted #> #> 1 Low Low Tower Low 21 Low #> 2 Medium Low Tower Low 21 Low #> 3 High Low Tower Low 28 Low #> 4 Low Medium Tower Low 34 High #> 5 Medium Medium Tower Low 22 High #> 6 High Medium Tower Low 36 High #> 7 Low High Tower Low 10 High #> 8 Medium High Tower Low 11 High #> 9 High High Tower Low 36 High #> 10 Low Low Apartment Low 61 Low #> # ℹ 62 more rows fit2 <- polr(factor(gear) ~ am + mpg + qsec, data = mtcars) tidy(fit, p.values = TRUE) #> #> Re-fitting to get Hessian #> p-values can presently only be returned for models that contain no #> categorical variables with more than two levels. #> # A tibble: 8 × 6 #> term estimate std.error statistic p.value coef.type #> #> 1 InflMedium 0.566 0.105 5.41 NA coefficient #> 2 InflHigh 1.29 0.127 10.1 NA coefficient #> 3 TypeApartment -0.572 0.119 -4.80 NA coefficient #> 4 TypeAtrium -0.366 0.155 -2.36 NA coefficient #> 5 TypeTerrace -1.09 0.151 -7.20 NA coefficient #> 6 ContHigh 0.360 0.0955 3.77 NA coefficient #> 7 Low|Medium -0.496 0.125 -3.97 NA scale #> 8 Medium|High 0.691 0.125 5.50 NA scale"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) power.htest object — tidy.power.htest","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"","code":"# S3 method for class 'power.htest' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"x power.htest object returned stats::power.t.test(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"tibble::tibble() columns: delta True difference means. n Number observations component. power Power achieved given value n. sd Standard deviation. sig.level Significance level (Type error probability).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.power.htest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) power.htest object — tidy.power.htest","text":"","code":"ptt <- power.t.test(n = 2:30, delta = 1) tidy(ptt) #> # A tibble: 29 × 5 #> n delta sd sig.level power #> #> 1 2 1 1 0.05 0.0913 #> 2 3 1 1 0.05 0.157 #> 3 4 1 1 0.05 0.222 #> 4 5 1 1 0.05 0.286 #> 5 6 1 1 0.05 0.347 #> 6 7 1 1 0.05 0.406 #> 7 8 1 1 0.05 0.461 #> 8 9 1 1 0.05 0.513 #> 9 10 1 1 0.05 0.562 #> 10 11 1 1 0.05 0.607 #> # ℹ 19 more rows library(ggplot2) ggplot(tidy(ptt), aes(n, power)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) prcomp object — tidy.prcomp","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"","code":"# S3 method for class 'prcomp' tidy(x, matrix = \"u\", ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"x prcomp object returned stats::prcomp(). matrix Character specifying component PCA tidied. \"u\", \"samples\", \"scores\", \"x\": returns information map original space principle components space. \"v\", \"rotation\", \"loadings\" \"variables\": returns information map principle components space back original space. \"d\", \"eigenvalues\" \"pcs\": returns information eigenvalues. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"tibble::tibble columns depending component PCA tidied. matrix \"u\", \"samples\", \"scores\", \"x\" row tidied output corresponds original data PCA space. columns : row ID original observation (.e. rowname original data). PC Integer indicating principal component. value score observation particular principal component. , location observation PCA space. matrix \"v\", \"rotation\", \"loadings\" \"variables\", row tidied output corresponds information principle components original space. columns : row variable labels (colnames) data set PCA performed. PC integer vector indicating principal component. value value eigenvector (axis score) indicated principal component. matrix \"d\", \"eigenvalues\" \"pcs\", columns : PC integer vector indicating principal component. std.dev Standard deviation explained PC. percent Fraction variation explained component (numeric value 0 1). cumulative Cumulative fraction variation explained principle components component (numeric value 0 1).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"See https://stats.stackexchange.com/questions/134282/relationship--svd--pca---use-svd--perform-pca information interpret various tidied matrices. Note SVD equivalent PCA centered data.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.prcomp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) prcomp object — tidy.prcomp","text":"","code":"pc <- prcomp(USArrests, scale = TRUE) # information about rotation tidy(pc) #> # A tibble: 200 × 3 #> row PC value #> #> 1 Alabama 1 -0.976 #> 2 Alabama 2 -1.12 #> 3 Alabama 3 0.440 #> 4 Alabama 4 0.155 #> 5 Alaska 1 -1.93 #> 6 Alaska 2 -1.06 #> 7 Alaska 3 -2.02 #> 8 Alaska 4 -0.434 #> 9 Arizona 1 -1.75 #> 10 Arizona 2 0.738 #> # ℹ 190 more rows # information about samples (states) tidy(pc, \"samples\") #> # A tibble: 200 × 3 #> row PC value #> #> 1 Alabama 1 -0.976 #> 2 Alabama 2 -1.12 #> 3 Alabama 3 0.440 #> 4 Alabama 4 0.155 #> 5 Alaska 1 -1.93 #> 6 Alaska 2 -1.06 #> 7 Alaska 3 -2.02 #> 8 Alaska 4 -0.434 #> 9 Arizona 1 -1.75 #> 10 Arizona 2 0.738 #> # ℹ 190 more rows # information about PCs tidy(pc, \"pcs\") #> # A tibble: 4 × 4 #> PC std.dev percent cumulative #> #> 1 1 1.57 0.620 0.620 #> 2 2 0.995 0.247 0.868 #> 3 3 0.597 0.0891 0.957 #> 4 4 0.416 0.0434 1 # state map library(dplyr) library(ggplot2) library(maps) pc %>% tidy(matrix = \"samples\") %>% mutate(region = tolower(row)) %>% inner_join(map_data(\"state\"), by = \"region\") %>% ggplot(aes(long, lat, group = group, fill = value)) + geom_polygon() + facet_wrap(~PC) + theme_void() + ggtitle(\"Principal components of arrest data\") #> Warning: Detected an unexpected many-to-many relationship between `x` and `y`. #> ℹ Row 1 of `x` matches multiple rows in `y`. #> ℹ Row 1 of `y` matches multiple rows in `x`. #> ℹ If a many-to-many relationship is expected, set `relationship = #> \"many-to-many\"` to silence this warning. au <- augment(pc, data = USArrests) au #> # A tibble: 50 × 9 #> .rownames Murder Assault UrbanPop Rape .fittedPC1 .fittedPC2 #> #> 1 Alabama 13.2 236 58 21.2 -0.976 -1.12 #> 2 Alaska 10 263 48 44.5 -1.93 -1.06 #> 3 Arizona 8.1 294 80 31 -1.75 0.738 #> 4 Arkansas 8.8 190 50 19.5 0.140 -1.11 #> 5 California 9 276 91 40.6 -2.50 1.53 #> 6 Colorado 7.9 204 78 38.7 -1.50 0.978 #> 7 Connecticut 3.3 110 77 11.1 1.34 1.08 #> 8 Delaware 5.9 238 72 15.8 -0.0472 0.322 #> 9 Florida 15.4 335 80 31.9 -2.98 -0.0388 #> 10 Georgia 17.4 211 60 25.8 -1.62 -1.27 #> # ℹ 40 more rows #> # ℹ 2 more variables: .fittedPC3 , .fittedPC4 ggplot(au, aes(.fittedPC1, .fittedPC2)) + geom_point() + geom_text(aes(label = .rownames), vjust = 1, hjust = 1)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) pyears object — tidy.pyears","title":"Tidy a(n) pyears object — tidy.pyears","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) pyears object — tidy.pyears","text":"","code":"# S3 method for class 'pyears' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) pyears object — tidy.pyears","text":"x pyears object returned survival::pyears(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) pyears object — tidy.pyears","text":"expected present output ratetable term present. data.frame = TRUE argument supplied pyears, simply contents x$data.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) pyears object — tidy.pyears","text":"tibble::tibble() columns: expected Expected number events. pyears Person-years exposure. n number subjects contributing time event observed number events","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.pyears.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) pyears object — tidy.pyears","text":"","code":"# load libraries for models and data library(survival) # generate and format data temp.yr <- tcut(mgus$dxyr, 55:92, labels = as.character(55:91)) temp.age <- tcut(mgus$age, 34:101, labels = as.character(34:100)) ptime <- ifelse(is.na(mgus$pctime), mgus$futime, mgus$pctime) pstat <- ifelse(is.na(mgus$pctime), 0, 1) pfit <- pyears(Surv(ptime / 365.25, pstat) ~ temp.yr + temp.age + sex, mgus, data.frame = TRUE ) # summarize model fit with tidiers tidy(pfit) #> # A tibble: 1,752 × 6 #> temp.yr temp.age sex pyears n event #> #> 1 71 34 female 0.00274 1 0 #> 2 68 35 female 0.00274 1 0 #> 3 72 35 female 0.00274 1 0 #> 4 69 36 female 0.00274 1 0 #> 5 73 36 female 0.00274 1 0 #> 6 69 37 female 0.00274 1 0 #> 7 70 37 female 0.00274 1 0 #> 8 74 37 female 0.00274 1 0 #> 9 70 38 female 0.00274 1 0 #> 10 71 38 female 0.00274 1 0 #> # ℹ 1,742 more rows glance(pfit) #> # A tibble: 1 × 3 #> total offtable nobs #> #> 1 8.32 0.727 241 # if data.frame argument is not given, different information is present in # output pfit2 <- pyears(Surv(ptime / 365.25, pstat) ~ temp.yr + temp.age + sex, mgus) tidy(pfit2) #> # A tibble: 37 × 402 #> pyears.34.female pyears.35.female pyears.36.female pyears.37.female #> #> 1 0 0 0 0 #> 2 0 0 0 0 #> 3 0 0 0 0 #> 4 0 0 0 0 #> 5 0 0 0 0 #> 6 0 0 0 0 #> 7 0 0 0 0 #> 8 0 0 0 0 #> 9 0 0 0 0 #> 10 0 0 0 0 #> # ℹ 27 more rows #> # ℹ 398 more variables: pyears.38.female , pyears.39.female , #> # pyears.40.female , pyears.41.female , #> # pyears.42.female , pyears.43.female , #> # pyears.44.female , pyears.45.female , #> # pyears.46.female , pyears.47.female , #> # pyears.48.female , pyears.49.female , … glance(pfit2) #> # A tibble: 1 × 3 #> total offtable nobs #> #> 1 8.32 0.727 241"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rcorr object — tidy.rcorr","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"","code":"# S3 method for class 'rcorr' tidy(x, diagonal = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"x rcorr object returned Hmisc::rcorr(). diagonal Logical indicating whether include diagonal elements correlation matrix, correlation column . elements, estimate always 1 p.value always NA. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"Suppose original data columns B. correlation matrix rcorr may entries cor(, B) cor(B, ). one pairs ever present tidy output.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"tibble::tibble() columns: column1 Name index first column described. column2 Name index second column described. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. n Number observations used compute correlation","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rcorr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) rcorr object — tidy.rcorr","text":"","code":"# load libraries for models and data library(Hmisc) #> #> Attaching package: ‘Hmisc’ #> The following object is masked from ‘package:psych’: #> #> describe #> The following object is masked from ‘package:network’: #> #> is.discrete #> The following object is masked from ‘package:survey’: #> #> deff #> The following object is masked from ‘package:quantreg’: #> #> latex #> The following objects are masked from ‘package:dplyr’: #> #> src, summarize #> The following objects are masked from ‘package:base’: #> #> format.pval, units mat <- replicate(52, rnorm(100)) # add some NAs mat[sample(length(mat), 2000)] <- NA # also, column names colnames(mat) <- c(LETTERS, letters) # fit model rc <- rcorr(mat) # summarize model fit with tidiers + visualization td <- tidy(rc) td #> # A tibble: 1,326 × 5 #> column1 column2 estimate n p.value #> #> 1 B A -0.0806 41 0.616 #> 2 C A -0.194 38 0.242 #> 3 C B 0.0811 37 0.633 #> 4 D A -0.451 37 0.00505 #> 5 D B -0.258 35 0.134 #> 6 D C -0.183 35 0.292 #> 7 E A -0.0593 42 0.709 #> 8 E B 0.0208 45 0.892 #> 9 E C -0.228 44 0.136 #> 10 E D -0.0134 34 0.940 #> # ℹ 1,316 more rows library(ggplot2) ggplot(td, aes(p.value)) + geom_histogram(binwidth = .1) ggplot(td, aes(estimate, p.value)) + geom_point() + scale_y_log10()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ref.grid object — tidy.ref.grid","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"","code":"# S3 method for class 'ref.grid' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"x ref.grid object created emmeans::ref_grid(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid(). Cautionary note: misspecified arguments may silently ignored!","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"Returns data frame one observation estimated marginal mean, one column combination factors. input contrast, row contain one estimated contrast. large number arguments can passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. df Degrees freedom used term model. p.value two-sided p-value associated observed statistic. std.error standard error regression term. estimate Expected marginal mean statistic T-ratio statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ref.grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ref.grid object — tidy.ref.grid","text":"","code":"# load libraries for models and data library(emmeans) # linear model for sales of oranges per day oranges_lm1 <- lm(sales1 ~ price1 + price2 + day + store, data = oranges) # reference grid; see vignette(\"basics\", package = \"emmeans\") oranges_rg1 <- ref_grid(oranges_lm1) td <- tidy(oranges_rg1) td #> # A tibble: 36 × 9 #> price1 price2 day store estimate std.error df statistic p.value #> #> 1 51.2 48.6 1 1 2.92 2.72 23 1.07 0.294 #> 2 51.2 48.6 2 1 3.85 2.70 23 1.42 0.168 #> 3 51.2 48.6 3 1 11.0 2.53 23 4.35 0.000237 #> 4 51.2 48.6 4 1 6.10 2.65 23 2.30 0.0309 #> 5 51.2 48.6 5 1 12.8 2.44 23 5.23 0.0000261 #> 6 51.2 48.6 6 1 8.75 2.79 23 3.14 0.00459 #> 7 51.2 48.6 1 2 4.96 2.38 23 2.09 0.0482 #> 8 51.2 48.6 2 2 5.89 2.34 23 2.52 0.0190 #> 9 51.2 48.6 3 2 13.1 2.42 23 5.41 0.0000172 #> 10 51.2 48.6 4 2 8.14 2.35 23 3.46 0.00212 #> # ℹ 26 more rows # marginal averages marginal <- emmeans(oranges_rg1, \"day\") tidy(marginal) #> # A tibble: 6 × 6 #> day estimate std.error df statistic p.value #> #> 1 1 5.56 1.77 23 3.15 0.00451 #> 2 2 6.49 1.73 23 3.76 0.00103 #> 3 3 13.7 1.75 23 7.80 0.0000000658 #> 4 4 8.74 1.73 23 5.04 0.0000420 #> 5 5 15.4 1.79 23 8.65 0.0000000110 #> 6 6 11.4 1.77 23 6.45 0.00000140 # contrasts tidy(contrast(marginal)) #> # A tibble: 6 × 8 #> term contrast null.value estimate std.error df statistic adj.p.value #> #> 1 day day1 ef… 0 -4.65 1.62 23 -2.87 0.0261 #> 2 day day2 ef… 0 -3.72 1.58 23 -2.36 0.0547 #> 3 day day3 ef… 0 3.45 1.60 23 2.15 0.0637 #> 4 day day4 ef… 0 -1.47 1.59 23 -0.930 0.434 #> 5 day day5 ef… 0 5.22 1.64 23 3.18 0.0249 #> 6 day day6 ef… 0 1.18 1.62 23 0.726 0.475 tidy(contrast(marginal, method = \"pairwise\")) #> # A tibble: 15 × 8 #> term contrast null.value estimate std.error df statistic #> #> 1 day day1 - day2 0 -0.930 2.47 23 -0.377 #> 2 day day1 - day3 0 -8.10 2.47 23 -3.29 #> 3 day day1 - day4 0 -3.18 2.51 23 -1.27 #> 4 day day1 - day5 0 -9.88 2.56 23 -3.86 #> 5 day day1 - day6 0 -5.83 2.52 23 -2.31 #> 6 day day2 - day3 0 -7.17 2.48 23 -2.89 #> 7 day day2 - day4 0 -2.25 2.44 23 -0.920 #> 8 day day2 - day5 0 -8.95 2.52 23 -3.56 #> 9 day day2 - day6 0 -4.90 2.45 23 -2.00 #> 10 day day3 - day4 0 4.92 2.49 23 1.98 #> 11 day day3 - day5 0 -1.78 2.47 23 -0.719 #> 12 day day3 - day6 0 2.27 2.54 23 0.894 #> 13 day day4 - day5 0 -6.70 2.49 23 -2.69 #> 14 day day4 - day6 0 -2.65 2.45 23 -1.08 #> 15 day day5 - day6 0 4.05 2.56 23 1.58 #> # ℹ 1 more variable: adj.p.value # plot confidence intervals library(ggplot2) ggplot(tidy(marginal, conf.int = TRUE), aes(day, estimate)) + geom_point() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # by multiple prices by_price <- emmeans(oranges_lm1, \"day\", by = \"price2\", at = list( price1 = 50, price2 = c(40, 60, 80), day = c(\"2\", \"3\", \"4\") ) ) by_price #> price2 = 40: #> day emmean SE df lower.CL upper.CL #> 2 6.24 1.89 23 2.33 10.1 #> 3 13.41 2.12 23 9.02 17.8 #> 4 8.48 1.87 23 4.62 12.3 #> #> price2 = 60: #> day emmean SE df lower.CL upper.CL #> 2 9.21 2.11 23 4.85 13.6 #> 3 16.38 1.91 23 12.44 20.3 #> 4 11.46 2.18 23 6.96 16.0 #> #> price2 = 80: #> day emmean SE df lower.CL upper.CL #> 2 12.19 3.65 23 4.65 19.7 #> 3 19.36 3.27 23 12.59 26.1 #> 4 14.44 3.74 23 6.71 22.2 #> #> Results are averaged over the levels of: store #> Confidence level used: 0.95 tidy(by_price) #> # A tibble: 9 × 7 #> day price2 estimate std.error df statistic p.value #> #> 1 2 40 6.24 1.89 23 3.30 0.00310 #> 2 3 40 13.4 2.12 23 6.33 0.00000187 #> 3 4 40 8.48 1.87 23 4.55 0.000145 #> 4 2 60 9.21 2.11 23 4.37 0.000225 #> 5 3 60 16.4 1.91 23 8.60 0.0000000122 #> 6 4 60 11.5 2.18 23 5.26 0.0000244 #> 7 2 80 12.2 3.65 23 3.34 0.00282 #> 8 3 80 19.4 3.27 23 5.91 0.00000502 #> 9 4 80 14.4 3.74 23 3.86 0.000788 ggplot(tidy(by_price, conf.int = TRUE), aes(price2, estimate, color = day)) + geom_line() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # joint_tests tidy(joint_tests(oranges_lm1)) #> # A tibble: 4 × 5 #> term num.df den.df statistic p.value #> #> 1 price1 1 23 30.3 0.0000134 #> 2 price2 1 23 2.23 0.149 #> 3 day 5 23 4.88 0.00346 #> 4 store 5 23 2.52 0.0583"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) regsubsets object — tidy.regsubsets","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"","code":"# S3 method for class 'regsubsets' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"x regsubsets object created leaps::regsubsets(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"tibble::tibble() columns: r.squared R squared statistic, percent variation explained model. adj.r.squared Adjusted R squared statistic BIC Bayesian information criterion component. mallows_cp Mallow's Cp statistic.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.regsubsets.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) regsubsets object — tidy.regsubsets","text":"","code":"# load libraries for models and data library(leaps) # fit model all_fits <- regsubsets(hp ~ ., mtcars) # summarize model fit with tidiers tidy(all_fits) #> # A tibble: 8 × 15 #> `(Intercept)` mpg cyl disp drat wt qsec vs am gear #> #> 1 TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> 2 TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE FALSE FALSE #> 3 TRUE FALSE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE #> 4 TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE FALSE FALSE #> 5 TRUE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE FALSE #> 6 TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE FALSE FALSE #> 7 TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE #> 8 TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE #> # ℹ 5 more variables: carb , r.squared , adj.r.squared , #> # BIC , mallows_cp "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ridgelm object — tidy.ridgelm","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"","code":"# S3 method for class 'ridgelm' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"x ridgelm object returned MASS::lm.ridge(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"tibble::tibble() columns: GCV Generalized cross validation error estimate. lambda Value penalty parameter lambda. term name regression term. estimate estimate scaled coefficient using lambda scale Scaling factor estimated coefficient","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ridgelm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ridgelm object — tidy.ridgelm","text":"","code":"# load libraries for models and data library(MASS) names(longley)[1] <- \"y\" # fit model and summarizd results fit1 <- lm.ridge(y ~ ., longley) tidy(fit1) #> # A tibble: 6 × 5 #> lambda GCV term estimate scale #> #> 1 0 0.128 GNP 25.4 96.2 #> 2 0 0.128 Unemployed 3.30 90.5 #> 3 0 0.128 Armed.Forces 0.752 67.4 #> 4 0 0.128 Population -11.7 6.74 #> 5 0 0.128 Year -6.54 4.61 #> 6 0 0.128 Employed 0.786 3.40 fit2 <- lm.ridge(y ~ ., longley, lambda = seq(0.001, .05, .001)) td2 <- tidy(fit2) g2 <- glance(fit2) # coefficient plot library(ggplot2) ggplot(td2, aes(lambda, estimate, color = term)) + geom_line() # GCV plot ggplot(td2, aes(lambda, GCV)) + geom_line() # add line for the GCV minimizing estimate ggplot(td2, aes(lambda, GCV)) + geom_line() + geom_vline(xintercept = g2$lambdaGCV, col = \"red\", lty = 2)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rlm object — tidy.rlm","title":"Tidy a(n) rlm object — tidy.rlm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rlm object — tidy.rlm","text":"","code":"# S3 method for class 'rlm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rlm object — tidy.rlm","text":"x rlm object returned MASS::rlm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) glmrob object — tidy.glmrob","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"","code":"# S3 method for class 'glmrob' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"x glmrob object returned robustbase::glmrob(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.glmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) glmrob object — tidy.glmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) lmrob object — tidy.lmrob","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"","code":"# S3 method for class 'lmrob' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"x lmrob object returned robustbase::lmrob(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"tidiers robust models MASS package see tidy.rlm().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.robustbase.lmrob.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) lmrob object — tidy.lmrob","text":"","code":"if (requireNamespace(\"robustbase\", quietly = TRUE)) { # load libraries for models and data library(robustbase) data(coleman) set.seed(0) m <- lmrob(Y ~ ., data = coleman) tidy(m) augment(m) glance(m) data(carrots) Rfit <- glmrob(cbind(success, total - success) ~ logdose + block, family = binomial, data = carrots, method = \"Mqle\", control = glmrobMqle.control(tcc = 1.2) ) tidy(Rfit) augment(Rfit) } #> # A tibble: 24 × 5 #> cbind(success, total - success…¹ [,\"\"] logdose block .fitted .resid[,1] #> #> 1 10 25 1.52 B1 -0.726 10.7 #> 2 16 26 1.64 B1 -0.972 17.0 #> 3 8 42 1.76 B1 -1.22 9.22 #> 4 6 36 1.88 B1 -1.46 7.46 #> 5 9 26 2 B1 -1.71 10.7 #> 6 9 33 2.12 B1 -1.96 11.0 #> 7 1 31 2.24 B1 -2.20 3.20 #> 8 2 26 2.36 B1 -2.45 4.45 #> 9 17 21 1.52 B2 -0.491 17.5 #> 10 10 30 1.64 B2 -0.737 10.7 #> # ℹ 14 more rows #> # ℹ abbreviated name: ¹​`cbind(success, total - success)`[,\"success\"] #> # ℹ 1 more variable: .resid[2] "},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) roc object — tidy.roc","title":"Tidy a(n) roc object — tidy.roc","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) roc object — tidy.roc","text":"","code":"# S3 method for class 'roc' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) roc object — tidy.roc","text":"x roc object returned call AUC::roc(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) roc object — tidy.roc","text":"tibble::tibble() columns: cutoff cutoff used classification. Observations predicted probabilities value assigned class 1, observations predicted probabilities value assigned class 0. fpr False positive rate. tpr true positive rate given cutoff.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.roc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) roc object — tidy.roc","text":"","code":"# load libraries for models and data library(AUC) #> AUC 0.3.2 #> Type AUCNews() to see the change log and ?AUC to get an overview. #> #> Attaching package: ‘AUC’ #> The following objects are masked from ‘package:caret’: #> #> sensitivity, specificity # load data data(churn) # fit model r <- roc(churn$predictions, churn$labels) # summarize with tidiers + visualization td <- tidy(r) td #> # A tibble: 220 × 3 #> cutoff fpr tpr #> #> 1 1 0 0 #> 2 1 0.00262 0.164 #> 3 0.972 0.00350 0.164 #> 4 0.968 0.00350 0.182 #> 5 0.964 0.00350 0.189 #> 6 0.96 0.00350 0.201 #> 7 0.932 0.00437 0.201 #> 8 0.91 0.00437 0.208 #> 9 0.908 0.00525 0.208 #> 10 0.902 0.00525 0.214 #> # ℹ 210 more rows library(ggplot2) ggplot(td, aes(fpr, tpr)) + geom_line() # compare the ROC curves for two prediction algorithms library(dplyr) library(tidyr) rocs <- churn %>% pivot_longer(contains(\"predictions\"), names_to = \"algorithm\", values_to = \"value\" ) %>% nest(data = -algorithm) %>% mutate(tidy_roc = purrr::map(data, ~ tidy(roc(.x$value, .x$labels)))) %>% unnest(tidy_roc) ggplot(rocs, aes(fpr, tpr, color = algorithm)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rq object — tidy.rq","title":"Tidy a(n) rq object — tidy.rq","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rq object — tidy.rq","text":"","code":"# S3 method for class 'rq' tidy(x, se.type = NULL, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rq object — tidy.rq","text":"x rq object returned quantreg::rq(). se.type Character specifying method use calculate standard errors. Passed quantreg::summary.rq() se argument. Defaults \"rank\" sample size less 1000, otherwise defaults \"nid\". conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed quantreg::summary.rq().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) rq object — tidy.rq","text":"se.type = \"rank\" confidence intervals calculated summary.rq statistic p.value values returned. single predictor included model, confidence intervals calculated confidence limits set NA.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) rq object — tidy.rq","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rq.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) rq object — tidy.rq","text":"","code":"# load modeling library and data library(quantreg) data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.124 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -78.76986 160. 161. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 0.393 0.696 0.269 0.124 0.5 #> 2 0.458 0.266 0.334 0.124 0.5 #> 3 -1.22 0.660 -1.34 0.124 0.5 #> 4 -1.12 0.212 -1.25 0.124 0.5 #> 5 0.993 0.00527 0.869 0.124 0.5 #> 6 -1.83 0.103 -1.96 0.124 0.5 #> 7 0.124 0.287 0 0.124 0.5 #> 8 0.591 0.444 0.467 0.124 0.5 #> 9 0.805 0.693 0.681 0.124 0.5 #> 10 0.00754 0.0209 -0.116 0.124 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) rqs object — tidy.rqs","title":"Tidy a(n) rqs object — tidy.rqs","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) rqs object — tidy.rqs","text":"","code":"# S3 method for class 'rqs' tidy(x, se.type = \"rank\", conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) rqs object — tidy.rqs","text":"x rqs object returned quantreg::rq(). se.type Character specifying method use calculate standard errors. Passed quantreg::summary.rq() se argument. Defaults \"rank\". conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments passed quantreg::summary.rqs()","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) rqs object — tidy.rqs","text":"se.type = \"rank\" confidence intervals calculated summary.rq. single predictor included model, confidence intervals calculated confidence limits set NA.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) rqs object — tidy.rqs","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. quantile Linear conditional quantile.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.rqs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) rqs object — tidy.rqs","text":"","code":"# load modeling library and data library(quantreg) data(stackloss) # median (l1) regression fit for the stackloss data. mod1 <- rq(stack.loss ~ stack.x, .5) # weighted sample median mod2 <- rq(rnorm(50) ~ 1, weights = runif(50)) # summarize model fit with tidiers tidy(mod1) #> # A tibble: 4 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -39.7 -53.8 -24.5 0.5 #> 2 stack.xAir.Flow 0.832 0.509 1.17 0.5 #> 3 stack.xWater.Temp 0.574 0.272 3.04 0.5 #> 4 stack.xAcid.Conc. -0.0609 -0.278 0.0153 0.5 glance(mod1) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -50.15272 108. 112. 17 augment(mod1) #> # A tibble: 21 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .resid .fitted .tau #> #> 1 42 80 27 5.06e+ 0 36.9 0.5 #> 2 37 80 27 -1.42e-14 37 0.5 #> 3 37 75 25 5.43e+ 0 31.6 0.5 #> 4 28 62 24 7.63e+ 0 20.4 0.5 #> 5 18 62 22 -1.22e+ 0 19.2 0.5 #> 6 18 62 23 -1.79e+ 0 19.8 0.5 #> 7 19 62 24 -1.00e+ 0 20 0.5 #> 8 20 62 24 -7.11e-15 20 0.5 #> 9 15 58 23 -1.46e+ 0 16.5 0.5 #> 10 14 58 18 -2.03e- 2 14.0 0.5 #> # ℹ 11 more rows #> # ℹ 1 more variable: stack.x[3] tidy(mod2) #> # A tibble: 1 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) 0.0744 NA NA 0.5 glance(mod2) #> # A tibble: 1 × 5 #> tau logLik AIC BIC df.residual #> #> 1 0.5 -72.9869 148. 150. 49 augment(mod2) #> # A tibble: 50 × 5 #> `rnorm(50)` `(weights)` .resid .fitted .tau #> #> 1 1.25 0.192 1.18 0.0744 0.5 #> 2 0.458 0.321 0.383 0.0744 0.5 #> 3 0.765 0.0297 0.691 0.0744 0.5 #> 4 0.392 0.870 0.317 0.0744 0.5 #> 5 -0.547 0.647 -0.622 0.0744 0.5 #> 6 -0.468 0.319 -0.542 0.0744 0.5 #> 7 -1.11 0.293 -1.18 0.0744 0.5 #> 8 0.786 0.669 0.711 0.0744 0.5 #> 9 -0.648 0.408 -0.722 0.0744 0.5 #> 10 1.07 0.664 1.00 0.0744 0.5 #> # ℹ 40 more rows # varying tau to generate an rqs object mod3 <- rq(stack.loss ~ stack.x, tau = c(.25, .5)) tidy(mod3) #> # A tibble: 8 × 5 #> term estimate conf.low conf.high tau #> #> 1 (Intercept) -3.6 e+ 1 -59.0 -7.84 0.25 #> 2 stack.xAir.Flow 5.00e- 1 0.229 0.970 0.25 #> 3 stack.xWater.Temp 1.00e+ 0 0.286 2.26 0.25 #> 4 stack.xAcid.Conc. -4.58e-16 -0.643 0.0861 0.25 #> 5 (Intercept) -3.97e+ 1 -53.8 -24.5 0.5 #> 6 stack.xAir.Flow 8.32e- 1 0.509 1.17 0.5 #> 7 stack.xWater.Temp 5.74e- 1 0.272 3.04 0.5 #> 8 stack.xAcid.Conc. -6.09e- 2 -0.278 0.0153 0.5 augment(mod3) #> # A tibble: 42 × 5 #> stack.loss stack.x[,\"Air.Flow\"] [,\"Water.Temp\"] .tau .resid .fitted #> #> 1 42 80 27 0.25 1.10e+ 1 31.0 #> 2 42 80 27 0.5 5.06e+ 0 36.9 #> 3 37 80 27 0.25 6.00e+ 0 31.0 #> 4 37 80 27 0.5 -1.42e-14 37 #> 5 37 75 25 0.25 1.05e+ 1 26.5 #> 6 37 75 25 0.5 5.43e+ 0 31.6 #> 7 28 62 24 0.25 9.00e+ 0 19 #> 8 28 62 24 0.5 7.63e+ 0 20.4 #> 9 18 62 22 0.25 1.00e+ 0 17.0 #> 10 18 62 22 0.5 -1.22e+ 0 19.2 #> # ℹ 32 more rows #> # ℹ 1 more variable: stack.x[3] # glance cannot handle rqs objects like `mod3`--use a purrr # `map`-based workflow instead"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidying methods for spatially autoregressive models — tidy.sarlm","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"methods tidy coefficients spatial autoregression models generated functions spatialreg package.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"","code":"# S3 method for class 'sarlm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"x object returned spatialreg::lagsarlm() spatialreg::errorsarlm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.sarlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidying methods for spatially autoregressive models — tidy.sarlm","text":"","code":"# load libraries for models and data library(spatialreg) library(spdep) # load data data(oldcol, package = \"spdep\") listw <- nb2listw(COL.nb, style = \"W\") # fit model crime_sar <- lagsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw = listw, method = \"eigen\" ) # summarize model fit with tidiers tidy(crime_sar) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 tidy(crime_sar, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.431 0.118 3.66 2.50e- 4 0.200 0.662 #> 2 (Intercept) 45.1 7.18 6.28 3.37e-10 31.0 59.1 #> 3 INC -1.03 0.305 -3.38 7.23e- 4 -1.63 -0.434 #> 4 HOVAL -0.266 0.0885 -3.00 2.66e- 3 -0.439 -0.0925 glance(crime_sar) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 375. 384. 4679. -182. 49 augment(crime_sar) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.6 -3.84 #> 2 1 4.48 33.2 32.4 46.6 -14.2 #> 3 1 11.3 37.1 38.4 41.4 -2.97 #> 4 1 8.44 75 0.178 37.9 -37.7 #> 5 1 19.5 80.5 15.7 14.2 1.54 #> 6 1 16.0 26.4 30.6 34.3 -3.66 #> 7 1 11.3 23.2 50.7 44.7 5.99 #> 8 1 16.0 28.8 26.1 38.4 -12.3 #> 9 1 9.87 18 48.6 51.7 -3.12 #> 10 1 13.6 96.4 34.0 16.3 17.7 #> # ℹ 39 more rows # fit another model crime_sem <- errorsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sem) #> # A tibble: 4 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 59.9 5.37 11.2 0 #> 2 INC -0.941 0.331 -2.85 0.00441 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 #> 4 lambda 0.562 0.134 4.20 0.0000271 tidy(crime_sem, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 59.9 5.37 11.2 0 49.4 70.4 #> 2 INC -0.941 0.331 -2.85 0.00441 -1.59 -0.293 #> 3 HOVAL -0.302 0.0905 -3.34 0.000836 -0.480 -0.125 #> 4 lambda 0.562 0.134 4.20 0.0000271 0.299 0.824 glance(crime_sem) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.658 377. 386. 4683. -183. 49 augment(crime_sem) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.5 -3.70 #> 2 1 4.48 33.2 32.4 44.9 -12.5 #> 3 1 11.3 37.1 38.4 38.2 0.223 #> 4 1 8.44 75 0.178 35.0 -34.8 #> 5 1 19.5 80.5 15.7 13.3 2.45 #> 6 1 16.0 26.4 30.6 35.0 -4.33 #> 7 1 11.3 23.2 50.7 42.3 8.41 #> 8 1 16.0 28.8 26.1 39.4 -13.3 #> 9 1 9.87 18 48.6 49.3 -0.721 #> 10 1 13.6 96.4 34.0 16.6 17.4 #> # ℹ 39 more rows # fit another model crime_sac <- sacsarlm(CRIME ~ INC + HOVAL, data = COL.OLD, listw) # summarize model fit with tidiers tidy(crime_sac) #> # A tibble: 5 × 5 #> term estimate std.error statistic p.value #> #> 1 rho 0.368 0.197 1.87 0.0613 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 #> 3 INC -1.03 0.326 -3.14 0.00167 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 #> 5 lambda 0.167 0.297 0.562 0.574 tidy(crime_sac, conf.int = TRUE) #> # A tibble: 5 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 rho 0.368 0.197 1.87 0.0613 -0.0174 0.754 #> 2 (Intercept) 47.8 9.90 4.83 0.00000140 28.4 67.2 #> 3 INC -1.03 0.326 -3.14 0.00167 -1.67 -0.386 #> 4 HOVAL -0.282 0.0900 -3.13 0.00176 -0.458 -0.105 #> 5 lambda 0.167 0.297 0.562 0.574 -0.415 0.748 glance(crime_sac) #> # A tibble: 1 × 6 #> r.squared AIC BIC deviance logLik nobs #> #> 1 0.652 376. 388. 4685. -182. 49 augment(crime_sac) #> # A tibble: 49 × 6 #> `(Intercept)` INC HOVAL CRIME .fitted .resid #> #> 1 1 21.2 44.6 18.8 22.2 -3.37 #> 2 1 4.48 33.2 32.4 46.4 -14.0 #> 3 1 11.3 37.1 38.4 40.4 -2.00 #> 4 1 8.44 75 0.178 37.5 -37.3 #> 5 1 19.5 80.5 15.7 13.5 2.25 #> 6 1 16.0 26.4 30.6 34.4 -3.74 #> 7 1 11.3 23.2 50.7 44.1 6.60 #> 8 1 16.0 28.8 26.1 39.0 -12.9 #> 9 1 9.87 18 48.6 51.5 -2.93 #> 10 1 13.6 96.4 34.0 15.8 18.2 #> # ℹ 39 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) spec object — tidy.spec","title":"Tidy a(n) spec object — tidy.spec","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) spec object — tidy.spec","text":"","code":"# S3 method for class 'spec' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) spec object — tidy.spec","text":"x spec object created stats::spectrum(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) spec object — tidy.spec","text":"tibble::tibble() columns: freq Vector frequencies spectral density estimated. spec Vector (univariate series) matrix (multivariate series) estimates spectral density frequencies corresponding freq.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.spec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) spec object — tidy.spec","text":"","code":"spc <- spectrum(lh) tidy(spc) #> # A tibble: 24 × 2 #> freq spec #> #> 1 0.0208 0.0912 #> 2 0.0417 0.331 #> 3 0.0625 0.836 #> 4 0.0833 1.17 #> 5 0.104 0.350 #> 6 0.125 1.51 #> 7 0.146 0.328 #> 8 0.167 0.618 #> 9 0.188 0.320 #> 10 0.208 0.0675 #> # ℹ 14 more rows library(ggplot2) ggplot(tidy(spc), aes(freq, spec)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) speedglm object — tidy.speedglm","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"","code":"# S3 method for class 'speedglm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"x speedglm object returned speedglm::speedglm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedglm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) speedglm object — tidy.speedglm","text":"","code":"# load libraries for models and data library(speedglm) # generate data clotting <- data.frame( u = c(5, 10, 15, 20, 30, 40, 60, 80, 100), lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18) ) # fit model fit <- speedglm(lot1 ~ log(u), data = clotting, family = Gamma(log)) # summarize model fit with tidiers tidy(fit) #> # A tibble: 2 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 5.50 0.190 28.9 0.0000000152 #> 2 log(u) -0.602 0.0553 -10.9 0.0000122 glance(fit) #> # A tibble: 1 × 8 #> null.deviance df.null logLik AIC BIC deviance df.residual nobs #> #> 1 3.51 8 -26.2 58.5 59.1 0.163 7 9"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) speedlm object — tidy.speedlm","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"","code":"# S3 method for class 'speedlm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"x speedlm object returned speedglm::speedlm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.speedlm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) speedlm object — tidy.speedlm","text":"","code":"# load modeling library library(speedglm) # fit model mod <- speedlm(mpg ~ wt + qsec, data = mtcars, fitted = TRUE) # summarize model fit with tidiers tidy(mod) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 #> 2 wt -5.05 0.484 -10.4 2.52e-11 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 glance(mod) #> # A tibble: 1 × 11 #> r.squared adj.r.squared statistic p.value df logLik AIC BIC #> #> 1 0.826 0.814 69.0 9.39e-12 3 -74.4 157. 163. #> # ℹ 3 more variables: deviance , df.residual , nobs augment(mod) #> # A tibble: 32 × 6 #> .rownames mpg wt qsec .fitted .resid #> #> 1 Mazda RX4 21 2.62 16.5 21.8 -0.815 #> 2 Mazda RX4 Wag 21 2.88 17.0 21.0 -0.0482 #> 3 Datsun 710 22.8 2.32 18.6 25.3 -2.53 #> 4 Hornet 4 Drive 21.4 3.22 19.4 21.6 -0.181 #> 5 Hornet Sportabout 18.7 3.44 17.0 18.2 0.504 #> 6 Valiant 18.1 3.46 20.2 21.1 -2.97 #> 7 Duster 360 14.3 3.57 15.8 16.4 -2.14 #> 8 Merc 240D 24.4 3.19 20 22.2 2.17 #> 9 Merc 230 22.8 3.15 22.9 25.1 -2.32 #> 10 Merc 280 19.2 3.44 18.3 19.4 -0.185 #> # ℹ 22 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) summary.glht object — tidy.summary.glht","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"","code":"# S3 method for class 'summary.glht' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"x summary.glht object created calling multcomp::summary.glht() glht object created multcomp::glht(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"tibble::tibble() columns: contrast Levels compared. estimate estimated value regression term. null.value Value estimate compared. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.glht.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) summary.glht object — tidy.summary.glht","text":"","code":"# load libraries for models and data library(multcomp) library(ggplot2) amod <- aov(breaks ~ wool + tension, data = warpbreaks) wht <- glht(amod, linfct = mcp(tension = \"Tukey\")) tidy(wht) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0337 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00109 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(wht, aes(lhs, estimate)) + geom_point() CI <- confint(wht) tidy(CI) #> # A tibble: 3 × 5 #> term contrast estimate conf.low conf.high #> #> 1 tension M - L -10 -19.4 -0.643 #> 2 tension H - L -14.7 -24.1 -5.37 #> 3 tension H - M -4.72 -14.1 4.63 ggplot(CI, aes(lhs, estimate, ymin = lwr, ymax = upr)) + geom_pointrange() tidy(summary(wht)) #> # A tibble: 3 × 7 #> term contrast null.value estimate std.error statistic adj.p.value #> #> 1 tension M - L 0 -10 3.87 -2.58 0.0336 #> 2 tension H - L 0 -14.7 3.87 -3.80 0.00121 #> 3 tension H - M 0 -4.72 3.87 -1.22 0.447 ggplot(mapping = aes(lhs, estimate)) + geom_linerange(aes(ymin = lwr, ymax = upr), data = CI) + geom_point(aes(size = p), data = summary(wht)) + scale_size(trans = \"reverse\") cld <- cld(wht) tidy(cld) #> # A tibble: 3 × 2 #> tension letters #> #> 1 L a #> 2 M b #> 3 H b"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) summary.lm object — tidy.summary.lm","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"","code":"# S3 method for class 'summary.lm' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"x summary.lm object created stats::summary.lm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"tidy.summary.lm() method potentially useful alternative tidy.lm(). instance, users already converted large lm objects leaner summary.lm equivalents conserve memory.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary.lm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) summary.lm object — tidy.summary.lm","text":"","code":"# fit model mod <- lm(mpg ~ wt + qsec, data = mtcars) modsumm <- summary(mod) # summarize model fit with tidiers tidy(mod, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 # equivalent to the above tidy(modsumm, conf.int = TRUE) #> # A tibble: 3 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 (Intercept) 19.7 5.25 3.76 7.65e- 4 9.00 30.5 #> 2 wt -5.05 0.484 -10.4 2.52e-11 -6.04 -4.06 #> 3 qsec 0.929 0.265 3.51 1.50e- 3 0.387 1.47 glance(mod) #> # A tibble: 1 × 12 #> r.squared adj.r.squared sigma statistic p.value df logLik AIC #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 -74.4 157. #> # ℹ 4 more variables: BIC , deviance , df.residual , #> # nobs # mostly the same, except for a few missing columns glance(modsumm) #> # A tibble: 1 × 8 #> r.squared adj.r.squared sigma statistic p.value df df.residual nobs #> #> 1 0.826 0.814 2.60 69.0 9.39e-12 2 29 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) summary_emm object — tidy.summary_emm","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"","code":"# S3 method for class 'summary_emm' tidy(x, null.value = NULL, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"x summary_emm object. null.value Value estimate compared. ... Additional arguments passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid(). Cautionary note: misspecified arguments may silently ignored!","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"Returns data frame one observation estimated marginal mean, one column combination factors. input contrast, row contain one estimated contrast. large number arguments can passed emmeans::summary.emmGrid() lsmeans::summary.ref.grid().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. contrast Levels compared. den.df Degrees freedom denominator. df Degrees freedom used term model. null.value Value estimate compared. num.df Degrees freedom. p.value two-sided p-value associated observed statistic. std.error standard error regression term. level1 One level factor contrasted level2 level factor contrasted term Model term joint tests estimate Expected marginal mean statistic T-ratio statistic F-ratio statistic","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.summary_emm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) summary_emm object — tidy.summary_emm","text":"","code":"# load libraries for models and data library(emmeans) # linear model for sales of oranges per day oranges_lm1 <- lm(sales1 ~ price1 + price2 + day + store, data = oranges) # reference grid; see vignette(\"basics\", package = \"emmeans\") oranges_rg1 <- ref_grid(oranges_lm1) td <- tidy(oranges_rg1) td #> # A tibble: 36 × 9 #> price1 price2 day store estimate std.error df statistic p.value #> #> 1 51.2 48.6 1 1 2.92 2.72 23 1.07 0.294 #> 2 51.2 48.6 2 1 3.85 2.70 23 1.42 0.168 #> 3 51.2 48.6 3 1 11.0 2.53 23 4.35 0.000237 #> 4 51.2 48.6 4 1 6.10 2.65 23 2.30 0.0309 #> 5 51.2 48.6 5 1 12.8 2.44 23 5.23 0.0000261 #> 6 51.2 48.6 6 1 8.75 2.79 23 3.14 0.00459 #> 7 51.2 48.6 1 2 4.96 2.38 23 2.09 0.0482 #> 8 51.2 48.6 2 2 5.89 2.34 23 2.52 0.0190 #> 9 51.2 48.6 3 2 13.1 2.42 23 5.41 0.0000172 #> 10 51.2 48.6 4 2 8.14 2.35 23 3.46 0.00212 #> # ℹ 26 more rows # marginal averages marginal <- emmeans(oranges_rg1, \"day\") tidy(marginal) #> # A tibble: 6 × 6 #> day estimate std.error df statistic p.value #> #> 1 1 5.56 1.77 23 3.15 0.00451 #> 2 2 6.49 1.73 23 3.76 0.00103 #> 3 3 13.7 1.75 23 7.80 0.0000000658 #> 4 4 8.74 1.73 23 5.04 0.0000420 #> 5 5 15.4 1.79 23 8.65 0.0000000110 #> 6 6 11.4 1.77 23 6.45 0.00000140 # contrasts tidy(contrast(marginal)) #> # A tibble: 6 × 8 #> term contrast null.value estimate std.error df statistic adj.p.value #> #> 1 day day1 ef… 0 -4.65 1.62 23 -2.87 0.0261 #> 2 day day2 ef… 0 -3.72 1.58 23 -2.36 0.0547 #> 3 day day3 ef… 0 3.45 1.60 23 2.15 0.0637 #> 4 day day4 ef… 0 -1.47 1.59 23 -0.930 0.434 #> 5 day day5 ef… 0 5.22 1.64 23 3.18 0.0249 #> 6 day day6 ef… 0 1.18 1.62 23 0.726 0.475 tidy(contrast(marginal, method = \"pairwise\")) #> # A tibble: 15 × 8 #> term contrast null.value estimate std.error df statistic #> #> 1 day day1 - day2 0 -0.930 2.47 23 -0.377 #> 2 day day1 - day3 0 -8.10 2.47 23 -3.29 #> 3 day day1 - day4 0 -3.18 2.51 23 -1.27 #> 4 day day1 - day5 0 -9.88 2.56 23 -3.86 #> 5 day day1 - day6 0 -5.83 2.52 23 -2.31 #> 6 day day2 - day3 0 -7.17 2.48 23 -2.89 #> 7 day day2 - day4 0 -2.25 2.44 23 -0.920 #> 8 day day2 - day5 0 -8.95 2.52 23 -3.56 #> 9 day day2 - day6 0 -4.90 2.45 23 -2.00 #> 10 day day3 - day4 0 4.92 2.49 23 1.98 #> 11 day day3 - day5 0 -1.78 2.47 23 -0.719 #> 12 day day3 - day6 0 2.27 2.54 23 0.894 #> 13 day day4 - day5 0 -6.70 2.49 23 -2.69 #> 14 day day4 - day6 0 -2.65 2.45 23 -1.08 #> 15 day day5 - day6 0 4.05 2.56 23 1.58 #> # ℹ 1 more variable: adj.p.value # plot confidence intervals library(ggplot2) ggplot(tidy(marginal, conf.int = TRUE), aes(day, estimate)) + geom_point() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # by multiple prices by_price <- emmeans(oranges_lm1, \"day\", by = \"price2\", at = list( price1 = 50, price2 = c(40, 60, 80), day = c(\"2\", \"3\", \"4\") ) ) by_price #> price2 = 40: #> day emmean SE df lower.CL upper.CL #> 2 6.24 1.89 23 2.33 10.1 #> 3 13.41 2.12 23 9.02 17.8 #> 4 8.48 1.87 23 4.62 12.3 #> #> price2 = 60: #> day emmean SE df lower.CL upper.CL #> 2 9.21 2.11 23 4.85 13.6 #> 3 16.38 1.91 23 12.44 20.3 #> 4 11.46 2.18 23 6.96 16.0 #> #> price2 = 80: #> day emmean SE df lower.CL upper.CL #> 2 12.19 3.65 23 4.65 19.7 #> 3 19.36 3.27 23 12.59 26.1 #> 4 14.44 3.74 23 6.71 22.2 #> #> Results are averaged over the levels of: store #> Confidence level used: 0.95 tidy(by_price) #> # A tibble: 9 × 7 #> day price2 estimate std.error df statistic p.value #> #> 1 2 40 6.24 1.89 23 3.30 0.00310 #> 2 3 40 13.4 2.12 23 6.33 0.00000187 #> 3 4 40 8.48 1.87 23 4.55 0.000145 #> 4 2 60 9.21 2.11 23 4.37 0.000225 #> 5 3 60 16.4 1.91 23 8.60 0.0000000122 #> 6 4 60 11.5 2.18 23 5.26 0.0000244 #> 7 2 80 12.2 3.65 23 3.34 0.00282 #> 8 3 80 19.4 3.27 23 5.91 0.00000502 #> 9 4 80 14.4 3.74 23 3.86 0.000788 ggplot(tidy(by_price, conf.int = TRUE), aes(price2, estimate, color = day)) + geom_line() + geom_errorbar(aes(ymin = conf.low, ymax = conf.high)) # joint_tests tidy(joint_tests(oranges_lm1)) #> # A tibble: 4 × 5 #> term num.df den.df statistic p.value #> #> 1 price1 1 23 30.3 0.0000134 #> 2 price2 1 23 2.23 0.149 #> 3 day 5 23 4.88 0.00346 #> 4 store 5 23 2.52 0.0583"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) survdiff object — tidy.survdiff","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"","code":"# S3 method for class 'survdiff' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"x survdiff object returned survival::survdiff(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"tibble::tibble() columns: exp Weighted expected number events group. N Number subjects group. obs weighted observed number events group.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survdiff.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) survdiff object — tidy.survdiff","text":"","code":"# load libraries for models and data library(survival) # fit model s <- survdiff( Surv(time, status) ~ pat.karno + strata(inst), data = lung ) # summarize model fit with tidiers tidy(s) #> # A tibble: 8 × 4 #> pat.karno N obs exp #> #> 1 30 2 1 0.692 #> 2 40 2 1 1.10 #> 3 50 4 4 1.17 #> 4 60 30 27 16.3 #> 5 70 41 31 26.4 #> 6 80 50 38 41.9 #> 7 90 60 38 47.2 #> 8 100 35 21 26.2 glance(s) #> # A tibble: 1 × 3 #> statistic df p.value #> #> 1 21.4 7 0.00326"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) survexp object — tidy.survexp","title":"Tidy a(n) survexp object — tidy.survexp","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) survexp object — tidy.survexp","text":"","code":"# S3 method for class 'survexp' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) survexp object — tidy.survexp","text":"x survexp object returned survival::survexp(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) survexp object — tidy.survexp","text":"tibble::tibble() columns: n.risk Number individuals risk time zero. time Point time. estimate Estimate survival","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survexp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) survexp object — tidy.survexp","text":"","code":"# load libraries for models and data library(survival) # fit model sexpfit <- survexp( futime ~ 1, rmap = list( sex = \"male\", year = accept.dt, age = (accept.dt - birth.dt) ), method = \"conditional\", data = jasa ) # summarize model fit with tidiers tidy(sexpfit) #> # A tibble: 88 × 3 #> time estimate n.risk #> #> 1 0 1 102 #> 2 1 1.00 102 #> 3 2 1.00 99 #> 4 4 1.00 96 #> 5 5 1.00 94 #> 6 7 1.00 92 #> 7 8 1.00 91 #> 8 10 1.00 90 #> 9 11 1.00 89 #> 10 15 1.00 88 #> # ℹ 78 more rows glance(sexpfit) #> # A tibble: 1 × 3 #> n.max n.start timepoints #> #> 1 102 102 88"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) survfit object — tidy.survfit","title":"Tidy a(n) survfit object — tidy.survfit","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) survfit object — tidy.survfit","text":"","code":"# S3 method for class 'survfit' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) survfit object — tidy.survfit","text":"x survfit object returned survival::survfit(). ... glance.survfit(), additional arguments passed summary(). Otherwise ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) survfit object — tidy.survfit","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. n.censor Number censored events. n.event Number events time t. n.risk Number individuals risk time zero. std.error standard error regression term. time Point time. estimate estimate survival cumulative incidence rate multistate state state multistate survfit object input strata strata stratified survfit object input","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) survfit object — tidy.survfit","text":"","code":"# load libraries for models and data library(survival) # fit model cfit <- coxph(Surv(time, status) ~ age + sex, lung) sfit <- survfit(cfit) # summarize model fit with tidiers + visualization tidy(sfit) #> # A tibble: 186 × 8 #> time n.risk n.event n.censor estimate std.error conf.high conf.low #> #> 1 5 228 1 0 0.996 0.00419 1 0.988 #> 2 11 227 3 0 0.983 0.00845 1.00 0.967 #> 3 12 224 1 0 0.979 0.00947 0.997 0.961 #> 4 13 223 2 0 0.971 0.0113 0.992 0.949 #> 5 15 221 1 0 0.966 0.0121 0.990 0.944 #> 6 26 220 1 0 0.962 0.0129 0.987 0.938 #> 7 30 219 1 0 0.958 0.0136 0.984 0.933 #> 8 31 218 1 0 0.954 0.0143 0.981 0.927 #> 9 53 217 2 0 0.945 0.0157 0.975 0.917 #> 10 54 215 1 0 0.941 0.0163 0.972 0.911 #> # ℹ 176 more rows glance(sfit) #> # A tibble: 1 × 10 #> records n.max n.start events rmean rmean.std.error median conf.low #> #> 1 228 228 228 165 381. 20.3 320 285 #> # ℹ 2 more variables: conf.high , nobs library(ggplot2) ggplot(tidy(sfit), aes(time, estimate)) + geom_line() + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25) # multi-state fitCI <- survfit(Surv(stop, status * as.numeric(event), type = \"mstate\") ~ 1, data = mgus1, subset = (start == 0) ) td_multi <- tidy(fitCI) td_multi #> # A tibble: 711 × 9 #> time n.risk n.event n.censor estimate std.error conf.high conf.low #> #> 1 6 241 0 0 0.996 0.00414 1 0.988 #> 2 7 240 0 0 0.992 0.00584 1 0.980 #> 3 31 239 0 0 0.988 0.00714 1 0.974 #> 4 32 238 0 0 0.983 0.00823 1.00 0.967 #> 5 39 237 0 0 0.979 0.00918 0.997 0.961 #> 6 60 236 0 0 0.975 0.0100 0.995 0.956 #> 7 61 235 0 0 0.967 0.0115 0.990 0.944 #> 8 152 233 0 0 0.963 0.0122 0.987 0.939 #> 9 153 232 0 0 0.959 0.0128 0.984 0.934 #> 10 174 231 0 0 0.954 0.0134 0.981 0.928 #> # ℹ 701 more rows #> # ℹ 1 more variable: state ggplot(td_multi, aes(time, estimate, group = state)) + geom_line(aes(color = state)) + geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) survreg object — tidy.survreg","title":"Tidy a(n) survreg object — tidy.survreg","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) survreg object — tidy.survreg","text":"","code":"# S3 method for class 'survreg' tidy(x, conf.level = 0.95, conf.int = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) survreg object — tidy.survreg","text":"x survreg object returned survival::survreg(). conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) survreg object — tidy.survreg","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.survreg.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) survreg object — tidy.survreg","text":"","code":"# load libraries for models and data library(survival) # fit model sr <- survreg( Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist = \"exponential\" ) # summarize model fit with tidiers + visualization tidy(sr) #> # A tibble: 3 × 5 #> term estimate std.error statistic p.value #> #> 1 (Intercept) 6.96 1.32 5.27 0.000000139 #> 2 ecog.ps -0.433 0.587 -0.738 0.461 #> 3 rx 0.582 0.587 0.991 0.322 augment(sr, ovarian) #> # A tibble: 26 × 9 #> futime fustat age resid.ds rx ecog.ps .fitted .se.fit .resid #> #> 1 59 1 72.3 2 1 1 1224. 639. -1165. #> 2 115 1 74.5 2 1 1 1224. 639. -1109. #> 3 156 1 66.5 2 1 2 794. 350. -638. #> 4 421 0 53.4 2 2 1 2190. 1202. -1769. #> 5 431 1 50.3 2 1 1 1224. 639. -793. #> 6 448 0 56.4 1 1 2 794. 350. -346. #> 7 464 1 56.9 2 2 2 1420. 741. -956. #> 8 475 1 59.9 2 2 2 1420. 741. -945. #> 9 477 0 64.2 2 1 1 1224. 639. -747. #> 10 563 1 55.2 1 2 2 1420. 741. -857. #> # ℹ 16 more rows glance(sr) #> # A tibble: 1 × 9 #> iter df statistic logLik AIC BIC df.residual nobs p.value #> #> 1 4 3 1.67 -97.2 200. 204. 23 26 0.434 # coefficient plot td <- tidy(sr, conf.int = TRUE) library(ggplot2) ggplot(td, aes(estimate, term)) + geom_point() + geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + geom_vline(xintercept = 0)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyglm.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) svyglm object — tidy.svyglm","title":"Tidy a(n) svyglm object — tidy.svyglm","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyglm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) svyglm object — tidy.svyglm","text":"","code":"# S3 method for class 'svyglm' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyglm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) svyglm object — tidy.svyglm","text":"x svyglm object returned survey::svyglm(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) svyolr object — tidy.svyolr","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"","code":"# S3 method for class 'svyolr' tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"x svyolr object returned survey::svyolr(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. exponentiate Logical indicating whether exponentiate coefficient estimates. typical logistic multinomial regressions, bad idea log logit link. Defaults FALSE. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"tidy.svyolr() tidier light wrapper around tidy.polr(). However, implementation p-value calculation tidy.polr() computationally intensive specific model, p.values argument tidy.svyolr() currently ignored, raise warning passed.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.svyolr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) svyolr object — tidy.svyolr","text":"","code":"library(broom) library(survey) data(api) dclus1 <- svydesign(id = ~dnum, weights = ~pw, data = apiclus1, fpc = ~fpc) dclus1 <- update(dclus1, mealcat = cut(meals, c(0, 25, 50, 75, 100))) m <- svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1) m #> Call: #> svyolr(mealcat ~ avg.ed + mobility + stype, design = dclus1) #> #> Coefficients: #> avg.ed mobility stypeH stypeM #> -2.6999217 0.0325042 -1.7574715 -0.6191463 #> #> Intercepts: #> (0,25]|(25,50] (25,50]|(50,75] (50,75]|(75,100] #> -8.857919 -6.586464 -4.924938 tidy(m, conf.int = TRUE) #> # A tibble: 7 × 7 #> term estimate std.error statistic conf.low conf.high coef.type #> #> 1 avg.ed -2.70 1.13 -2.38 -4.92e+0 -0.477 coeffici… #> 2 mobility 0.0325 0.0207 1.57 -7.98e-3 0.0730 coeffici… #> 3 stypeH -1.76 0.700 -2.51 -3.13e+0 -0.386 coeffici… #> 4 stypeM -0.619 0.310 -2.00 -1.23e+0 -0.0123 coeffici… #> 5 (0,25]|(25,50] -8.86 3.69 -2.40 -1.61e+1 -1.63 scale #> 6 (25,50]|(50,7… -6.59 3.11 -2.12 -1.27e+1 -0.493 scale #> 7 (50,75]|(75,1… -4.92 2.86 -1.72 -1.05e+1 0.687 scale"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) systemfit object — tidy.systemfit","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"","code":"# S3 method for class 'systemfit' tidy(x, conf.int = TRUE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"x systemfit object produced call systemfit::systemfit(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"tidy method works model objects class systemfit. Default returns tibble six columns.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. std.error standard error regression term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.systemfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) systemfit object — tidy.systemfit","text":"","code":"set.seed(27) # load libraries for models and data library(systemfit) #> #> Please cite the 'systemfit' package as: #> Arne Henningsen and Jeff D. Hamann (2007). systemfit: A Package for Estimating Systems of Simultaneous Equations in R. Journal of Statistical Software 23(4), 1-40. http://www.jstatsoft.org/v23/i04/. #> #> If you have questions, suggestions, or comments regarding the 'systemfit' package, please use a forum or 'tracker' at systemfit's R-Forge site: #> https://r-forge.r-project.org/projects/systemfit/ # generate data df <- data.frame( X = rnorm(100), Y = rnorm(100), Z = rnorm(100), W = rnorm(100) ) # fit model fit <- systemfit(formula = list(Y ~ Z, W ~ X), data = df, method = \"SUR\") # summarize model fit with tidiers tidy(fit) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 eq1_(Intercept) 0.109 0.0981 1.11 0.269 -0.0857 0.304 #> 2 eq1_Z -0.0808 0.0934 -0.865 0.389 -0.266 0.105 #> 3 eq2_(Intercept) -0.0495 0.110 -0.449 0.655 -0.269 0.170 #> 4 eq2_X -0.133 0.103 -1.30 0.198 -0.337 0.0707 tidy(fit, conf.int = TRUE) #> # A tibble: 4 × 7 #> term estimate std.error statistic p.value conf.low conf.high #> #> 1 eq1_(Intercept) 0.109 0.0981 1.11 0.269 -0.0857 0.304 #> 2 eq1_Z -0.0808 0.0934 -0.865 0.389 -0.266 0.105 #> 3 eq2_(Intercept) -0.0495 0.110 -0.449 0.655 -0.269 0.170 #> 4 eq2_X -0.133 0.103 -1.30 0.198 -0.337 0.0707"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) table object — tidy.table","title":"Tidy a(n) table object — tidy.table","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return. Deprecated. Please use tibble::as_tibble() instead.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) table object — tidy.table","text":"","code":"# S3 method for class 'table' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) table object — tidy.table","text":"x base::table object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) table object — tidy.table","text":"tibble::tibble long-form containing frequency information table Freq column. result much like get tidyr::pivot_longer().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) table object — tidy.table","text":"Directly calls tibble::as_tibble() base::table object.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) ts object — tidy.ts","title":"Tidy a(n) ts object — tidy.ts","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) ts object — tidy.ts","text":"","code":"# S3 method for class 'ts' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) ts object — tidy.ts","text":"x univariate multivariate ts times series object. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) ts object — tidy.ts","text":"series column present multivariate ts objects.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) ts object — tidy.ts","text":"tibble::tibble() columns: index Index (.e. date time) `ts` `zoo` object. series Name series (present multivariate time series). value value/estimate component. Results data reshaping.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.ts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) ts object — tidy.ts","text":"","code":"set.seed(678) tidy(ts(1:10, frequency = 4, start = c(1959, 2))) #> # A tibble: 10 × 2 #> index value #> #> 1 1959. 1 #> 2 1960. 2 #> 3 1960. 3 #> 4 1960 4 #> 5 1960. 5 #> 6 1960. 6 #> 7 1961. 7 #> 8 1961 8 #> 9 1961. 9 #> 10 1962. 10 z <- ts(matrix(rnorm(300), 100, 3), start = c(1961, 1), frequency = 12) colnames(z) <- c(\"Aa\", \"Bb\", \"Cc\") tidy(z) #> # A tibble: 300 × 3 #> index series value #> #> 1 1961 Aa -0.773 #> 2 1961 Bb 0.855 #> 3 1961 Cc -1.43 #> 4 1961. Aa 0.933 #> 5 1961. Bb -0.738 #> 6 1961. Cc -2.55 #> 7 1961. Aa 0.466 #> 8 1961. Bb 2.37 #> 9 1961. Cc 1.22 #> 10 1961. Aa -1.08 #> # ℹ 290 more rows"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) varest object — tidy.varest","title":"Tidy a(n) varest object — tidy.varest","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) varest object — tidy.varest","text":"","code":"# S3 method for class 'varest' tidy(x, conf.int = FALSE, conf.level = 0.95, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) varest object — tidy.varest","text":"x varest object produced call vars::VAR(). conf.int Logical indicating whether include confidence interval tidied output. Defaults FALSE. conf.level confidence level use confidence interval conf.int = TRUE. Must strictly greater 0 less 1. Defaults 0.95, corresponds 95 percent confidence interval. ... glance(), additional arguments passed summary(). Otherwise ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) varest object — tidy.varest","text":"tibble one row term regression. component column indicates whether particular term used model either \"mean\" \"precision\". precision inverse variance, often referred phi. least one term used model precision phi. vars package include confint method report confidence intervals varest objects. Setting tidy argument conf.int = TRUE return warning.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) varest object — tidy.varest","text":"tibble::tibble() columns: conf.high Upper bound confidence interval estimate. conf.low Lower bound confidence interval estimate. estimate estimated value regression term. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. std.error standard error regression term. term name regression term. component Whether particular term used model mean precision regression. See details.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.varest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) varest object — tidy.varest","text":"","code":"# load libraries for models and data library(vars) # load data data(\"Canada\", package = \"vars\") # fit models mod <- VAR(Canada, p = 1, type = \"both\") # summarize model fit with tidiers tidy(mod) #> # A tibble: 24 × 6 #> group term estimate std.error statistic p.value #> #> 1 e e.l1 1.24 0.0863 14.4 1.82e-23 #> 2 e prod.l1 0.195 0.0361 5.39 7.49e- 7 #> 3 e rw.l1 -0.0678 0.0283 -2.40 1.90e- 2 #> 4 e U.l1 0.623 0.169 3.68 4.30e- 4 #> 5 e const -279. 75.2 -3.71 3.92e- 4 #> 6 e trend -0.0407 0.0197 -2.06 4.24e- 2 #> 7 prod e.l1 0.0129 0.126 0.103 9.19e- 1 #> 8 prod prod.l1 0.963 0.0527 18.3 9.43e-30 #> 9 prod rw.l1 -0.0391 0.0412 -0.948 3.46e- 1 #> 10 prod U.l1 0.211 0.247 0.855 3.95e- 1 #> # ℹ 14 more rows glance(mod) #> # A tibble: 1 × 4 #> lag.order logLik nobs n #> #> 1 1 -208. 83 84"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) zoo object — tidy.zoo","title":"Tidy a(n) zoo object — tidy.zoo","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) zoo object — tidy.zoo","text":"","code":"# S3 method for class 'zoo' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) zoo object — tidy.zoo","text":"x zoo object created zoo::zoo(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) zoo object — tidy.zoo","text":"tibble::tibble() columns: index Index (.e. date time) `ts` `zoo` object. series Name series (present multivariate time series). value value/estimate component. Results data reshaping.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy.zoo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) zoo object — tidy.zoo","text":"","code":"# load libraries for models and data library(zoo) library(ggplot2) set.seed(1071) # generate data Z.index <- as.Date(sample(12450:12500, 10)) Z.data <- matrix(rnorm(30), ncol = 3) colnames(Z.data) <- c(\"Aa\", \"Bb\", \"Cc\") Z <- zoo(Z.data, Z.index) # summarize model fit with tidiers + visualization tidy(Z) #> # A tibble: 30 × 3 #> index series value #> #> 1 2004-02-02 Aa -0.537 #> 2 2004-02-02 Bb 0.746 #> 3 2004-02-02 Cc -0.634 #> 4 2004-02-06 Aa -0.586 #> 5 2004-02-06 Bb -0.0779 #> 6 2004-02-06 Cc 0.0397 #> 7 2004-02-08 Aa -0.289 #> 8 2004-02-08 Bb -1.11 #> 9 2004-02-08 Cc -0.341 #> 10 2004-02-12 Aa 1.85 #> # ℹ 20 more rows ggplot(tidy(Z), aes(index, value, color = series)) + geom_line() ggplot(tidy(Z), aes(index, value)) + geom_line() + facet_wrap(~series, ncol = 1) Zrolled <- rollmean(Z, 5) ggplot(tidy(Zrolled), aes(index, value, color = series)) + geom_line()"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) Gam object — tidy.Gam","title":"Tidy a(n) Gam object — tidy.Gam","text":"Tidy summarizes information components model. model component might single term regression, single hypothesis, cluster, class. Exactly tidy considers model component varies across models usually self-evident. model several distinct types components, need specify components return.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) Gam object — tidy.Gam","text":"","code":"# S3 method for class 'Gam' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) Gam object — tidy.Gam","text":"x Gam object returned call gam::gam(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) Gam object — tidy.Gam","text":"Tidy gam objects created calls mgcv::gam() tidy.gam().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) Gam object — tidy.Gam","text":"tibble::tibble() columns: df Degrees freedom used term model. meansq Mean sum squares. Equal total sum squares divided degrees freedom. p.value two-sided p-value associated observed statistic. statistic value T-statistic use hypothesis regression term non-zero. sumsq Sum squares explained term. term name regression term.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_gam_hastie.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) Gam object — tidy.Gam","text":"","code":"# load libraries for models and data library(gam) #> Loading required package: splines #> Loading required package: foreach #> #> Attaching package: ‘foreach’ #> The following objects are masked from ‘package:purrr’: #> #> accumulate, when #> Loaded gam 1.22-5 #> #> Attaching package: ‘gam’ #> The following objects are masked from ‘package:mgcv’: #> #> gam, gam.control, gam.fit, s # fit model g <- gam(mpg ~ s(hp, 4) + am + qsec, data = mtcars) # summarize model fit with tidiers tidy(g) #> # A tibble: 4 × 6 #> term df sumsq meansq statistic p.value #> #> 1 s(hp, 4) 1 678. 678. 94.4 5.73e-10 #> 2 am 1 113. 113. 15.7 5.52e- 4 #> 3 qsec 1 0.0263 0.0263 0.00366 9.52e- 1 #> 4 Residuals 25.0 180. 7.19 NA NA glance(g) #> # A tibble: 1 × 7 #> df logLik AIC BIC deviance df.residual nobs #> #> 1 7.00 -76.0 162. 169. 180. 25.0 32"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) irlba object masquerading as list — tidy_irlba","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"","code":"tidy_irlba(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"x list returned irlba::irlba(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"tibble::tibble columns depending component PCA tidied. matrix \"u\", \"samples\", \"scores\", \"x\" row tidied output corresponds original data PCA space. columns : row ID original observation (.e. rowname original data). PC Integer indicating principal component. value score observation particular principal component. , location observation PCA space. matrix \"v\", \"rotation\", \"loadings\" \"variables\", row tidied output corresponds information principle components original space. columns : row variable labels (colnames) data set PCA performed. PC integer vector indicating principal component. value value eigenvector (axis score) indicated principal component. matrix \"d\", \"eigenvalues\" \"pcs\", columns : PC integer vector indicating principal component. std.dev Standard deviation explained PC. percent Fraction variation explained component (numeric value 0 1). cumulative Cumulative fraction variation explained principle components component (numeric value 0 1).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"thin wrapper around tidy_svd().","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_irlba.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) irlba object masquerading as list — tidy_irlba","text":"","code":"library(modeldata) data(hpc_data) mat <- scale(as.matrix(hpc_data[, 2:5])) s <- svd(mat) tidy_u <- tidy(s, matrix = \"u\") tidy_u #> # A tibble: 17,324 × 3 #> row PC value #> #> 1 1 1 0.00403 #> 2 2 1 -0.00436 #> 3 3 1 -0.00196 #> 4 4 1 -0.00444 #> 5 5 1 -0.00437 #> 6 6 1 -0.00437 #> 7 7 1 -0.00431 #> 8 8 1 -0.00436 #> 9 9 1 -0.00434 #> 10 10 1 -0.00440 #> # ℹ 17,314 more rows tidy_d <- tidy(s, matrix = \"d\") tidy_d #> # A tibble: 4 × 4 #> PC std.dev percent cumulative #> #> 1 1 69.5 0.279 0.279 #> 2 2 67.0 0.259 0.538 #> 3 3 63.9 0.235 0.774 #> 4 4 62.6 0.226 1 tidy_v <- tidy(s, matrix = \"v\") tidy_v #> # A tibble: 16 × 3 #> column PC value #> #> 1 1 1 0.657 #> 2 2 1 0.409 #> 3 3 1 -0.577 #> 4 4 1 0.262 #> 5 1 2 -0.0142 #> 6 2 2 -0.650 #> 7 3 2 -0.137 #> 8 4 2 0.747 #> 9 1 3 -0.302 #> 10 2 3 -0.332 #> 11 3 3 -0.779 #> 12 4 3 -0.438 #> 13 1 4 -0.690 #> 14 2 4 0.548 #> 15 3 4 -0.205 #> 16 4 4 0.426 library(ggplot2) library(dplyr) ggplot(tidy_d, aes(PC, percent)) + geom_point() + ylab(\"% of variance explained\") tidy_u %>% mutate(class = hpc_data$class[row]) %>% ggplot(aes(class, value)) + geom_boxplot() + facet_wrap(~PC, scale = \"free_y\")"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) optim object masquerading as list — tidy_optim","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"","code":"tidy_optim(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"x list returned stats::optim(). ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"function assumes provided objective function negative log-likelihood function. Results invalid incorrect function supplied. tidy(o) glance(o)","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"tibble::tibble() columns: parameter parameter modeled. std.error standard error regression term. value value/estimate component. Results data reshaping. std.error provided column Hessian calculated.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_optim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) optim object masquerading as list — tidy_optim","text":"","code":"f <- function(x) (x[1] - 2)^2 + (x[2] - 3)^2 + (x[3] - 8)^2 o <- optim(c(1, 1, 1), f)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) svd object masquerading as list — tidy_svd","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"","code":"tidy_svd(x, matrix = \"u\", ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"x list components u, d, v returned base::svd(). matrix Character specifying component PCA tidied. \"u\", \"samples\", \"scores\", \"x\": returns information map original space principle components space. \"v\", \"rotation\", \"loadings\" \"variables\": returns information map principle components space back original space. \"d\", \"eigenvalues\" \"pcs\": returns information eigenvalues. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"tibble::tibble columns depending component PCA tidied. matrix \"u\", \"samples\", \"scores\", \"x\" row tidied output corresponds original data PCA space. columns : row ID original observation (.e. rowname original data). PC Integer indicating principal component. value score observation particular principal component. , location observation PCA space. matrix \"v\", \"rotation\", \"loadings\" \"variables\", row tidied output corresponds information principle components original space. columns : row variable labels (colnames) data set PCA performed. PC integer vector indicating principal component. value value eigenvector (axis score) indicated principal component. matrix \"d\", \"eigenvalues\" \"pcs\", columns : PC integer vector indicating principal component. std.dev Standard deviation explained PC. percent Fraction variation explained component (numeric value 0 1). cumulative Cumulative fraction variation explained principle components component (numeric value 0 1).","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"See https://stats.stackexchange.com/questions/134282/relationship--svd--pca---use-svd--perform-pca information interpret various tidied matrices. Note SVD equivalent PCA centered data.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_svd.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) svd object masquerading as list — tidy_svd","text":"","code":"library(modeldata) data(hpc_data) mat <- scale(as.matrix(hpc_data[, 2:5])) s <- svd(mat) tidy_u <- tidy(s, matrix = \"u\") tidy_u #> # A tibble: 17,324 × 3 #> row PC value #> #> 1 1 1 0.00403 #> 2 2 1 -0.00436 #> 3 3 1 -0.00196 #> 4 4 1 -0.00444 #> 5 5 1 -0.00437 #> 6 6 1 -0.00437 #> 7 7 1 -0.00431 #> 8 8 1 -0.00436 #> 9 9 1 -0.00434 #> 10 10 1 -0.00440 #> # ℹ 17,314 more rows tidy_d <- tidy(s, matrix = \"d\") tidy_d #> # A tibble: 4 × 4 #> PC std.dev percent cumulative #> #> 1 1 69.5 0.279 0.279 #> 2 2 67.0 0.259 0.538 #> 3 3 63.9 0.235 0.774 #> 4 4 62.6 0.226 1 tidy_v <- tidy(s, matrix = \"v\") tidy_v #> # A tibble: 16 × 3 #> column PC value #> #> 1 1 1 0.657 #> 2 2 1 0.409 #> 3 3 1 -0.577 #> 4 4 1 0.262 #> 5 1 2 -0.0142 #> 6 2 2 -0.650 #> 7 3 2 -0.137 #> 8 4 2 0.747 #> 9 1 3 -0.302 #> 10 2 3 -0.332 #> 11 3 3 -0.779 #> 12 4 3 -0.438 #> 13 1 4 -0.690 #> 14 2 4 0.548 #> 15 3 4 -0.205 #> 16 4 4 0.426 library(ggplot2) library(dplyr) ggplot(tidy_d, aes(PC, percent)) + geom_point() + ylab(\"% of variance explained\") tidy_u %>% mutate(class = hpc_data$class[row]) %>% ggplot(aes(class, value)) + geom_boxplot() + facet_wrap(~PC, scale = \"free_y\")"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy a(n) xyz object masquerading as list — tidy_xyz","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"Broom tidies number lists effectively S3 objects without class attribute. example, stats::optim(), svd() interp::interp() produce consistent output, class attribute, handled S3 dispatch. functions look elements list determine appropriate tidying method apply list. tidiers implemented functions form tidy_ glance_ exported (documented!). appropriate tidying method found, throw error. xyz lists (lists x y vectors coordinates z matrix values) typically used functions graphics::persp() graphics::image() returned interpolation functions interp::interp().","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"","code":"tidy_xyz(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"x list component x, y z, x y vectors z matrix. length x must equal number rows z length y must equal number columns z. ... Additional arguments. used. Needed match generic signature . Cautionary note: Misspelled arguments absorbed ..., ignored. misspelled argument default value, default value used. example, pass conf.lvel = 0.9, computation proceed using conf.level = 0.95. Two exceptions : tidy() methods warn supplied exponentiate argument ignored. augment() methods warn supplied newdata argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"tibble::tibble vector columns x, y z.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/tidy_xyz.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy a(n) xyz object masquerading as list — tidy_xyz","text":"","code":"A <- list(x = 1:5, y = 1:3, z = matrix(runif(5 * 3), nrow = 5)) image(A) tidy(A) #> # A tibble: 15 × 3 #> x y z #> #> 1 1 1 0.527 #> 2 2 1 0.191 #> 3 3 1 0.355 #> 4 4 1 0.907 #> 5 5 1 0.141 #> 6 1 2 0.911 #> 7 2 2 0.590 #> 8 3 2 0.625 #> 9 4 2 0.225 #> 10 5 2 0.752 #> 11 1 3 0.362 #> 12 2 3 0.674 #> 13 3 3 0.268 #> 14 4 3 0.591 #> 15 5 3 0.443"},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":null,"dir":"Reference","previous_headings":"","what":"Tidy atomic vectors — tidy.numeric","title":"Tidy atomic vectors — tidy.numeric","text":"Vector tidiers deprecated removed upcoming release broom.","code":""},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tidy atomic vectors — tidy.numeric","text":"","code":"# S3 method for class 'numeric' tidy(x, ...) # S3 method for class 'character' tidy(x, ...) # S3 method for class 'logical' tidy(x, ...)"},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tidy atomic vectors — tidy.numeric","text":"x object class \"numeric\", \"integer\", \"character\", \"logical\". likely named vector ... Extra arguments (used)","code":""},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tidy atomic vectors — tidy.numeric","text":"Turn atomic vectors data frames, names vector (exist) column values vector column.","code":""},{"path":[]},{"path":"https://broom.tidymodels.org/dev/reference/vector_tidiers.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tidy atomic vectors — tidy.numeric","text":"","code":"if (FALSE) { # \\dontrun{ x <- 1:5 names(x) <- letters[1:5] tidy(x) } # }"},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-development-version","dir":"Changelog","previous_headings":"","what":"broom (development version)","title":"broom (development version)","text":"Migrated messages, warnings, errors use cli package (#1230). Aligned names source test files (#1229). Transitioned third edition testthat (#1228). tidy.coeftest now returns non-NA values conf.low conf.high model fitted constant term cluster robust std errors computed using vcovCL sandwich (#1227).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-107","dir":"Changelog","previous_headings":"","what":"broom 1.0.7","title":"broom 1.0.7","text":"CRAN release: 2024-09-26 Corrected nobs entries glance.coxph() output: package used return length(object$linear.predictors) (equal n rather nevent) now uses survival’s method (#1224). Corrected confidence interval values tidy.boot() addressed errors bootstrapping confidence intervals multiple terms (#1212). Reverted deprecation tidiers objects margins package now package back CRAN (#1220). Addressed failure tidy.anova() ahead upcoming car release (#1215). Clarified documentation number cases dots documented unused actually passed internal functions (#1214). Addressed error augment.betareg() augment.betamfx() data = NULL non-null newdata (#1216, #1218). glance.lm() now returns non-NA values statistic, p.value, df models fitted single predictor intercept (@jrob95, #1209).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-106","dir":"Changelog","previous_headings":"","what":"broom 1.0.6","title":"broom 1.0.6","text":"CRAN release: 2024-05-17","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-features-1-0-6","dir":"Changelog","previous_headings":"","what":"New Features","title":"broom 1.0.6","text":"Added support conf.level augment.lm() (#1191 @zietzm). Added support columns adj.r.squared npar glance() method objects outputted mgcv::gam() (#1172).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"deprecations-1-0-6","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"broom 1.0.6","text":"Soft-deprecated tidiers margins objects, package archived CRAN April 2024. case package back CRAN next package release, broom Suggest test support package (#1200). Moved forward deprecation tidiers objects sp package. See resources linked tidymodels/broom#1142 information migration retiring spatial packages.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"bug-fixes-1-0-6","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"broom 1.0.6","text":"broom release contains changes tidy.survfit() method objects survival package, package bumped minimum required version survival. survival 3.6-4, tidy.survfit() propagated “inconsistent” n.censor values survival multi-state models (#1195). Corrected confidence interval values precision components tidy.betareg() output (#1169). Fixed bug tidier car::linearHypothesis() output long formulas (#1171). Corrected coefficient values tidy.varest() output (#1174).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-105","dir":"Changelog","previous_headings":"","what":"broom 1.0.5","title":"broom 1.0.5","text":"CRAN release: 2023-06-09 tidy.coxph() now pass ellipses ... summary() internally (#1151 @ste-tuf). Transitioned deprecation region argument tidy.SpatialPolygonsDataFrame warn- hard-deprecation (#1142). Removed maptools rgeos Suggested packages ahead retirement. sp tidiers removed future release package (#1142). Addressed bug mlogit tidiers augment.mlogit() fail supplied model fitted non-default dfidx() (#1156 @gregmacfarlane). Addressed bug ANOVA tidiers tidy.anova() fail passed model many predictors (#1159 @jwilliman). Addressed warnings ANOVA tidiers unrecognized column names Resid..Df, Resid..Dev, Deviance; columns renamed df.residual, residual.deviance, deviance, respectively (#1159 @jwilliman).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-104","dir":"Changelog","previous_headings":"","what":"broom 1.0.4","title":"broom 1.0.4","text":"CRAN release: 2023-03-10 Added intercept argument tidy.aov(), logical indicating whether include information intercept first row results (#1144 @victor-vscn). Moved forward soft-deprecation tidiers objects sp package ahead retirement rgeos maptools packages later year. sp tidiers removed future release package (#1142). Fixed bug augment.glm() .std.resid column always contained standardized deviance residuals regardless value passed type.residuals argument (#1147).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-103","dir":"Changelog","previous_headings":"","what":"broom 1.0.3","title":"broom 1.0.3","text":"CRAN release: 2023-01-25 Addressed test failures R-devel. Fixed bug tidy.multinom() conf.level argument ignored.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-102","dir":"Changelog","previous_headings":"","what":"broom 1.0.2","title":"broom 1.0.2","text":"CRAN release: 2022-12-15 default data argument augment.coxph() augment.survreg() transitioned NULL model.frame(x) (#1126 @capnrefsmmat). Migrated ‘ggplot2’ strong weak dependency, .e. moved Imports Suggests. Fixed bug augment() results include residuals response term included function call (#1121, #946, #937, #124).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-101","dir":"Changelog","previous_headings":"","what":"broom 1.0.1","title":"broom 1.0.1","text":"CRAN release: 2022-08-29 Improves performance tidy.lm() tidy.glm() full-rank fits (#1112 @capnrefsmmat). Moves forward deprecation tidiers sparse matrices outputted Matrix package, initially soft-deprecated broom 0.5.0. Matrix tidiers light wrappers around coercion methods now deprecated Matrix upcoming 1.4-2 release. affected methods tidy.sparseMatrix(), tidy.dgCMatrix(), tidy.dgTMatrix(). Note tidy.confusionMatrix(), relevant objects outputted caret package, unaffected (#1113). tidy.anova() works anova objects lme4 package (broken addition terms column previous release)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-100","dir":"Changelog","previous_headings":"","what":"broom 1.0.0","title":"broom 1.0.0","text":"CRAN release: 2022-07-01 broom 1.0.0 first “production” release broom package, includes number notable changes functionality governance. release, broom team following set guidelines clarify scope development package. Given package’s wide use long history, guidelines prioritize backward compatibility internal consistency completeness. can read guidelines ! ’ve also made notable changes error handling release: tidy() methods now warn supplied exponentiate argument ignored. augment() methods now warn supplied newdata argument ignored. warning regarding tidiers maintained via dispatch lm glm now displayed per session, per unique dispatch. , class_a object tidied using (g)lm method, broom warn tidying class_a objects rest session, class_b object tidied using (g)lm method session, broom warn (#1101). fixes improvements: Add exponentiate argument tidy.boot() (#1039). Update tidy.htest() converting matrix-columns vector-columns (#1081). Address failures tidy.glht() conf.int = TRUE (#1103). Address failures tidy.zoo() input data colnames (#1080). Transition tidiers bivariate linear spline-based interpolation—using list tidiers interface objects akima package now considered -label. See interp package FOSS alternative. Address failures tidy.svyolr() p.values = TRUE. Instead aliasing tidy.polr() directly, tidy.svyolr() lightly wraps method warns p.values supplied (#1107). Adds term column introduces support car::lht() output tidy.anova() (#1106 @grantmcdermott). Adds dedicated glance.anova method (previously dispatched deprecated glance.data.frame() tidier, #1106 @grantmcdermott).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-080","dir":"Changelog","previous_headings":"","what":"broom 0.8.0","title":"broom 0.8.0","text":"CRAN release: 2022-04-13 update makes significant improvements documentation, fixes number bugs, brings development flow package date packages tidymodels. big picture, release: tidiers now example code demonstrating usage documentation. Tidiers base packages well selected others also include sample code visualization results ggplot2. Code examples documentation largely now follow consistent style—changes made largely reflect tidyverse style guide, addressing spacing, object naming, commenting, among things. Examples previously marked \\dontrun \\donttest workshopped run reliably. Clarifies errors warnings deprecated unmaintained tidiers. Ensures tidiers placed files named according model-supplying package rather model object class easier navigability source code.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"bug-fixes-and-other-improvements-0-8-0","dir":"Changelog","previous_headings":"","what":"Bug fixes and other improvements","title":"broom 0.8.0","text":"Fix glance.fixest error model includes fixed effects regressors (#1018 @arcruz0, #1088 @vincentarelbundock). Address excessive messaging tidy.speedlm (#1084 @cgoo4, #1087 @vincentarelbundock). Add nobs column output glance.svyglm (#1085 @fschaffner, #1086 @vincentarelbundock). Ensure tidy.prcomp description entries use consistent punctuation (#1072 @PursuitOfDataScience). Address breaking changes glance.fixest tidy.btergm. Simplify handling MASS::polr output corresponding tidy augment methods. Align continuous integration current standards tidymodels packages.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-0712","dir":"Changelog","previous_headings":"","what":"broom 0.7.12","title":"broom 0.7.12","text":"CRAN release: 2022-01-28 Nearly identical source broom 0.7.11—updates maintainer email address address listed CRAN packages maintained person.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-0711","dir":"Changelog","previous_headings":"","what":"broom 0.7.11","title":"broom 0.7.11","text":"CRAN release: 2022-01-03 Addressed issue ordering original observations augment.rqs. Now function preserves original data.frame names also input data.frame one column (#1052 @ilapros). Addressed warning tidy.rma x$ddf length greater 1 (#1064 @wviechtb). Fix errors glance.lavaan anticipation upcoming tidyr release (#1067 @DavisVaughan). Corrected confidence interval tidy.crr(). tidy.crr(conf.level=) argument previously ignored (#1068 @ddsjoberg).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-0710","dir":"Changelog","previous_headings":"","what":"broom 0.7.10","title":"broom 0.7.10","text":"CRAN release: 2021-10-31 Clarifies error pysch::mediate output dispatched tidy.mediate (#1037 @LukasWallrich). Allows user specify confidence level tidy.rma (#1041 @TarenSanders) Clarifies documentation related usage augment_columns(); package users use augment() favor augment_columns(). See ?augment_columns details. Extends support emmeans fixing non-standard column names case asymptotically derived inferential statistics. (#1046 @crsh) Fixes use index columns augment.mlogit adds .resid column output. (#1045, #1053, #1055, #1056 @jamesrrae @gregmacfarlane) Correct column naming standard error measures glance.survfit(). Various bug fixes improvements documentation.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-079","dir":"Changelog","previous_headings":"","what":"broom 0.7.9","title":"broom 0.7.9","text":"CRAN release: 2021-07-27 Fixes confidence intervals tidy.crr(), previously exponentiated exponentiate = FALSE (#1023 @leejasme) Deprecates Rchoice tidiers, newest 0.3-3 release requires R 4.0+ re-export needed generics. Updates ergm tidiers anticipation changes later releases. (#1034 @krivit)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-078","dir":"Changelog","previous_headings":"","what":"broom 0.7.8","title":"broom 0.7.8","text":"CRAN release: 2021-06-24 Fixed bug glance.ergm related handling MCMC details. Address breakages unit tests {fixest} tidiers.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-077","dir":"Changelog","previous_headings":"","what":"broom 0.7.7","title":"broom 0.7.7","text":"CRAN release: 2021-06-13 Fixed bug tidy.epi.2by2 resulted errors new version epiR (#1028 @nt-williams) Added exponentiate argument tidy.gam() tidier applicable parametric terms (#1013 @ddsjoberg) Added exponentiate argument tidy.negbin() tidier (#1011 @ddsjoberg) Fixed failures spdep tidiers following breaking changes recent release Various bug fixes improvements documentation","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-076","dir":"Changelog","previous_headings":"","what":"broom 0.7.6","title":"broom 0.7.6","text":"CRAN release: 2021-04-05 Fixed bug augment tidiers resulting .fitted .se.fit array columns. Fixed bug made column y non-numeric tidy_xyz (#973 @jiho) Added tidiers MASS:glm.nb (#998 @joshyam-k) Fixed bug tidy.fixest sometimes prevented arguments like se used (#1001 @karldw) Fixed bug tidy.fixest resulted errors columns name x present (#1007 @grantmcdermott) Moved forward planned deprecation gamlss tidiers favor provided broom.mixed Various bug fixes improvements documentation","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-075","dir":"Changelog","previous_headings":"","what":"broom 0.7.5","title":"broom 0.7.5","text":"CRAN release: 2021-02-19 Fixed bug nnet::multinom tidier case response variable two levels (#993 @vincentarelbundock @hughjonesd) Various bug fixes improvements documentation","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-074","dir":"Changelog","previous_headings":"","what":"broom 0.7.4","title":"broom 0.7.4","text":"CRAN release: 2021-01-29 broom 0.7.4 introduces tidier support number new model objects improves functionality many existing tidiers!","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-tidiers-0-7-4","dir":"Changelog","previous_headings":"","what":"New Tidiers","title":"broom 0.7.4","text":"Add tidiers Rchoice objects (#961 @vincentarelbundock @Nateme16) Add tidiers objects produced car::leveneTest (#968 @vincentarelbundock @mkirzon) Add tidiers objects produced cmprsk::crr (#971 #552 @vincentarelbundock @margarethannum) Add augment() method gam objects (#975 #645 @vincentarelbundock) Add tidiers vars objects (#979 #161 @vincentarelbundock @Diego-MX) release also restores tidiers felm objects lfe package, recently unarchived CRAN.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"improvements-to-existing-tidiers-0-7-4","dir":"Changelog","previous_headings":"","what":"Improvements to existing tidiers","title":"broom 0.7.4","text":"tidy.emmGrid can now return std.error conf.* columns time. (#962 @vincentarelbundock @jmbarbone) tidy.garch can now produce confidence intervals (#964 @vincentarelbundock @IndrajeetPatil) tidy.coxph can now report confidence intervals models utilizing penalized/clustering terms (#966 @vincentarelbundock @matthieu-faron) augment.lm now works regression weights equal zero (#965 @vincentarelbundock @vnijs) tidy.coxph can now handle models utilizing penalized/clustering terms (#966 #969 @vincentarelbundock, @matthieu-faron, @KZARCA) Fix bug tidy.speedglm R 4.0.0+ (#974 @uqzwang) tidy.multinom works matrix response (#977 #666 @vincentarelbundock @atyre2) Various bug fixes improvements documentation errors.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-073","dir":"Changelog","previous_headings":"","what":"broom 0.7.3","title":"broom 0.7.3","text":"CRAN release: 2020-12-16 broom 0.7.0, introduced error model objects subclassed lm relied tidy.lm(), similarly tidy.glm(). Tidiers objects supported unintentionally, worried tidiers objects silently report inaccurate results. hindsight, change unnecessarily abrupt. ’ve decided roll back change, instead providing following warning allowing objects fall back lm/glm tidier methods: Tidiers objects class {subclass} maintained broom team, supported {dispatched_method} tidier method. Please cautious interpreting reporting broom output.” addition, Restores tidiers summary.lm objects (#953 @grantmcdermott) Deprecate tidiers lfe package, archived CRAN. Various bug fixes improvements documentation errors.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-072","dir":"Changelog","previous_headings":"","what":"broom 0.7.2","title":"broom 0.7.2","text":"CRAN release: 2020-10-20 Various bug fixes improvements documentation errors.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-071","dir":"Changelog","previous_headings":"","what":"broom 0.7.1","title":"broom 0.7.1","text":"CRAN release: 2020-10-01 broom 0.7.1 minor release, includes number exciting new features bug fixes!","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-tidiers-0-7-1","dir":"Changelog","previous_headings":"","what":"New tidiers","title":"broom 0.7.1","text":"Add tidiers margins objects. (#700 @grantmcdermott) Added tidier methods mlogit objects (#887 @gregmacfarlane) Add glance.coeftest() method (#932 @grantmcdermott)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"improvements-to-existing-tidiers-0-7-1","dir":"Changelog","previous_headings":"","what":"Improvements to existing tidiers","title":"broom 0.7.1","text":"One major improvements release addition interval argument augment methods confidence, prediction, credible intervals. columns consistently labeled .lower .upper! (#908 @grantmcdermott, #925 @bwiernik) addition… Extended glance.aov() method include r.squared column! glance.survfit() now passes ... summary.survfit() allow adjustment RMST measures (#880 @vincentarelbundock) Several unsupported model objects subclass glm lm now error informatively. number improvements documentation throughout package.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"bug-fixes-0-7-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"broom 0.7.1","text":"Fixed newdata warning message augment.*() output newdata didn’t contain response variable—augment methods longer expect response variable supplied newdata argument. (#897 @rudeboybert) Fixed bug related tidy.geeglm() sensitive exponentiate argument (#867) Fixed augment.fixest() returning residuals .fitted column. method also now takes type.residuals argument defaults type.predict argument fixest predict() method. (#877 @karldw) Fix tidy.felm confidence interval bug. Replaces “robust” argument “se.type”. (#919 @grantmcdermott; supersedes #818 @kuriwaki) Fix bug tidy.drc() term labels result overwriting entries curve column (#914) Fixed bug related univariate zoo series tidy.zoo() (#916 @WillemVervoort) Fixed bug related tidy.prcomp() assigning wrong PC labels “loadings” “scores” matrices (#910 @tavareshugo) Fixed tidy.polr() bug p-values returned exponentiate = FALSE.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"deprecations-0-7-1","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"broom 0.7.1","text":"followed planned deprecation character vector tidiers release. vector tidiers soft-deprecated 0.7.0 fully deprecated later release.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-070","dir":"Changelog","previous_headings":"","what":"broom 0.7.0","title":"broom 0.7.0","text":"CRAN release: 2020-07-09 broom 0.7.0 major release large number new tidiers, soft-deprecations, planned hard-deprecations functions arguments.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"big-picture-changes-0-7-0","dir":"Changelog","previous_headings":"","what":"Big picture changes","title":"broom 0.7.0","text":"changed report degrees freedom lm objects (#212, #273). especially important instructors statistics courses. Previously df column glance.lm() reported rank design matrix. Now reports degrees freedom numerator overall F-statistic. equal rank model matrix minus one (unless omit intercept column), new df old df minus one. moving away supporting summary.*() objects. particular, removed tidy.summary.lm() part major overhaul internals. Instead calling tidy() summary-like objects, please call tidy() directly model objects moving forward. removed support quick argument tidy() methods. simplify internals maintainability purposes. anticipate influence many users people seemed use . majorly cramps style, let us know, considering new verb return model parameters. meantime, stats::coef() together tibble::enframe() provides functionality tidy(..., quick = TRUE). conf.int arguments now default FALSE, conf.level arguments now default 0.95. primarily affect tidy.survreg(), previously always returned confidence intervals, although others. Tidiers emmeans-objects use arguments conf.int conf.level instead relying argument names native emmeans::summary()-methods (.e., infer level). Similarly, multcomp-tidiers now include call summary() previous behavior akin setting now removed argument quick = TRUE. families tidiers now use adj.p.value column name appropriate. Finally, emmeans-, multcomp-, TukeyHSD-tidiers now consistently use column names contrast null.value instead comparison, level1 level2, lhs rhs (see #692).","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"deprecations-0-7-0","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"broom 0.7.0","text":"release broom soft-deprecates following functions tidier methods: Tidier methods data frames, rowwise data frames, vectors matrices bootstrap() confint_tidy() fix_data_frame() finish_glance() augment.glmRob() tidy.table() tidy.ftable() deprecated favor tibble::as_tibble() tidy.summaryDefault() glance.summaryDefault() deprecated favor skimr::skim() also gone forward planned mixed model deprecations, removed following methods, now live broom.mixed: tidy.brmsfit() tidy.merMod(), glance.merMod(), augment.merMod() tidy.lme(), glance.lme(), augment.lme() tidy.stanreg(), glance.stanreg() tidyMCMC(), tidy.rjags(), tidy.stanfit()","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"minor-breaking-changes-0-7-0","dir":"Changelog","previous_headings":"","what":"Minor breaking changes","title":"broom 0.7.0","text":"augment.factanal() now returns tibble columns names .fs1, .fs2, …, instead factor1, factor2, … (#650) renamed output augment.htest(). particular, renamed .residuals column .resid .stdres .std.resid consistency. changes affect chi-squared tests. tidy.ridgelm() now always return GCV column never returns xm column. (#533 @jmuhlenkamp) tidy.dist() longer supports upper argument.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"a-refactoring-of-augment-methods-0-7-0","dir":"Changelog","previous_headings":"","what":"A refactoring of augment() methods","title":"broom 0.7.0","text":"internals augment.*() methods largely overhauled. pass dataset augment() via data newdata arguments, now guaranteed augmented dataset exactly number rows original dataset. differs previous behavior primarily missing values. Previously augment() drop rows containing NA. longer case. augment.*() methods longer accept na.action argument. previous versions, several augment.*() methods inherited augment.lm() method, required additions augment.lm() method . shifted away approach favor re-implementing many augment.*() methods standalone methods making use internal helper functions. result, augment.lm() related methods deprecated (previously unused) arguments. augment() tries give informative error data isn’t original training data. .resid column output augment().* methods now consistently defined y - y_hat","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-tidiers-0-7-0","dir":"Changelog","previous_headings":"","what":"New tidiers","title":"broom 0.7.0","text":"anova objects car package (#754) pam objects cluster package (#637 @abbylsmith) drm objects drc package (#574 @edild) summary_emm objects emmeans package (#691 @crsh) epi.2by2 objects epiR package (#711) fixest objects fixest package (#785 @karldw) regsubsets objects leaps package (#535) lm.beta objects lm.beta package (#545 @mattle24) rma objects metafor package (#674 @malcolmbarrett, @softloud) mfx, logitmfx, negbinmfx, poissonmfx, probitmfx, betamfx objects themfx package (#700 @grantmcdermott) lmrob glmrob objects robustbase package (#205, #505) sarlm objects spatialreg package (#847 @gregmacfarlane @petrhrobar) speedglm objects speedglm package (#685) svyglm objects survey package (#611) systemfit objects systemfit package (@jaspercooper) restored simplified version glance.aov(), used inherit glance.lm() method now contains following columns: logLik, AIC, BIC, deviance, df.residual, nobs (see #212). Note tidy.aov() gives complete information degrees freedom aov object.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"improvements-to-existing-tidiers-0-7-0","dir":"Changelog","previous_headings":"","what":"Improvements to existing tidiers","title":"broom 0.7.0","text":"tidy.felm() now robust = TRUE/FALSE option supports robust cluster standard errors. (#781 @kuriwaki) Make .fitted values respect type.predict argument augment.clm(). (#617) Return factor rather numeric class predictions .fitted augment.polr(). (#619) Add option return p.values tidy.polr(). (#833 @LukasWallrich) tidy.kmeans() now uses names input variables output default. Set col.names = NULL recover old behavior. Previously, F-statistics weak instruments returned glance.ivreg(). F-statistics now returned tidy.ivreg(instruments = TRUE). Default tidy.ivreg(instruments = FALSE). glance.ivreg() still returns Wu-Hausman Sargan test statistics. glance.biglm() now returns df.residual column. tidy.prcomp() argument matrix gained new options \"scores\", \"loadings\", \"eigenvalues\". (#557 @GegznaV) tidy_optim() now provides standard error Hessian present. (#529 @billdenney) tidy.htest() column names now run make.names() ensure syntactic correctness. (#549 @karissawhiting) tidy.lmodel2() now returns p.value column. (#570) tidy.lsmobj() gained conf.int argument consistency tidiers. tidy.polr() now returns p-values p.values set TRUE model contain factors two levels. tidy.zoo() now doesn’t change column names spaces special characters (previously converted data.frame friendly column names make.names.) glance.lavaan() now uses lavaan extractor functions instead subsetting fit object manually. (#835) glance.lm() longer errors intercept provided explanatory variable. (#865)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"bug-fixes-0-7-0","dir":"Changelog","previous_headings":"Improvements to existing tidiers","what":"Bug fixes","title":"broom 0.7.0","text":"Bug fix tidy.survreg() robust set TRUE model fitting (#842, #728) Bug fixes glance.lavaan(): address confidence interval error (#577) correct reported nobs norig (#835) Bug fix muhaz tidiers ensure output always tibble (#824) Several glance.*() methods refactored order return one-row tibble even model matrix rank-deficient (#823) Bug fix return confidence intervals correct tidy.drc() (#798) Added default methods objects subclass glm lm order error informatively. (#749, #736, #708, #186) Bug fix allow augment.kmeans() work masked data (#609) Bug fix allow augment.Mclust() work univariate data (#490) Bug fix allow tidy.htest() supports equal variances (#608) Bug fix better allow tidy.boot() support confidence intervals (#581) Bug fix tidy.polr() passed conf.int = TRUE (#498)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"other-changes-0-7-0","dir":"Changelog","previous_headings":"Improvements to existing tidiers","what":"Other changes","title":"broom 0.7.0","text":"Many glance() methods now return nobs column, contains number data points used fit model! (#597 @vincentarelbundock) tidy() longer checks log logit link exponentiate = TRUE, refactored remove extraneous exponentiate arguments. set exponentiate = TRUE, assume know want exponentiated coefficients (confidence intervals conf.int = TRUE) regardless link function. now use rlang::arg_match() possible instead arg.match() give informative errors argument mismatches. package’s site moved https://broom.tidyverse.org/ https://broom.tidymodels.org/. Revised several vignettes moved tidymodels.org website. existing vignettes now simply link revised versions. Many improvements consistency clarity documentation. Various warnings resulting changes tidyr API v1.0.0 fixed. (#870) Removed dependencies reshape2 superseded functions dplyr. documentation now links help files rather topics.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"for-developers-and-contributors-0-7-0","dir":"Changelog","previous_headings":"","what":"For developers and contributors","title":"broom 0.7.0","text":"Moved core tests modeltests package. Generally, release, broom dev team first ask attempts add tidier methods supporting model object first directed model-owning package. article describing best practices can found {tidymodels} website https://www.tidymodels.org/learn/develop/broom/, continue adding additional resources article develop . case maintainer uninterested taking tidier methods, please note issue PR. Added new vignette discussing implement new tidier methods non-broom packages.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-056","dir":"Changelog","previous_headings":"","what":"broom 0.5.6","title":"broom 0.5.6","text":"CRAN release: 2020-04-20 Fix failing CRAN checks due tibble 3.0.0 release. Removed xergm dependency.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-055","dir":"Changelog","previous_headings":"","what":"broom 0.5.5","title":"broom 0.5.5","text":"CRAN release: 2020-02-29 Remove tidiers robust package drop robust dependency (temporarily)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-054","dir":"Changelog","previous_headings":"","what":"broom 0.5.4","title":"broom 0.5.4","text":"CRAN release: 2020-01-27 Fixes failing CRAN checks joineRML package removed CRAN","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-053","dir":"Changelog","previous_headings":"","what":"broom 0.5.3","title":"broom 0.5.3","text":"CRAN release: 2019-12-14 Fixes failing CRAN checks due new matrix classing R 4.0.0","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-052","dir":"Changelog","previous_headings":"","what":"broom 0.5.2","title":"broom 0.5.2","text":"CRAN release: 2019-04-07 Fixes failing CRAN checks Changes accommodate ergm 3.10 release. tidy.ergm() longer quick argument. old default quick = FALSE now option.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-051","dir":"Changelog","previous_headings":"","what":"broom 0.5.1","title":"broom 0.5.1","text":"CRAN release: 2018-12-05 tidy(), glance() augment() now re-exported generics package.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-050","dir":"Changelog","previous_headings":"","what":"broom 0.5.0","title":"broom 0.5.0","text":"CRAN release: 2018-07-17 Tidiers now return tibble::tibble()s. release also includes several new tidiers, new vignettes large number bug fixes. ’ve also begun rigorously define tidier specifications: ’ve laid part groundwork stricter consistent tidying, new tidier specifications yet complete. appear next release. Additionally, users note process migrating tidying methods mixed models Bayesian models broom.mixed. broom.mixed CRAN yet, mixed model Bayesian tidiers deprecated broom.mixed CRAN. development mixed model tidiers take place broom.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"breaking-changes-0-5-0","dir":"Changelog","previous_headings":"","what":"Breaking changes","title":"broom 0.5.0","text":"Almost tidiers now return tibbles rather data.frames. Deprecated tidying methods, Bayesian mixed model tidiers still return data.frames. Users mostly experience issues using augment situations tibbles stricter data frames. example, specifying model covariates matrix object now error: default data argument data = model.frame(fit) coerced tibble. Another consequence augment.survreg augment.coxph survival package now require user explicitly passes data either data newdata arguments. restrictions relaxed upcoming release broom pending support matrix-columns tibbles. Developers likely experience issues: subsetting tibbles [, returns tibble rather vector. setting rownames tibbles, deprecated. using matrix vector tidiers, now deprecated. handling additional tibble classes tbl_df tbl beyond data.frame class linking defunct documentation files – broom recently moved tidiers roxygen2 template based documentation system.","code":"library(broom) library(quantreg) fit <- rq(stack.loss ~ stack.x, tau = .5) broom::augment(fit) #> Error: Column `stack.x` must be a 1d atomic vector or a list"},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"new-vignettes-0-5-0","dir":"Changelog","previous_headings":"","what":"New vignettes","title":"broom 0.5.0","text":"version broom includes several new vignettes: vignette(\"available-methods\", package = \"broom\") contains table detailing tidying methods available vignette(\"adding-tidiers\", package = \"broom\") -progress guide contributors add new tidiers broom vignette(\"glossary\", package = \"broom\") contains tables describing acceptable argument names column names -progress new specification. Several old vignettes also updated: vignette(\"bootstrapping\", package = \"broom\") now relies rsample package tidyr::nest-purrr::map-tidyr::unnest workflow. now recommended workflow working multiple models, opposed old dplyr::rowwise-dplyr::based workflow.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"deprecations-0-5-0","dir":"Changelog","previous_headings":"","what":"Deprecations","title":"broom 0.5.0","text":"Matrix vector tidiers deprecated favor tibble::as_tibble tibble::enframe Dataframe tidiers rowwise dataframe tidiers deprecated bootstrap() deprecated favor rsample inflate removed broom","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"other-changes-0-5-0","dir":"Changelog","previous_headings":"","what":"Other changes","title":"broom 0.5.0","text":"alpha argument removed quantreg tidy methods separate.levels argument removed tidy.TukeyHSD. obtain effect separate.levels = TRUE, users may tidyr::separate tidying. consistent multcomp tidier behavior. fe.error argument removed tidy.felm. fixed effects tidier, standard errors now always included. diag argument tidy.dist renamed diagonal Advice help beginners make PRs (#397 @karldw) glance support arima objects fit method = \"CSS\" (#396 @josue-rodriguez) bug fix re-enable tidying glmnet objects family = multinomial (#395 @erleholgersen) bug fix allow tidying quantreg intercept models (#378 @erleholgersen) bug fix aovlist objects (#377 @mvevans89) Support glmnetUtils objects (#352 @Hong-Revo) bug fix allow tidy_emmeans handle column names dashes (#351 @bmannakee) augment.felm longer returns .fe_ .comp columns Support saved formulas augment.felm (#347 @ShreyasSingh) confint_tidy now drops rows NA (#345 @atyre2) new tidier caret::confusionMatrix objects (#344 @mkuehn10) Tidiers Kendall::Kendall objects (#343 @cimentadaj) new tidying method car::durbinWatsonTest objects (#341 @mkuehn10) glance throws informative error quantreg:rq models fit multiple tau values (#338 @bfgray3) tidy.glmnet gains ability retain zero-valued coefficients return_zeros argument defaults FALSE (#337 @bfgray3) tidy.manova now retains Residuals row (#334 @jarvisc1) Tidiers ordinal::clm, ordinal::clmm, survey::svyolr MASS::polr ordinal model objects (#332 @larmarange) Support anova objects car::Anova (#325 @mariusbarth) Tidiers tseries::garch models (#323 @wilsonfreitas) Removed dependency psych package (#313 @nutterb) Improved error messages (#303 @michaelweylandt) Compatibility new rstanarm loo packages (#298 @jgabry) Support tidying lists return irlba::irlba truly huge increase unit tests (#267 @dchiu911) Bug fix tidy.prcomp missing labels (#265 @corybrunson) Added pkgdown site https://broom.tidyverse.org/ (#260 @jayhesselberth) Added tidiers AER::ivreg models (#247 @hughjonesd) Added tidiers lavaan package (#233 @puterleat) Added conf.int argument tidy.coxph (#220 @larmarange) Added augment method chi-squared tests (#138 @larmarange) changed default se.type tidy.rq match quantreg::summary.rq() (#404 @ethchr) Added argument quick tidy.plm tidy.felm (#502 #509 @MatthieuStigler) Many small improvements throughout","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"contributors-0-5-0","dir":"Changelog","previous_headings":"","what":"Contributors","title":"broom 0.5.0","text":"Many many thanks following thoughtful comments design, bug reports PRs! community broom contributors kind, supportive insightful look forward working ! @atyre2, @batpigandme, @bfgray3, @bmannakee, @briatte, @cawoodjm, @cimentadaj, @dan87134, @dgrtwo, @dmenne, @ekatko1, @ellessenne, @erleholgersen, @ethchr, @huftis, @IndrajeetPatil, @jacob-long, @jarvisc1, @jenzopr, @jgabry, @jimhester, @josue-rodriguez, @karldw, @kfeilich, @larmarange, @lboller, @mariusbarth, @michaelweylandt, @mine-cetinkaya-rundel, @mkuehn10, @mvevans89, @nutterb, @ShreyasSingh, @stephlocke, @strengejacke, @topepo, @willbowditch, @WillemSleegers, @wilsonfreitas, @MatthieuStigler.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-044","dir":"Changelog","previous_headings":"","what":"broom 0.4.4","title":"broom 0.4.4","text":"CRAN release: 2018-03-29 Fixed gam tidiers work “Gam” objects, due update gam 1.15. fixes failing CRAN tests Improved test coverage (thanks #267 Derek Chiu)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-043","dir":"Changelog","previous_headings":"","what":"broom 0.4.3","title":"broom 0.4.3","text":"CRAN release: 2017-11-20 Changed deprecated dplyr::failwith purrr::possibly augment glance NULLs now return empty data frame Deprecated inflate() function favor tidyr::crossing Fixed confidence intervals gmm tidier (thanks #242 David Hugh-Jones) Fixed bug bootstrap tidiers (thanks #167 Jeremy Biesanz) Fixed tidy.lm quick = TRUE return terms character rather factor (thanks #191 Matteo Sostero) Added tidiers ivreg objects AER package (thanks #245 David Hugh-Jones) Added tidiers survdiff objects survival package (thanks #147 Michał Bojanowski) Added tidiers emmeans emmeans package (thanks #252 Matthew Kay) Added tidiers speedlm speedglm speedglm package (#685, thanks #248 David Hugh-Jones) Added tidiers muhaz objects muhaz package (thanks #251 Andreas Bender) Added tidiers decompose stl objects stats (thanks #165 Aaron Jacobs)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-042","dir":"Changelog","previous_headings":"","what":"broom 0.4.2","title":"broom 0.4.2","text":"CRAN release: 2017-02-13 Added tidiers lsmobj ref.grid objects lsmeans package Added tidiers betareg objects betareg package Added tidiers lmRob glmRob objects robust package Added tidiers brms objects brms package (thanks #149 Paul Buerkner) Fixed tidiers orcutt 2.0 Changed tidy.glmnet filter rows estimate == 0. Updates rstanarm tidiers (thanks #177 Jonah Gabry) Fixed issue survival package 2.40-1 (thanks #180 Marcus Walz)","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-041","dir":"Changelog","previous_headings":"","what":"broom 0.4.1","title":"broom 0.4.1","text":"CRAN release: 2016-06-24 Added AppVeyor, codecov.io, code conduct Changed name “NA’s” column summaryDefault output “na” Fixed tidy.TukeyHSD include term column. Also added separate.levels argument, option separate comparison level1 level2 Fixed tidy.manova use correct column name test (previously, always pillai) Added kde_tidiers tidy kernel density estimates Added orcutt_tidiers tidy results cochrane.orcutt orcutt package Added tidy.dist tidy distance matrix output dist stats package Added tidy glance lmodel2 objects lmodel2 package Added tidiers poLCA objects poLCA package Added tidiers sparse matrices Matrix package Added tidiers prcomp objects Added tidiers Mclust objects Mclust package Added tidiers acf objects Fixed compatible dplyr 0.5, submitted CRAN","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-040","dir":"Changelog","previous_headings":"","what":"broom 0.4.0","title":"broom 0.4.0","text":"CRAN release: 2015-11-30 Added tidiers geeglm, nlrq, roc, boot, bgterm, kappa, binWidth, binDesign, rcorr, stanfit, rjags, gamlss, mle2 objects. Added tidy methods lists, including u, d, v lists svd, x, y, z lists used image persp Added quick argument tidy.lm, tidy.nls, tidy.biglm, create smaller faster version output. Changed rowwise_df_tidiers allow original data saved list column, provided column name augment. required removing data augment S3 signature. Also added tests-rowwise.R Fixed various issues ANOVA output Fixed various issues lme4 output Fixed issues tests caused dev version ggplot2","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-037","dir":"Changelog","previous_headings":"","what":"broom 0.3.7","title":"broom 0.3.7","text":"CRAN release: 2015-05-06 Added tidiers “plm” (panel linear model) objects plm package. Added tidy.coeftest coeftest objects lmtest package. Set tidy.lm work “mlm” (multiple linear model) objects (multiple response columns). Added tidy glance “biglm” “bigglm” objects biglm package. Fixed bug tidy.coxph one-row matrices returned Added tidy.power.htest Added tidy glance summaryDefault objects Added tidiers “lme” (linear mixed effects models) nlme package Added tidy glance multinom objects nnet package.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-036","dir":"Changelog","previous_headings":"","what":"broom 0.3.6","title":"broom 0.3.6","text":"CRAN release: 2015-02-18 Fixed bug tidy.pairwise.htest, now can handle cases grouping variable numeric. Added tidy.aovlist method. added stringr package IMPORTS trim whitespace beginning end term stratum columns. also required adjusting tidy.aov handle strata missing p-values. Set glance.lm work aov objects along lm objects. Added tidy glance matrix objects, tidy.matrix converting matrix data frame rownames included, glance.matrix returning result glance.data.frame. Changed DESCRIPTION Authors@R new format","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-035","dir":"Changelog","previous_headings":"","what":"broom 0.3.5","title":"broom 0.3.5","text":"CRAN release: 2015-01-05 Fixed small bug felm .fitted .resid columns matrices rather vectors. Added tidiers rlm (robust linear model) gam (generalized additive model) objects, including adjustments “lm” tidiers order handle . See ?rlm_tidiers ?gam_tidiers . Removed rownames tidy.cv.glmnet output","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-034","dir":"Changelog","previous_headings":"","what":"broom 0.3.4","title":"broom 0.3.4","text":"CRAN release: 2014-11-23 behavior augment, particularly regard missing data na.exclude argument, use augment_columns function made consistent across following models: lm glm nls merMod (lme4) survreg (survival) coxph (survival) Unit tests tests/testthat/test-augment.R added ensure consistency across models. tidy, augment glance methods added rowwise_df objects, set apply across rows. allows simple patterns : regressions <- mtcars %>% group_by(cyl) %>% (mod = lm(mpg ~ wt, .)) regressions %>% tidy(mod) regressions %>% augment(mod) See ?rowwise_df_tidiers . Added tidy glance methods Arima objects, tidy pairwise.htest objects. Fixes CRAN: change package description title case, removed NOTES, mostly adding globals.R declare global variables. original version published CRAN.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-03","dir":"Changelog","previous_headings":"","what":"broom 0.3","title":"broom 0.3","text":"Tidiers added S3 objects following packages: lme4 glmnet survival zoo felm MASS (ridgelm objects) tidy glance methods data.frames also added, augment.data.frame produces error (rather returning data.frame). stderror changed std.error (affects many functions) consistent broom’s naming conventions columns. function bootstrap added based example, perform common use case bootstrapping models.","code":""},{"path":"https://broom.tidymodels.org/dev/news/index.html","id":"broom-02","dir":"Changelog","previous_headings":"","what":"broom 0.2","title":"broom 0.2","text":"Added “augment” S3 generic various implementations. “augment” something different tidy: adds columns original dataset, including predictions, residuals, cluster assignments. originally described “fortify” ggplot2. Added “glance” S3 generic various implementations. “glance” produces one-row data frame summary, necessary tidy outputs values like R^2 F-statistics. Re-wrote intro broom vignette/README introduce three methods. Wrote new kmeans vignette. Added tidying methods multcomp, sp, map objects (fortify-multcomp, fortify-sp, fortify-map ggplot2). integrates substantial amounts ggplot2 code (permission), added Hadley Wickham author DESCRIPTION.","code":""}]