% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pci_grid.R
\name{pci_grid}
\alias{pci_grid}
\title{Sensitivity Grid of Process Capability Indices}
\usage{
pci_grid(
  index,
  dist = NULL,
  LSL = NULL,
  USL = NULL,
  target = NULL,
  sigma_vals = NULL,
  s_vals = NULL,
  p0_vals = NULL,
  mu = NULL,
  xbar = NULL,
  alpha_vals = c(0.1, 0.05, 0.01),
  n = NULL,
  B = 2000
)
}
\arguments{
\item{index}{Character: one of the 12 index names (see \code{\link{pci}}).}

\item{dist}{A \code{\link{pci_dist}} object (required for \code{"Cpy"}).}

\item{LSL, USL}{Specification limits.}

\item{target}{Target value (for \code{Cpm}/\code{Cpmk}).}

\item{sigma_vals}{Numeric vector of \eqn{\sigma} values to sweep
(for capability indices).}

\item{s_vals}{Numeric vector of \eqn{s} values to sweep
(for performance indices).}

\item{p0_vals}{Numeric vector of \eqn{p_0} values to sweep (for \code{Cpy}).}

\item{mu}{Short-term process mean.}

\item{xbar}{Long-term process mean.}

\item{alpha_vals}{Numeric vector of significance levels.
Default \code{c(0.10, 0.05, 0.01)}.}

\item{n}{Sample size for bootstrap CIs. If \code{NULL}, CIs are omitted.}

\item{B}{Bootstrap replications. Default 2000.}
}
\value{
A \code{data.frame} (with additional class \code{"pci_grid"})
  in long format with columns:
  \code{index}, \code{sigma}, \code{s}, \code{p0}, \code{alpha},
  \code{estimate}, \code{lower}, \code{upper}.
  Columns that do not apply to the chosen index contain \code{NA}.
}
\description{
Computes a PCI across a grid of parameter values (short-term standard
deviation \code{sigma}, long-term standard deviation \code{s}, and/or
desired yield \code{p0}), optionally with bootstrap confidence intervals at
multiple significance levels.
}
\examples{
grid <- pci_grid("Cp", LSL = 57, USL = 63,
                 sigma_vals = c(0.5, 1.0, 1.5),
                 mu = 60, alpha_vals = c(0.05, 0.01))
print(grid)

}
\seealso{
\code{\link{pci}}, \code{\link{pci_ci}},
  \code{\link{plot.pci_grid}}
}
