% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smsncut.R
\name{cutoff_expand_interval_until_valid}
\alias{cutoff_expand_interval_until_valid}
\title{Expand the search interval until boundary conditions hold}
\usage{
cutoff_expand_interval_until_valid(
  theta,
  family0,
  family1,
  lambda0,
  lambda1,
  pi0,
  pi1,
  pad_init = 0,
  pad_step = 0.2,
  max_iter = 20L
)
}
\arguments{
\item{theta}{Numeric vector: \code{c(theta0, theta1)}.}

\item{family0}{Character. Family for group 0.}

\item{family1}{Character. Family for group 1.}

\item{lambda0}{Positive numeric. Cost of a false positive.}

\item{lambda1}{Positive numeric. Cost of a false negative.}

\item{pi0}{Numeric in \eqn{(0,1)}. Prevalence of non-diseased.}

\item{pi1}{Numeric in \eqn{(0,1)}. Prevalence of diseased.}

\item{pad_init}{Initial padding. Default \code{0}.}

\item{pad_step}{Additive padding increment. Default \code{0.20}.}

\item{max_iter}{Maximum expansion attempts. Default \code{20}.}
}
\value{
The output of \code{\link{cutoff_boundary_check}} for the final
  interval, augmented with \code{a}, \code{b}, \code{ok}, \code{pad},
  and \code{iter}.
}
\description{
Implements the additive interval-expansion strategy of de Paula et al.
(2026, Section 6.1.1): starting from \code{pad = pad_init}, the padding
is incremented by \code{pad_step} at each iteration until the boundary
conditions \eqn{\varphi(a)<0} and \eqn{\varphi(b)>0} are satisfied, or
\code{max_iter} attempts are exhausted.
}
\examples{
theta <- c(0, log(1), 1, 2, log(1), 1.5)
cutoff_expand_interval_until_valid(theta, "SN", "SN",
                                   lambda0 = 1, lambda1 = 1,
                                   pi0 = 0.5, pi1 = 0.5)
}
