% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/censor_schemes.R
\name{r_progressive_hybrid_type2_censor}
\alias{r_progressive_hybrid_type2_censor}
\title{Type-II progressively hybrid censoring}
\usage{
r_progressive_hybrid_type2_censor(
  n,
  dist,
  scheme,
  r_failures = NULL,
  cen_time,
  seed = NULL
)
}
\arguments{
\item{n}{sample size.}

\item{dist}{a \code{\link{dist_spec}} object.}

\item{scheme}{integer vector of removals at successive failure times.}

\item{r_failures}{target number of failures (default
\eqn{\lfloor 0.7 n \rfloor}).}

\item{cen_time}{pre-set maximum experiment time.}

\item{seed}{optional integer seed.}
}
\value{
A \code{censored_sample} object (S3 class) containing:
\code{scheme} (character "progressive_hybrid_type2"), \code{dist} (the \code{dist_spec}),
\code{n} (integer sample size), \code{seed}, \code{t_true} (numeric
vector of latent failure times), \code{x} (observed/censored values),
\code{status} (integer: 0 = right-censored, 1 = event, 2 = left-censored,
3 = interval-censored, 4 = middle-censored), \code{time2}
(upper interval bound where applicable, \code{NA} otherwise), and
\code{extra} (list containing \code{scheme}, \code{r_failures}, \code{cen_time},
and \code{stop_time}).
}
\description{
Combines progressive Type-II censoring with a pre-set time limit
\code{cen_time}.  Progressive removals according to \code{scheme} are
applied at each failure.  The experiment terminates at
\eqn{\min(X_{m:m:n}, T)}, where \eqn{X_{m:m:n}} is the \code{m}-th
(i.e., \code{r_failures}-th) failure among the remaining units and
\eqn{T} is \code{cen_time}.  If fewer than \code{r_failures} events
occur before \code{cen_time}, all surviving units are censored at
\code{cen_time}.  See Kundu and Joarder (2006)
\doi{10.1016/j.csda.2005.05.002}.
}
\examples{
d <- dist_spec(q = function(u, p) -log(1 - u) / p$rate,
               param = list(rate = 1), name = "Exp(1)")
r_progressive_hybrid_type2_censor(30, d, scheme = c(1, 1, 1),
                                  r_failures = 10, cen_time = 3, seed = 1)
}
