% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ordinal_khaos.R
\name{plot.ordinal_khaos}
\alias{plot.ordinal_khaos}
\title{Plot Method for class \code{ordinal_khaos}}
\usage{
\method{plot}{ordinal_khaos}(x, ...)
}
\arguments{
\item{x}{An object of class \code{ordinal_khaos}.}

\item{...}{additional arguments passed to \code{plot}}
}
\value{
Invisibly returns \code{NULL}.
}
\description{
Produces a 2x2 diagnostic plot: (1) trace of the number of basis functions;
(2) jittered predicted vs. actual classes with point size indicating posterior
support; (3) posterior mean class probabilities on \code{x$X} (lines if 1D,
otherwise barplot of averages); (4) histogram of latent means \eqn{f(x)} with
posterior-average thresholds overlaid.
}
\details{
Panel (2) uses \code{predict(x, type="class", aggregate=FALSE)} to compute
per-draw MAP classes, plotting the modal class vs. observed class; point size
reflects the fraction of draws supporting the modal class. Panel (3) uses
\code{predict(x, type="prob")} to plot posterior mean class probabilities.
Panel (4) uses \code{predict(x, type="latent", aggregate=FALSE)} to pool
latent means across draws and overlays posterior-average cutpoints (handles
either stored \eqn{\gamma_1,\dots,\gamma_{K-1}} or \eqn{\gamma_2,\dots,\gamma_{K-1}}
with \eqn{\gamma_1\equiv 0}).
}
\examples{
\donttest{
set.seed(1)
X <- matrix(runif(200), ncol = 1)
y <- sample(1:4, 200, replace = TRUE)
fit <- ordinal_khaos(X, y, nmcmc = 2000, nburn = 1000, thin = 2, verbose = FALSE)
plot(fit)
}
}
