% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/impsam.R
\name{impsam_gpci}
\alias{impsam_gpci}
\title{Importance Sampling MCMC Chain Generator for Process Capability Indices}
\usage{
impsam_gpci(
  data,
  distribution,
  prior = NULL,
  chain_length = 1000,
  burn_in = 200,
  thinning = 1,
  USL,
  LSL,
  target = (USL + LSL)/2,
  indices = NULL,
  u = 1,
  v = 1,
  C0 = 1,
  C1 = 0,
  C2 = 1,
  P0 = 0.9973002
)
}
\arguments{
\item{data}{Numeric vector of uncensored process data.}

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

\item{prior}{Function representing the joint log-prior density \code{function(params)} or a list of prior hyperparameters.
Default assumes non-informative flat or conjugate log-priors.}

\item{chain_length}{Desired length of final retained MCMC chain after burn-in and thinning. Default is 1000.}

\item{burn_in}{Number of initial burn-in samples to discard. Default is 200.}

\item{thinning}{Thinning interval for sampling. Default is 1 (no thinning).}

\item{USL}{Upper Specification Limit.}

\item{LSL}{Lower Specification Limit.}

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

\item{indices}{Character vector of GPCI names to evaluate. Default computes all 13+ indices.}

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

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

\item{P0}{Desirable yield baseline (default 0.9973002).}
}
\value{
A list of class \code{"gpciImpSam"} containing:
  \item{param_chain}{Matrix of retained MCMC parameter draws.}
  \item{gpci_chain}{Matrix or data frame of retained GPCI draws.}
  \item{point_estimates}{Point estimates of GPCIs based on uncensored data MLE.}
  \item{specs}{Specification limits and setup options.}
}
\description{
Generates posterior parameter draws and Generalized Process Capability Index (GPCI)
chains using Importance Sampling (Sampling Importance Resampling, SIR) for uncensored data.
}
\examples{
data_x <- rnorm(50, mean = 10, sd = 1)
dist_norm <- dist_normal()
fit_imp <- impsam_gpci(
  data = data_x,
  distribution = dist_norm,
  chain_length = 500,
  burn_in = 100,
  thinning = 1,
  USL = 13, LSL = 7
)
}
