% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smsncut.R
\name{cutoff_phi}
\alias{cutoff_phi}
\title{Estimating equation phi(c, theta)}
\usage{
cutoff_phi(c, theta0, theta1, family0, family1, lambda0, lambda1, pi0, pi1)
}
\arguments{
\item{c}{Numeric scalar. Threshold value.}

\item{theta0}{Numeric vector. Unconstrained parameters for group 0.}

\item{theta1}{Numeric vector. Unconstrained parameters for group 1.}

\item{family0}{Character. Family for group 0 (\code{"SN"} or \code{"ST"}).}

\item{family1}{Character. Family for group 1 (\code{"SN"} or \code{"ST"}).}

\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.}
}
\value{
Numeric scalar.
}
\description{
Computes the derivative of the weighted misclassification risk with respect
to the threshold (equation (15) of de Paula et al., 2026):
\deqn{\varphi(c, \theta) = \lambda_1 \pi_1 f_1(c; \theta_1) -
  \lambda_0 \pi_0 f_0(c; \theta_0).}
An interior minimiser satisfies \eqn{\varphi(c^*, \theta) = 0}, equivalently
\eqn{\Lambda(c^*;\theta) = \lambda_0\pi_0/(\lambda_1\pi_1)}.
}
\examples{
theta0 <- c(0, log(1), 1)
theta1 <- c(2, log(1), 1.5)
cutoff_phi(1.6, theta0, theta1, "SN", "SN", 1, 1, 0.5, 0.5)
}
