Convert statistical analysis objects from R into tidy format
OTHER License
Bot releases are hidden (Show)
Added support for conf.level
in augment.lm()
(#1191 by @zietzm
).
Added support for columns adj.r.squared
and npar
in glance()
method for objects outputted from mgcv::gam()
(#1172).
Soft-deprecated tidiers for margins objects, as the package was archived from CRAN in April 2024. In the case that the package is back on CRAN before the next package release, broom will once again Suggest and test support for the package (#1200).
Moved forward with deprecation of tidiers for objects from the sp package. See resources linked in tidymodels/broom#1142 for more information on migration from retiring spatial packages.
While this broom release contains no changes to the tidy.survfit()
method for objects from the survival package, the package has bumped the minimum required version for survival. Before survival 3.6-4, tidy.survfit()
propagated "inconsistent" n.censor
values from survival for multi-state models (#1195).
Corrected confidence interval values for precision components in tidy.betareg()
output (#1169).
Fixed bug in tidier for car::linearHypothesis()
output with long formulas (#1171).
Corrected coefficient values in tidy.varest()
output (#1174).
Published by simonpcouch over 1 year ago
tidy.coxph()
will now pass its ellipses ...
to summary()
internally (#1151 by @ste-tuf
).
Transitioned the deprecation of the region
argument to tidy.SpatialPolygonsDataFrame
from a warn- to a hard-deprecation (#1142).
Removed maptools and rgeos as Suggested packages ahead of their retirement. sp tidiers will be removed from a future release of the package (#1142).
Addressed bug in mlogit tidiers where augment.mlogit()
would fail if supplied a model fitted with a non-default dfidx()
(#1156 by @gregmacfarlane
).
Addressed bug in ANOVA tidiers where tidy.anova()
would fail if passed a model with many predictors (#1159 by @jwilliman
).
Addressed warnings in ANOVA tidiers for unrecognized column names Resid..Df
, Resid..Dev
, and Deviance
; those columns will be renamed df.residual
, residual.deviance
, and deviance
, respectively (#1159 by @jwilliman
).
Published by simonpcouch over 1 year ago
intercept
argument to tidy.aov()
, a logical indicating whether to include information on the intercept as the first row of results (#1144 by @victor-vscn
).augment.glm()
where the .std.resid
column always contained standardized deviance residuals regardless of the value passed to the type.residuals
argument (#1147).Published by simonpcouch over 1 year ago
tidy.multinom()
where the conf.level
argument would be ignored.Published by simonpcouch almost 2 years ago
augment()
results would not include residuals when the response term included a function call (#1121, #946, #937, #124).data
argument for augment.coxph()
and augment.survreg()
has been transitioned from NULL
to model.frame(x)
(#1126 by @capnrefsmmat
).Imports
to Suggests
.Published by simonpcouch about 2 years ago
tidy.lm()
and tidy.glm()
for full-rank fits (#1112 by @capnrefsmmat
). In some contexts, execution time is halved. With broom 1.0.0:library(broom)
system.time(
replicate(1000, tidy(lm(dist ~ speed, data = cars)))
)
#> user system elapsed
#> 1.385 0.010 1.396
With this release:
system.time(
replicate(1000, tidy(lm(dist ~ speed, data = cars)))
)
#> user system elapsed
#> 0.626 0.011 0.638
Created on 2022-08-30 by the reprex package (v2.0.1)
tidy.sparseMatrix()
, tidy.dgCMatrix()
, and tidy.dgTMatrix()
. Note that tidy.confusionMatrix()
, for relevant objects outputted from the caret package, is unaffected (#1113).tidy.anova()
works again with anova
objects from the lme4
package (broken by addition of the terms
column in the previous release)Published by simonpcouch over 2 years ago
broom 1.0.0 is the first "production" release of the package, and includes a number of notable changes to both functionality and governance.
As of this release, the broom team will be following a set of guidelines that clarify the scope of further development on the package. Given the package's wide use and long history, these guidelines prioritize backward compatibility over internal consistency and completeness. You can read those guidelines here!
We've also made notable changes to error handling in this release:
tidy()
methods will now warn when supplied an exponentiate
argument if it will be ignored.augment()
methods will now warn when supplied a newdata
argument if it will be ignored.lm
and glm
class_a
object is tidied using a (g)lm
method, broom will notclass_a
objects for the rest of the session, but if aclass_b
object is tidied using a (g)lm
method in the same session, broomOther fixes and improvements:
exponentiate
argument to tidy.boot()
(#1039).tidy.htest()
converting matrix-columns to vector-columns (#1081).tidy.glht()
with conf.int = TRUE
(#1103).tidy.zoo()
when input data does not have colnames
tidy.svyolr()
when p.values = TRUE
. Instead of aliasingtidy.polr()
directly, tidy.svyolr()
lightly wraps that method andp.values
is supplied (#1107).term
column and introduces support for car::lht()
output intidy.anova()
(#1106 by @grantmcdermott
).glance.anova
method (which previously dispatched to theglance.data.frame()
tidier, #1106 by @grantmcdermott
).As always, thanks to the broom community for their contributions and feedback! 🧹
Published by simonpcouch over 2 years ago
This update makes significant improvements to documentation, fixes a number of bugs, and brings the development flow of the package up to date with other packages in the tidymodels.
In the big picture, this release:
\dontrun
or \donttest
have been workshopped to run reliably.glance.fixest
error when model includes only fixed effects and no regressors (#1018
by @arcruz0
, #1088
by @vincentarelbundock
).tidy.speedlm
(#1084
by @cgoo4
, #1087
by @vincentarelbundock
).nobs
column to the output of glance.svyglm
(#1085
by @fschaffner
, #1086
by @vincentarelbundock
).tidy.prcomp
description entries use consistent punctuation (#1072
by @PursuitOfDataScience
).glance.fixest
and tidy.btergm
.MASS::polr
output in the corresponding tidy
and augment
methods.Published by simonpcouch almost 3 years ago
augment.rqs
. Now function preserves the original data.frame
names also when the input data.frame
only has one column (#1052
by @ilapros
).tidy.rma
when x$ddf
has length greater than 1 (#1064
by @wviechtb
).glance.lavaan
in anticipation of upcoming tidyr
release (#1067
by @DavisVaughan
).tidy.crr()
. The tidy.crr(conf.level=)
argument was previously ignored (#1068
by @ddsjoberg
).Published by simonpcouch almost 3 years ago
pysch::mediate
output is dispatched to tidy.mediate
(#1037
by @LukasWallrich
).tidy.rma
(#1041
by @TarenSanders
)augment_columns()
; most package users should use augment()
in favor of augment_columns()
. See ?augment_columns
for more details.emmeans
by fixing non-standard column names in case of asymptotically derived inferential statistics. (#1046
by @crsh
)augment.mlogit
and adds .resid
column to#1045
, #1053
, #1055
, and #1056
by @jamesrrae
and@gregmacfarlane
)glance.survfit()
.Published by simonpcouch about 3 years ago
tidy.crr()
, which were previously exponentiated when exponentiate = FALSE
(#1023
by @leejasme
)ergm
tidiers in anticipation of changes in later releases. (#1034
by @krivit
)lfe
and Rchoice
tidiersPublished by simonpcouch over 3 years ago
glance.ergm
related to handling of MCMC details.Published by simonpcouch over 3 years ago
tidy.epi.2by2
that resulted in errors with new version of epiR
(#1028
by @nt-williams
)exponentiate
argument to tidy.gam()
tidier applicable for parametric terms (#1013
by @ddsjoberg
)exponentiate
argument to tidy.negbin()
tidier (#1011
by @ddsjoberg
)spdep
tidiers following breaking changes in the most recent releasePublished by simonpcouch over 3 years ago
augment
tidiers resulting in .fitted
and .se.fit
array columns.y
non-numeric after tidy_xyz
(#973
by @jiho
)MASS:glm.nb
(#998
by @joshyam-k
)tidy.fixest
that sometimes prevented arguments like se
from being used (#1001
by @karldw
)tidy.fixest
that resulted in errors when columns with name x
are present (#1007
by @grantmcdermott
)gamlss
tidiers in favor of those provided in broom.mixed
Published by simonpcouch over 3 years ago
nnet::multinom
tidier in the case that the response#993
by @vincentarelbundock
and @hughjonesd
)survival
releasePublished by simonpcouch over 3 years ago
broom 0.7.4 introduces tidier support for a number of new model objects and improves functionality of many existing tidiers!
Rchoice
objects (#961
by @vincentarelbundock
and @Nateme16
)car::leveneTest
(#968
by @vincentarelbundock
and @mkirzon
)cmprsk::crr
(#971
and #552
by @vincentarelbundock
and @margarethannum
)augment()
method for gam
objects (#975
and #645
by @vincentarelbundock
)vars
objects (#979
and #161
by @vincentarelbundock
and @Diego-MX
)This release also restores tidiers for felm
objects from the lfe
package, which was recently unarchived from CRAN.
tidy.emmGrid
can now return std.error
and conf.*
columns at the same time. (#962
by @vincentarelbundock
and @jmbarbone
)tidy.garch
can now produce confidence intervals (#964
by @vincentarelbundock
and @IndrajeetPatil
)tidy.coxph
can now report confidence intervals on models utilizing penalized/clustering terms (#966
by @vincentarelbundock
and @matthieu-faron
)augment.lm
now works when some regression weights are equal to zero (#965
by @vincentarelbundock
and @vnijs
)tidy.coxph
can now handle models utilizing penalized/clustering terms (#966
and #969
by @vincentarelbundock
, @matthieu-faron
, and @KZARCA
)tidy.speedglm
on R 4.0.0+ (#974
by @uqzwang
)#977
and #666
by @vincentarelbundock
and @atyre2
)Published by simonpcouch almost 4 years ago
In broom 0.7.0
, we introduced an error for model objects that subclassed lm
and relied on tidy.lm()
, or similarly for tidy.glm()
. Tidiers for these objects were supported unintentionally, and we worried that tidiers for these objects would silently report innaccurate results.
In hindsight, this change was unnecessarily abrupt. We've decided to roll back this change, instead providing the following warning before allowing such objects to fall back to the lm
/glm
tidier methods:
Tidiers for objects of class {subclass} are not maintained by the broom team, and are only supported through the {dispatched method} tidier method. Please be cautious in interpreting and reporting broom output."
In addition,
summary.lm
objects (#953
by @grantmcdermott
)lfe
package, which was archived from CRAN.Published by simonpcouch almost 4 years ago
0.7.0
, we introduced an error for objects that subclassedlm
and relied on tidy.lm()
. We've transitioned this error to a warning.Published by simonpcouch about 4 years ago
While broom 0.7.1 is a minor release, it includes a number of exciting new
features and bug fixes!
margins
objects. (#700
by @grantmcdermott
)mlogit
objects (#887
by @gregmacfarlane
)glance.coeftest()
method (#932
by @grantmcdermott
)One of the more major improvements in this release is the addition of the
interval
argument to some augment
methods for confidence, prediction,
and credible intervals. These columns will be consistently labeled .lower
and .upper
! (#908
by @grantmcdermott
, #925
by @bwiernik
)
In addition...
glance.aov()
method to include an r.squared
column!glance.survfit()
now passes ...
to summary.survfit()
to allow for#880
by @vincentarelbundock
)glm
and lm
now errornewdata
warning message in augment.*()
output when the newdata
newdata
argument. (#897
by @rudeboybert
)tidy.geeglm()
not being sensitive to theexponentiate
argument (#867
)augment.fixest()
returning residuals in the .fitted
column. Thetype.residuals
argument and defaults to the sametype.predict
argument as the fixest
predict()
method. (#877
by @karldw
)tidy.felm
confidence interval bug. Replaces "robust" argument with#919
by @grantmcdermott
; supersedes #818
by @kuriwaki
)tidy.drc()
where some term labels would resultcurve
column (#914
)tidy.zoo()
(#916
by @WillemVervoort
)tidy.prcomp()
assigning the wrong PC labels from "loadings"#910
by @tavareshugo
)tidy.polr()
bug where p-values could only be returned ifexponentiate = FALSE
.We followed through with the planned deprecation of character vector tidiers
in this release. Other vector tidiers that were soft-deprecated in 0.7.0 will
be fully deprecated in a later release.
Published by simonpcouch over 4 years ago
broom 0.7.0 is a major release with a large number of new tidiers, improvements to internal consistency, and deprecations of functions and arguments. See the package NEWS for more information!