\name{mpse_impadapt2_censor}
\alias{mpse_impadapt2_censor}
\title{Maximum Product of Spacings Estimation under Improved Adaptive Type-II Progressive Censoring Scheme}
\usage{
mpse_impadapt2_censor(
  data,
  n = NULL,
  m = NULL,
  T1 = NULL,
  T2 = NULL,
  R = NULL,
  cdf = NULL,
  pdf = NULL,
  start = NULL,
  lower = NULL,
  upper = NULL,
  method = "BFGS",
  conf_level = 0.95,
  eval_time = NULL,
  ...
)
}
\arguments{
\item{data}{Numeric vector of observed failure times, or an object of class \code{"impadapt2_sample"}.}

\item{n}{Integer, total number of units placed on test. Required if data is a numeric vector.}

\item{m}{Integer, pre-fixed target number of failures. Required if data is a numeric vector.}

\item{T1}{Numeric, first threshold time point T1. Required if data is a numeric vector.}

\item{T2}{Numeric or NULL, second threshold time point T2 (T2 > T1). Required if data is a numeric vector.}

\item{R}{Numeric vector of length m, pre-fixed progressive censoring scheme. Required if data is a numeric vector.}

\item{cdf}{Function (optional), user-supplied cumulative distribution function cdf(x, par).}

\item{pdf}{Function (optional), user-supplied probability density function pdf(x, par) for hazard rate evaluation.}

\item{start}{Numeric vector of initial parameter guesses.}

\item{lower}{Optional numeric vector of lower parameter bounds.}

\item{upper}{Optional numeric vector of upper parameter bounds.}

\item{method}{Character string specifying optimization method: \code{"BFGS"}, \code{"NR"}, \code{"Nelder-Mead"}, \code{"CG"}, \code{"L-BFGS-B"}, or \code{"SANN"}. Default is \code{"BFGS"}.}

\item{conf_level}{Numeric, confidence level for asymptotic confidence intervals (default 0.95).}

\item{eval_time}{Optional numeric, time point t > 0 for calculating reliability S(t) and hazard rate h(t).}

\item{...}{Further arguments passed to optimization routines.}
}
\value{
An object of class \code{"impadapt2_mpse"} containing:
\item{par}{MPSE parameter estimates.}
\item{std_er}{Standard errors of parameter estimates.}
\item{vcov}{Variance-covariance matrix.}
\item{log_ps}{Log product-of-spacings value at MPSE.}
\item{confint}{Matrix of asymptotic confidence intervals for parameters.}
\item{rel_est}{Point estimate, SE, and ACI of Reliability function S(t) if eval_time is provided.}
\item{haz_est}{Point estimate, SE, and ACI of Hazard rate function h(t) if eval_time is provided.}
\item{case}{Realized censoring scenario ("Case I", "Case II", or "Case III").}
\item{method}{Optimization routine used.}
\item{convergence}{Convergence code (0 = successful convergence).}
}
\description{
Fits a probability distribution to Improved Adaptive Type-II Progressive Censored (IAT-II PCS) data using Maximum Product of Spacings Estimation (MPSE).
}
\examples{
set.seed(123)
ge_cdf <- function(x, par) (1 - exp(-par[2] * x))^par[1]
ge_pdf <- function(x, par) par[1] * par[2] * exp(-par[2] * x) * (1 - exp(-par[2] * x))^(par[1] - 1)
ge_qdf <- function(p, par) - (1 / par[2]) * log(1 - p^(1 / par[1]))

samp <- r_impadapt2_censor(
  n = 25, m = 12, T1 = 0.8, T2 = 2.0,
  R = c(rep(1, 11), 2),
  pdf = ge_pdf, cdf = ge_cdf, qdf = ge_qdf,
  par = c(1.5, 0.8)
)

fit <- mpse_impadapt2_censor(
  data = samp, cdf = ge_cdf, pdf = ge_pdf,
  start = c(1.0, 1.0), eval_time = 0.5
)
summary(fit)
}
\references{
Dev, S. S., & Chacko, M. (2026). Statistical inference for generalized exponential distribution under improved adaptive Type-II progressive censoring.
\emph{Journal of the Iranian Statistical Society}, 25(2), 1-29. DOI: 10.22034/jirss.2026.2077492.1165.

Cheng, R. C. H., & Amin, N. A. K. (1983). Estimating parameters in continuous univariate distributions with a shifted origin.
\emph{Journal of the Royal Statistical Society: Series B (Methodological)}, 45(3), 394-403.
}
