| model_methods | R Documentation |
Produces a human- and AI-readable description of the fitted model, including the structural equation, priors, MCMC sampling details, convergence diagnostics, and a reproducibility code snippet. The output is suitable for direct inclusion in the Statistical Analysis section of a scientific manuscript.
model_methods(object, ...)
## S3 method for class 'smoothbp_fit'
model_methods(object, width = 80, ...)
object |
A |
... |
Unused. |
width |
Integer; line-wrap width for the narrative paragraph (default
|
The function name model_methods() is used rather than methods() to avoid
masking the base-R utils::methods() function, which lists S3/S4 methods
for a generic and does not dispatch on object class.
When K = 0 (no breakpoints, i.e. deltas = list()), the model
collapses to a Bayesian linear regression (with optional random intercepts)
and the output reflects this accordingly.
The full methods report as a single character string (invisibly).
The text is also printed to the console via cat().
Bacon, D. W. & Watts, D. G. (1971). Estimating the transition between two intersecting straight lines. Biometrika, 58(3), 525–534. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2334389")}
Kuo, L. & Mallick, B. (1998). Variable selection for regression models. Sankhya: The Indian Journal of Statistics, 60(1), 65–81.
## Not run:
fit <- smoothbp(y ~ tau, b0 = ~ 1 + (1 | subject), data = dat,
chains = 4L, iter = 2000L, warmup = 1000L, seed = 42L)
model_methods(fit)
txt <- model_methods(fit)
cat(txt)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.