% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_methods.R
\name{trace_plot}
\alias{trace_plot}
\title{Trace plots with automatic poor-mixing highlighting}
\usage{
trace_plot(
  fit,
  pars = NULL,
  type = "trace",
  rhat_thresh = 1.05,
  ess_thresh = 100
)
}
\arguments{
\item{fit}{A \code{smoothbp_fit} object.}

\item{pars}{Character vector of parameter names to include.  Defaults to
all non-random-effect parameters.}

\item{type}{One of \code{"trace"} (default), \code{"density"}, or
\code{"both"}.}

\item{rhat_thresh}{Rhat threshold above which a parameter is flagged as
poorly mixing.  Default \code{1.05}.}

\item{ess_thresh}{Bulk-ESS threshold below which a parameter is flagged.
Default \code{100}.}
}
\value{
A \code{ggplot} object (or a named list of two when
\code{type = "both"}).
}
\description{
Produces per-parameter trace plots from a \code{smoothbp_fit} object.
Parameters with \eqn{\hat{R} > 1.05} are flagged with a light-red
background and their panel labels include the \eqn{\hat{R}} value and a
warning symbol.  Parameters with low bulk-ESS (< 100) are further annotated.
}
