rmo: Simulate from Marshall–Olkin distributions

View source: R/sample-rmo.R

rmoR Documentation

Simulate from Marshall–Olkin distributions

Description

Draws n iid samples from a d-variate Marshall–Olkin distribution parametrized by a vector of shock-arrival intensities.

Usage

rmo(n, d, lambda, method = c("AM", "ESM"))

Arguments

n

An integer for the number of samples.

d

An integer for the dimension.

lambda

A numeric vector for the shock-arrival intensities.

method

A string indicating which sampling algorithm should be used. Use "AM" for the Arnold model and "ESM" for the exogenous shock model. We recommend using the ESM for small dimensions only; the AM can be used up until dimension 30.

Details

The Marshall–Olkin distribution was introduced in \insertCiteMarshall1967armo. It is characterized by the survival function:

\bar{F}{(t)} = \exp{\left\{ - \sum_{I} \lambda_I \max_{i \in I} t_i \right\}}, \quad t = {(t_{1}, \ldots, t_{d})} > 0,

for shock-arrival intensities \lambda_I \geq 0, \emptyset \neq I \subseteq {\{ 1 , \ldots, d \}}. The shock-arrival intensities correspond to the rates of independent exponential random variables in the exogenous shock model (ESM). If \lambda_{I} is zero, it means that the shock I never arrives.

To map subsets of {\{ 1, \ldots, d\}} to integers 0, \ldots, 2^d-1, we use a binary representation:

I \equiv \sum_{k \in I}{ 2^{k-1} }

Simulation algorithms

  • The exogenous shock model (ESM) is a simulation algorithm for generating samples from a Marshall–Olkin distributed random vector. It works by generating independent exponentially distributed shock arrival times for all non-empty subsets of components. Each component's death time is then defined as the minimum of all shock arrival times corresponding to a subset containing that component. See \insertCiteMarshall1967armo.

  • The Arnold model (AM) is a simulation algorithm used to generate samples from a Marshall–Olkin distributed random vector. It simulates a marked homogeneous Poisson process with set-valued marks, where the process is stopped when all components are hit by a shock. See \insertCiteArnold1975armo.

\insertNoCite

Mai2017armo

Value

rmo returns a numeric matrix of size n x d. Each row corresponds to an independently and identically (iid) distributed sample from a d-variate Marshall–Olkin distribution with specified parameters.

References

\insertAllCited

See Also

Other sampling-algorithms: rexmo(), rextmo(), rpextmo()

Examples

rmo(
  10, 3,
  c(0.4, 0.4, 0.1, 0.4, 0.1, 0.1, 0.4)
)
## independence
rmo(
  10, 3,
  c(1, 1, 0, 1, 0, 0, 0)
)
## comonotone
rmo(
  10, 3,
  c(0, 0, 0, 0, 0, 0, 1)
)

rmo(
  10, 3,
  c(0.4, 0.4, 0.1, 0.4, 0.1, 0.1, 0.4),
  method = "ESM"
)
## independence
rmo(
  10, 3,
  c(1, 1, 0, 1, 0, 0, 0),
  method = "ESM"
)
## comonotone
rmo(
  10, 3,
  c(0, 0, 0, 0, 0, 0, 1),
  method = "ESM"
)

rmo(
  10, 3,
  c(0.4, 0.4, 0.1, 0.4, 0.1, 0.1, 0.4),
  method = "AM"
)
## independence
rmo(
  10, 3,
  c(1, 1, 0, 1, 0, 0, 0),
  method = "AM"
)
## comonotone
rmo(
  10, 3,
  c(0, 0, 0, 0, 0, 0, 1),
  method = "AM"
)

hsloot/rmo documentation built on May 1, 2024, 4:28 a.m.