Returns formatted summary tables for subgroups using the gt package, with search metadata and customizable decimal precision. Produces two tables: a treatment effect estimates table and an identified subgroups table, each with fully customizable titles and subtitles.
sg_tables(
fs,
which_df = "est",
est_title = "Treatment Effect Estimates",
est_caption = "Training data estimates",
sg_title = "Identified Subgroups",
sg_subtitle = NULL,
potentialOutcome.name = NULL,
hr_1a = NA,
hr_0a = NA,
ndecimals = 3,
include_search_info = TRUE,
font_size = 12
)List with gt tables for estimates, subgroups, and optionally search info.
ForestSearch results object.
Character. Which data frame to use ("est" or "testing").
Character or NULL. Main title for the estimates table
(default: "Treatment Effect Estimates"). Rendered as bold markdown.
Set to NULL to suppress the title and display only est_caption.
Character. Subtitle for the estimates table (default: "Training data estimates").
Character or NULL. Main title for the identified subgroups
table (default: "Identified Subgroups"). Rendered as bold markdown.
Set to NULL to suppress the title and display only sg_subtitle.
Character or NULL. Subtitle for the identified subgroups
table. When NULL (default), an informative subtitle is auto-generated
from maxk (e.g., "Two-factor subgroups (maxk=2)").
Character. Name of potential outcome variable (optional).
Character. Adjusted HR for subgroup 1 (optional).
Character. Adjusted HR for subgroup 0 (optional).
Integer. Number of decimals for formatted numbers (default: 3).
Logical. Include search metadata table (default: TRUE).
Numeric. Font size in pixels for table text (default: 12).