Checks if a augment
method exits for a given object, either in {broom}
or
in {broom.mixed}
. If it does, return the model summary dataframe, if not,
return a NULL
.
Arguments
- x
Model object or other R object with information to append to observations.
- ...
Addition arguments to
augment
method.
Value
A tibble::tibble()
with information about data points.
Examples
set.seed(123)
lm.mod <- lm(Sepal.Length ~ Species, iris)
broomExtra::augment(lm.mod)
#> # A tibble: 150 × 8
#> Sepal.Length Species .fitted .resid .hat .sigma .cooksd .std.resid
#> <dbl> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 5.1 setosa 5.01 0.0940 0.0200 0.516 0.000231 0.184
#> 2 4.9 setosa 5.01 -0.106 0.0200 0.516 0.000294 -0.208
#> 3 4.7 setosa 5.01 -0.306 0.0200 0.516 0.00245 -0.600
#> 4 4.6 setosa 5.01 -0.406 0.0200 0.515 0.00432 -0.797
#> 5 5 setosa 5.01 -0.00600 0.0200 0.517 0.000000943 -0.0118
#> 6 5.4 setosa 5.01 0.394 0.0200 0.515 0.00407 0.773
#> 7 4.6 setosa 5.01 -0.406 0.0200 0.515 0.00432 -0.797
#> 8 5 setosa 5.01 -0.00600 0.0200 0.517 0.000000943 -0.0118
#> 9 4.4 setosa 5.01 -0.606 0.0200 0.514 0.00962 -1.19
#> 10 4.9 setosa 5.01 -0.106 0.0200 0.516 0.000294 -0.208
#> # … with 140 more rows