% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/indices.R
\name{capability}
\alias{capability}
\title{Compute Process Capability Indices (GPCIs)}
\usage{
capability(
  data = NULL,
  distribution,
  USL,
  LSL,
  target = (USL + LSL)/2,
  indices = NULL,
  u = 1,
  v = 1,
  mode = c("moments", "quantile"),
  fit = TRUE,
  fit_method = "mle",
  C0 = 1,
  C1 = 0,
  C2 = 1,
  tolerance_t = USL - LSL,
  P0 = 0.9973002,
  LDL = LSL,
  UDL = USL
)
}
\arguments{
\item{data}{Numeric vector of observed process data (optional if distribution is supplied with parameters).}

\item{distribution}{A \code{gpci_dist} object.}

\item{USL}{Upper Specification Limit.}

\item{LSL}{Lower Specification Limit.}

\item{target}{Target value of process (defaults to midpoint of USL and LSL).}

\item{indices}{Character vector of index names to evaluate. Default computes all GPCIs:
\code{c("Cpy", "Cp", "Cpk", "Cpu", "Cpl", "Cpm", "Cpmk", "CpTk", "Spmk", "Cpc", "CNpk", "CNpmc", "CNpmkc", "Cp_uv")}.}

\item{u}{Parameter \code{u} for Vännman's \code{Cp(u,v)} family (default 1).}

\item{v}{Parameter \code{v} for Vännman's \code{Cp(u,v)} family (default 1).}

\item{mode}{Mode of computation: \code{"moments"} (mean/sd) or \code{"quantile"} (quantiles).}

\item{fit}{Logical. If \code{TRUE} (default) and data is supplied, parameters are estimated from data.}

\item{fit_method}{Parameter estimation method (\code{"mle"}).}

\item{C0, C1, C2}{Parameters for tolerance loss function (defaults: 1, 0, 1).}

\item{tolerance_t}{Process tolerance span (defaults to \code{USL - LSL}).}

\item{P0}{Expected yield baseline (default 0.9973002).}

\item{LDL, UDL}{Lower and upper desired limits.}
}
\value{
A named numeric vector of evaluated GPCI values.
}
\description{
Computes classical and generalized Process Capability Indices for a given dataset or
process distribution parameters under uncensored data.
}
\examples{
dist_n <- dist_normal(mean = 10, sd = 1.5)
capability(
  distribution = dist_n,
  USL = 15, LSL = 5, target = 10,
  indices = c("Cpy", "Cp", "Cpk", "Cpm", "Cpmk")
)
}
