model_results: Report the results of a smoothbp_fit object

View source: R/results_text.R

model_resultsR Documentation

Report the results of a smoothbp_fit object

Description

Produces a human- and AI-readable results report, including a plain-English narrative, the fitted model equation with posterior mean coefficients substituted to 3 d.p., per-breakpoint summaries, the full parameter table, and convergence diagnostics. The output is entirely self-contained: no package documentation or source code is needed to interpret it.

Usage

model_results(object, ...)

## S3 method for class 'smoothbp_fit'
model_results(object, digits = 3, width = 80, ...)

Arguments

object

A smoothbp_fit or smoothbp_ss_fit object.

...

Unused.

digits

Integer; decimal places for all numerical output (default 3).

width

Integer; line-wrap width for narrative text (default 80).

Details

The function name model_results() is used rather than results() for consistency with model_methods() and to avoid any namespace conflict with results functions in other packages.

For models with covariates on any structural parameter, the substituted equation shows the intercept-only (reference-level) value; the full set of coefficients is listed in the PARAMETER ESTIMATES section.

Value

The full results report as a single character string (invisibly). The text is also printed to the console via cat().

Examples

## Not run: 
fit <- smoothbp(y ~ tau, b0 = ~ 1 + (1 | subject), data = dat,
                chains = 4L, iter = 2000L, warmup = 1000L, seed = 42L)
model_results(fit)
txt <- model_results(fit)

## End(Not run)


smoothbp documentation built on June 14, 2026, 9:06 a.m.