bcat_reg_table: UC-branded regression table

View source: R/bcat_reg_table.R

bcat_reg_tableR Documentation

UC-branded regression table

Description

Produce publication-quality regression tables with UC styling. Wraps modelsummary::modelsummary() with UC defaults for formatting, colors, and statistical conventions.

Usage

bcat_reg_table(
  models,
  stars = c(`*` = 0.1, `**` = 0.05, `***` = 0.01),
  se_type = "default",
  coef_rename = NULL,
  gof_map = c("nobs", "r.squared", "adj.r.squared", "statistic"),
  caption = NULL,
  footer = NULL,
  font_size = 12,
  header_bg_color = palette_UC[["UC Red"]],
  header_txt_color = palette_UC[["White"]],
  striped = TRUE,
  doc_type = NULL,
  ...
)

Arguments

models

A model object, or a list of model objects. Supports lm, glm, fixest::feols, plm, ivreg, and any model supported by broom::tidy().

stars

Named numeric vector for significance stars. Set to FALSE to suppress stars. Default: c("*" = 0.1, "**" = 0.05, "***" = 0.01).

se_type

Character. Standard error type passed to modelsummary's vcov argument. Options: "default", "HC1", "HC3", or a function/named list. Default is "default".

coef_rename

Named character vector to rename coefficients. If NULL (default), coefficients are auto-cleaned to Title Case.

gof_map

Character vector of goodness-of-fit statistics to include. Default: c("nobs", "r.squared", "adj.r.squared", "statistic").

caption

Character. Table caption.

footer

Character. Table footnote.

font_size

Numeric. Font size. Default is 12.

header_bg_color

Background color for header. Default is UC Red.

header_txt_color

Text color for header. Default is white.

striped

Logical. Zebra striping? Default is TRUE.

doc_type

Character. Force output format. Auto-detected if NULL.

...

Additional arguments passed to modelsummary::modelsummary().

Value

A formatted table object.

Author(s)

Saannidhya Rawat

See Also

Other tables: bcat_cor_table(), bcat_fmt_style_table(), bcat_sum_table()

Examples

# Single model
m1 <- lm(mpg ~ wt + hp, data = mtcars)
bcat_reg_table(m1)

# Compare models side-by-side
m2 <- lm(mpg ~ wt + hp + cyl, data = mtcars)
bcat_reg_table(list("Base" = m1, "Extended" = m2))

Rbearcat documentation built on March 21, 2026, 5:07 p.m.