Skip to contents

A function that takes a regression model and provides basic statistics in an ARD structure. The default output is simpler than ard_regression(). The function primarily matches regression terms to underlying variable names and levels. The default arguments used are

broom.helpers::tidy_plus_plus(
  add_reference_rows = FALSE,
  add_estimate_to_reference_rows = FALSE,
  add_n = FALSE,
  intercept = FALSE
)

Usage

ard_regression_basic(
  x,
  tidy_fun = broom.helpers::tidy_with_broom_or_parameters,
  stats_to_remove = c("term", "var_type", "var_label", "var_class", "label",
    "contrasts_type", "contrasts", "var_nlevels"),
  ...
)

Arguments

x

regression model object

tidy_fun

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

stats_to_remove

(character)
character vector of statistic names to remove. Default is c("term", "var_type", "var_label", "var_class", "label", "contrasts_type", "contrasts", "var_nlevels").

...

Arguments passed to broom.helpers::tidy_plus_plus()

Value

data frame

Examples

lm(AGE ~ ARM, data = cards::ADSL) |>
  ard_regression_basic()
#> {cards} data frame: 12 x 7
#>    variable variable_level   context stat_name stat_label   stat
#> 1       ARM      Xanomeli… regressi…  estimate  Coeffici… -0.828
#> 2       ARM      Xanomeli… regressi… std.error  Standard…  1.267
#> 3       ARM      Xanomeli… regressi… statistic  statistic -0.654
#> 4       ARM      Xanomeli… regressi…   p.value    p-value  0.514
#> 5       ARM      Xanomeli… regressi…  conf.low  CI Lower… -3.324
#> 6       ARM      Xanomeli… regressi… conf.high  CI Upper…  1.668
#> 7       ARM      Xanomeli… regressi…  estimate  Coeffici…  0.457
#> 8       ARM      Xanomeli… regressi… std.error  Standard…  1.267
#> 9       ARM      Xanomeli… regressi… statistic  statistic  0.361
#> 10      ARM      Xanomeli… regressi…   p.value    p-value  0.719
#> 11      ARM      Xanomeli… regressi…  conf.low  CI Lower… -2.039
#> 12      ARM      Xanomeli… regressi… conf.high  CI Upper…  2.953
#>  1 more variable: fmt_fn