rpcens2: Generate Progressive Type-II Censored Samples

View source: R/functions.R

rpcens2R Documentation

Generate Progressive Type-II Censored Samples

Description

This function generates progressive Type-II censored samples based on the algorithm provided by Balakrishnan and Sandhu (1995).

Usage

rpcens2(n, R, dist, ...)

Arguments

n

total number of items in the sample.

R

a vector of non-negative integers representing the number of items censored at each stage of the experiment. The length of R determines the number of failure stages (m), and the sum of R plus m must equal n.

dist

a character string specifying the name of the distribution (e.g., "norm" for the normal distribution, "exp" for the exponential distribution).

...

further arguments to be passed to dist.

Details

This function implements the algorithm described by Balakrishnan and Sandhu (1995) to simulate progressive Type-II censored samples. Progressive Type-II censoring is a common scheme in reliability and life-testing experiments, where items are progressively removed (censored) during the testing process.

Value

A numeric vector of size m, representing the failure times of the observed items.

References

Balakrishnan, N., & Sandhu, R. A. (1995). A simple simulational algorithm for generating progressive Type-II censored samples. The American Statistician, 49(2), 229-230.

See Also

rcens

Examples

# Generate a progressive Type-II censored sample from the normal distribution
n <- 10
R <- c(2, 1, 2, 0, 0)
rpcens2(n, R, dist = "norm", mean = 0, sd = 1)

# Generate a progressive Type-II censored sample from the exponential distribution
rpcens2(n = 10, R = c(2, 2, 1, 0, 0), dist = "exp", rate = 1)


mos documentation built on June 16, 2025, 5:09 p.m.