Skip to contents

Function takes a regression model object and converts it to a ARD structure using the broom.helpers package.

Usage

ard_regression(x, ...)

# Default S3 method
ard_regression(x, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, ...)

Arguments

x

regression model object

...

Arguments passed to broom.helpers::tidy_plus_plus()

tidy_fun

(function)
a tidier. Default is broom.helpers::tidy_with_broom_or_parameters

Value

data frame

Examples

lm(AGE ~ ARM, data = cards::ADSL) |>
  ard_regression(add_estimate_to_reference_rows = TRUE)
#> {cards} data frame: 43 x 9
#>    variable variable_level   context      stat_name stat_label      stat
#> 1       ARM        Placebo regressi…           term       term ARMPlace…
#> 2       ARM        Placebo regressi…      var_label      Label Descript…
#> 3       ARM        Placebo regressi…      var_class      Class character
#> 4       ARM        Placebo regressi…       var_type       Type categori…
#> 5       ARM        Placebo regressi…    var_nlevels   N Levels         3
#> 6       ARM        Placebo regressi…      contrasts  contrasts contr.tr…
#> 7       ARM        Placebo regressi… contrasts_type  Contrast… treatment
#> 8       ARM        Placebo regressi…  reference_row  referenc…      TRUE
#> 9       ARM        Placebo regressi…          label  Level La…   Placebo
#> 10      ARM        Placebo regressi…          n_obs     N Obs.        86
#>  33 more rows
#>  Use `print(n = ...)` to see more rows
#>  3 more variables: fmt_fn, warning, error