gen_stress_strength: Generate Data for Stress-Strength Reliability Models

View source: R/gen_data.R

gen_stress_strengthR Documentation

Generate Data for Stress-Strength Reliability Models

Description

Generate Data for Stress-Strength Reliability Models

Usage

gen_stress_strength(
  pdf_X,
  cdf_X,
  pdf_Y,
  cdf_Y,
  lower_X = 0,
  upper_X = Inf,
  lower_Y = 0,
  upper_Y = Inf,
  n_X,
  n_Y,
  censoring_type = c("type1_hybrid", "type2_hybrid", "prog_hybrid"),
  r_X = NULL,
  T_X = NULL,
  r_Y = NULL,
  T_Y = NULL,
  seed = NULL
)

Arguments

pdf_X

Density function for stress X.

cdf_X

Cumulative distribution function for stress X.

pdf_Y

Density function for strength Y.

cdf_Y

Cumulative distribution function for strength Y.

lower_X

Lower bound for X.

upper_X

Upper bound for X.

lower_Y

Lower bound for Y.

upper_Y

Upper bound for Y.

n_X

Sample size for stress X.

n_Y

Sample size for strength Y.

censoring_type

Censoring scheme.

r_X

Minimum required failures for X.

T_X

Time cutoff for X.

r_Y

Minimum required failures for Y.

T_Y

Time cutoff for Y.

seed

Optional random seed.

Value

A list containing generated stress dataset X and strength dataset Y.

Examples

gen_stress_strength(
  pdf_X = function(x) dexp(x, rate = 1.2),
  cdf_X = function(x) pexp(x, rate = 1.2),
  pdf_Y = function(y) dexp(y, rate = 0.8),
  cdf_Y = function(y) pexp(y, rate = 0.8),
  n_X = 20, n_Y = 20,
  censoring_type = "type1_hybrid",
  r_X = 12, T_X = 1.2, r_Y = 12, T_Y = 1.5, seed = 123
)

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