gen_type1_hybrid: Generate Data under Type-I Hybrid Censoring Scheme

View source: R/gen_data.R

gen_type1_hybridR Documentation

Generate Data under Type-I Hybrid Censoring Scheme

Description

Generate Data under Type-I Hybrid Censoring Scheme

Usage

gen_type1_hybrid(pdf, cdf, lower = 0, upper = Inf, n, r, T_star, seed = NULL)

Arguments

pdf

Probability density function.

cdf

Cumulative distribution function.

lower

Lower bound of the support of the distribution.

upper

Upper bound of the support of the distribution.

n

Total sample size.

r

Minimum required number of failures.

T_star

Fixed termination time.

seed

Optional integer random seed for reproducibility.

Value

A list containing:

observed_times

Vector of observed failure/censoring times.

censor_status

Binary indicator (1 for failure, 0 for censored at T_star).

n_failures

Number of observed failures.

termination_time

Effective termination time of the test.

scheme

Character string indicating censoring scheme.

Examples

gen_type1_hybrid(
  pdf = function(x) dexp(x, rate = 1),
  cdf = function(x) pexp(x, rate = 1),
  lower = 0, upper = 10, n = 20, r = 10,
  T_star = 1.5, seed = 123
)

CompRiskRel documentation built on Aug. 5, 2026, 9:08 a.m.