% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods_text.R
\name{model_methods}
\alias{model_methods}
\alias{model_methods.smoothbp_fit}
\title{Generate a statistical methods description for a smoothbp_fit object}
\usage{
model_methods(object, ...)

\method{model_methods}{smoothbp_fit}(object, width = 80, ...)
}
\arguments{
\item{object}{A \code{smoothbp_fit} or \code{smoothbp_ss_fit} object.}

\item{...}{Unused.}

\item{width}{Integer; line-wrap width for the narrative paragraph (default
\code{80}).}
}
\value{
The full methods report as a single character string (invisibly).
The text is also printed to the console via \code{cat()}.
}
\description{
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.
}
\details{
The function name \code{model_methods()} is used rather than \code{methods()} to avoid
masking the base-R \code{utils::methods()} function, which lists S3/S4 methods
for a generic and does not dispatch on object class.

When \code{K = 0} (no breakpoints, i.e. \code{deltas = list()}), the model
collapses to a Bayesian linear regression (with optional random intercepts)
and the output reflects this accordingly.
}
\examples{
\dontrun{
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)
}

}
\references{
Bacon, D. W. & Watts, D. G. (1971). Estimating the transition between two
intersecting straight lines. \emph{Biometrika}, 58(3), 525--534.
\doi{10.2307/2334389}

Kuo, L. & Mallick, B. (1998). Variable selection for regression models.
\emph{Sankhya: The Indian Journal of Statistics}, 60(1), 65--81.
}
