% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smoothbp.R
\name{smoothbp}
\alias{smoothbp}
\title{Fit a hierarchical piecewise regression model with smoothed change-points}
\usage{
smoothbp(
  formula,
  b0 = ~1,
  b1 = ~1,
  deltas = list(~1),
  omega = list(~1),
  rho = list(~1),
  data,
  priors = smoothbp_priors(),
  chains = 4L,
  iter = 2000L,
  warmup = 1000L,
  seed = NULL,
  step_om = 0.3,
  step_rho = 0.3,
  target_accept = 0.9,
  cores = getOption("smoothbp.cores", 1L),
  hierarchical = NULL,
  reparameterise = c("none", "omega"),
  .verbose = TRUE
)
}
\arguments{
\item{formula}{A two-sided formula identifying the response and time variable,
e.g. \code{value ~ tau}.}

\item{b0}{One-sided formula for the \eqn{b0} linear predictor.}

\item{b1}{One-sided formula for \eqn{b1}. Default \code{~ 1}.}

\item{deltas}{List of one-sided formulas for slope changes. Default \code{list(~ 1)}.}

\item{omega}{List of one-sided formulas for change-point locations. Default \code{list(~ 1)}.
Can also contain \code{\link{fixed}()} values for known change-points.}

\item{rho}{List of one-sided formulas for transition sharpness. Default \code{list(~ 1)}.
Can also contain \code{\link{fixed}()} values for fixed sharpness.}

\item{data}{A data frame.}

\item{priors}{A \code{\link{smoothbp_priors}} object.}

\item{chains}{Number of chains. Default 4.}

\item{iter}{Total iterations per chain. Default 2000.}

\item{warmup}{Warmup iterations. Default 1000.}

\item{seed}{Random seed.}

\item{step_om}{Initial HMC/MH step size for omega.}

\item{step_rho}{Initial HMC/MH step size for rho.}

\item{target_accept}{Target HMC acceptance probability (default 0.9).
Raise toward 0.99 if you see divergent transitions in the sharpness
(\code{rho}) parameter.}

\item{cores}{Number of CPU cores.}

\item{hierarchical}{\strong{Deprecated.} Character vector; which parameters
should be treated as hierarchical. This argument is no longer needed:
random effects on change-point timing are auto-detected from
\code{(1|group)} formula syntax (e.g. \code{omega = list(~ 1 + (1|group))}).
Passing a non-\code{NULL} value generates a deprecation warning.}

\item{reparameterise}{Character specifying the parameterisation for random change-points:
\code{"none"} (centred) or \code{"omega"} (fully non-centred). Default is \code{"none"}.
Only used if random effects are present.}

\item{.verbose}{Print progress.}
}
\value{
A \code{smoothbp_fit} object.
}
\description{
Fit a hierarchical piecewise regression model with smoothed change-points
}
