Skip to contents

The distribution of the minimum (a series system) or maximum (a parallel system) of several component random variables, with an optional dependency structure. Mirrors the C# CompetingRisks composite.

Usage

dist_competing_risks(
  components,
  minimum_of = TRUE,
  dependency = "Independent",
  correlation = NULL
)

Arguments

components

a list of corehydro_dist objects, the component distributions.

minimum_of

TRUE (the default) for the distribution of the minimum of components; FALSE for the maximum.

dependency

one of "Independent" (the default), "PerfectlyPositive", "PerfectlyNegative", or "CorrelationMatrix".

correlation

a square numeric correlation matrix; required when dependency = "CorrelationMatrix", ignored otherwise.

Value

a corehydro_dist of family "CompetingRisks", accepted by every dist_*() verb.

Examples

d <- dist_competing_risks(
  list(distribution("Weibull", c(1, 2)), distribution("Weibull", c(1, 3)))
)
dist_cdf(d, 1.5)
#> [1] 0.9963934