% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ladder.R
\name{fit_ladder}
\alias{fit_ladder}
\title{Fit the model over a ladder of K}
\usage{
fit_ladder(
  Y,
  K_max = NULL,
  K_min = 2,
  q = 0.05,
  screen_draws = 30,
  screen_mixes = 60,
  quiet = FALSE,
  ...
)
}
\arguments{
\item{Y}{As in \code{\link[=fit_bayesian]{fit_bayesian()}}.}

\item{K_max}{Largest K to fit. \code{NULL} (default) uses
\code{min(6, floor(N / 3))}, capped at 3 when \code{N <= 12} — with a dozen
sorts or fewer, the data cannot formally discriminate adjacent K.}

\item{K_min}{Smallest K to fit (default 2).}

\item{q}{False-discovery level for the support evidence stored on
each rung (default 0.05); \code{\link[=select_k]{select_k()}} can re-select at another q.}

\item{screen_draws, screen_mixes}{Budget for the per-rung person
check (defaults 30 and 60; the cluster signal needs no more).}

\item{quiet}{Suppress per-rung messages (default \code{FALSE}).}

\item{...}{Passed to \code{\link[=fit_bayesian]{fit_bayesian()}} (iterations, seed, ...).}
}
\value{
A \code{bayesqm_ladder}: the per-rung fits and evidence.
}
\description{
Fits \code{\link[=fit_bayesian]{fit_bayesian()}} at each K in the ladder and stores, per rung, the
fit together with the adequacy and support evidence that
\code{\link[=select_k]{select_k()}} consumes. Expect roughly one full fit's runtime per rung;
a message up front says how many rungs are coming.
}
