rmo | R Documentation |
Draws n
iid samples from a d
-variate Marshall–Olkin distribution
parametrized by a vector of shock-arrival intensities.
rmo(n, d, lambda, method = c("AM", "ESM"))
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 |
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} }
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.
Mai2017armo
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.
Other sampling-algorithms:
rexmo()
,
rextmo()
,
rpextmo()
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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.