Experimental lifecycle Add the statistics returned in broom::glance() as a table source note.

add_glance_source_note(
  x,
  include = everything(),
  label = NULL,
  fmt_fun = NULL,
  sep1 = " = ",
  sep2 = "; ",
  ...
)

Arguments

x

'tbl_regression' object

include

tidyselect list of statistics to include. Default is everything()

label

use to update statistic labels

fmt_fun

use to update default formatting function. Default is everything() ~ purrr::partial(style_sigfig, digits = 3)

sep1

Separator between statistic name and statistic. Default is " = ", e.g. "R2 = 0.456"

sep2

Separator between statistics. Default is "; "

...

additional arguments passed to broom::glance()

Default Labels

The following statistics have set default labels when being printed. When there is no default, the label is the column name from broom::glance().

Statistic NameDefault Label
r.squared
adj.r.squaredAdjusted R²
p.valuep-value
logLiklog-likelihood
statisticStatistic
df.residualResidual df
null.devianceNull deviance
df.nullNull df
neventN events
concordancec-index
std.error.concordancec-index SE

Example Output

Example 1

Examples

# Example 1 ---------------------------------- add_glance_source_note_ex1 <- lm(age ~ marker + grade, trial) %>% tbl_regression() %>% add_glance_source_note( label = list(df ~ "Degrees of Freedom", sigma ~ "\U03C3"), fmt_fun = df ~ style_number, include = c(r.squared, AIC, sigma, df) )