% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build-run.R
\name{run_mcmc_bundle_manual}
\alias{run_mcmc_bundle_manual}
\title{Run posterior sampling for a prepared one-arm bundle}
\usage{
run_mcmc_bundle_manual(
  bundle,
  show_progress = TRUE,
  quiet = FALSE,
  parallel_chains = FALSE,
  workers = NULL,
  timing = FALSE,
  z_update_every = NULL
)
}
\arguments{
\item{bundle}{A \code{causalmixgpd_bundle} from \code{build_nimble_bundle()}.}

\item{show_progress}{Logical; if TRUE, print step messages and render progress where supported.}

\item{quiet}{Logical; if TRUE, suppress console status messages.
Set to FALSE to see progress messages during MCMC setup and execution.}

\item{parallel_chains}{Logical; run chains concurrently when \code{nchains > 1}.}

\item{workers}{Optional integer number of workers for parallel execution.}

\item{timing}{Logical; if TRUE, include stage timings (\code{build}, \code{compile}, \code{mcmc})
in \code{fit$timing}.}

\item{z_update_every}{Integer >= 1 controlling latent cluster-label update cadence.}
}
\value{
A fitted object of class \code{"mixgpd_fit"} containing posterior
draws, model metadata, and cached objects used by downstream S3 methods.
}
\description{
\code{run_mcmc_bundle_manual()} is the explicit runner for objects created by
\code{\link{build_nimble_bundle}}. It compiles the stored NIMBLE code,
executes MCMC, and returns a \code{"mixgpd_fit"} object.
}
\details{
The resulting fit supports posterior summaries of the model parameters as
well as posterior predictive functionals such as
\eqn{f(y \mid x)}, \eqn{S(y \mid x)},
\eqn{Q(\tau \mid x)}, and restricted means.

If \code{parallel_chains = TRUE}, chains are run concurrently when the stored
MCMC configuration uses more than one chain. If the bundle was built with
latent cluster labels monitored, the \code{z_update_every} argument controls how
frequently those latent indicators are refreshed during sampling.
}
\examples{
\donttest{
library(nimble)
y <- abs(rnorm(25)) + 0.1
bundle <- build_nimble_bundle(
  y = y,
  backend = "sb",
  kernel = "normal",
  GPD = FALSE,
  components = 3,
  mcmc = list(niter = 100, nburnin = 50, thin = 1, nchains = 1, seed = 1)
)
fit <- run_mcmc_bundle_manual(bundle, show_progress = FALSE)
fit
}
}
\seealso{
\code{\link{build_nimble_bundle}}, \code{\link{mcmc}},
\code{\link{summary.mixgpd_fit}}, \code{\link{predict.mixgpd_fit}}.
}
