Draws n
iid samples from a d
-variate exchangeable Marshall–Olkin
distribution parametrized by a vector of exchangeable shock-size arrival
intensities.
Usage
rexmo(n, d, theta, method = c("MDCM", "AM", "ESM"))
Arguments
- n
An integer for the number of samples.
- d
An integer for the dimension.
- theta
A numeric vector with the exchangeable shock-size arrival intensities.
- method
A string indicating which sampling algorithm should be used. Use
"MDCM"
for the Markovian death-counting model,"AM"
for the Arnold model, and"ESM"
for the exogenous shock model. We recommend using the ESM only for small dimensions; the AM can be used up until dimension \(30\).
Value
rexmo
returns a numeric matrix of size n
x d
. Each row corresponds to
an independently and identically (iid) distributed sample of a d
-variate
exchangeable Marshall–Olkin distribution with specified parameters.
Details
The exchangeable Marshall–Olkin distribution has the survival function $$ \bar{F}{(t)} = \exp{\left\{ -\sum_{i=1}^{d}{ {\left[ \sum_{j=0}^{d-i}{ \binom{d-i}{j} \lambda_{j+1} } \right]} \tau_{[i]} } \right\}} , \quad t = {(t_{1}, \ldots, t_{d})} > 0 , $$ for exchangeable shock arrival intensities \(\lambda_{i} \geq 0\), \(1 \leq i \leq d\) and \(t_{[1]} \geq \cdots \geq t_{[d]}\), see (Mai and Scherer 2017) .
The relationship of exchangeable shock-size arrival intensities to the shock-arrival intensities of the Marshall–Olkin distribution is given by: $$ \eta_{i} = \binom{d}{i} \lambda_{i} , \quad i \in {\{1, \ldots, n\}} . $$ The exchangeable shock-size arrival intensities correspond to the initial transition rates of independent exponential random variables in the Markovian death-counting model (MDCM).
Simulation algorithms
The Markovian death-counting model (MDCM) is a simulation algorithm used to generate samples from an exchangeable Marshall-Olkin distribution. It simulates the death-counting process of the random vector, which is a Markov process, until all components are "dead". This process defines an order statistic that is then used to obtain a sample through a random permutation. For more details on this algorithm, refer to (Sloot 2022) .
The exogenous shock model (ESM) and Arnold model (AM) simulation algorithms can be used to generate samples from the general Marshall–Olkin distribution. In these algorithms, the exchangeable shock-size arrival intensities are converted to the corresponding shock-arrival intensities and passed to the
rmo()
function.
References
Mai J, Scherer M (2017).
Simulating copulas: stochastic models, sampling algorithms and applications, Series in Quantitative Finance, 2 edition.
World Scientific.
doi:10.1142/10265
.
Sloot H (2022).
“Implementing Markovian models for extendible Marshall–Olkin distributions.”
Dependence Modeling, 10(1), 308--343.
doi:10.1515/demo-2022-0151
, https://doi.org/doi:10.1515/demo-2022-0151.
Examples
rexmo(
10, 3,
c(1.2, 0.3, 0.4)
)
#> [,1] [,2] [,3]
#> [1,] 1.24812829 1.24812829 1.24812829
#> [2,] 0.48634840 0.47052554 1.78880853
#> [3,] 0.65681707 0.65681707 1.01357792
#> [4,] 0.25423319 0.51533169 0.51533169
#> [5,] 0.14364802 0.14364802 0.55651569
#> [6,] 0.18964518 2.99437905 0.37855097
#> [7,] 0.48741620 2.61031553 0.11500470
#> [8,] 0.07373153 1.35269060 1.43765142
#> [9,] 0.62062733 0.62062733 0.62062733
#> [10,] 0.11890022 0.06306615 0.06306615
## independence
rexmo(
10, 3,
c(3, 0, 0)
)
#> [,1] [,2] [,3]
#> [1,] 0.323635082 1.76158120 2.45382131
#> [2,] 2.525282609 0.22320121 0.84900222
#> [3,] 0.223701625 2.78665057 2.53783359
#> [4,] 0.969602742 0.23504509 1.29601590
#> [5,] 0.983692274 0.05137713 0.75998744
#> [6,] 0.062369194 0.38124218 1.91800802
#> [7,] 0.857418643 0.43547614 0.23399003
#> [8,] 0.001038868 0.25164220 1.34978464
#> [9,] 0.837411324 0.01778692 0.76764158
#> [10,] 2.300344140 0.71425900 0.00741499
## comonotone
rexmo(
10, 3,
c(0, 0, 1)
)
#> [,1] [,2] [,3]
#> [1,] 0.5183168 0.5183168 0.5183168
#> [2,] 2.3729609 2.3729609 2.3729609
#> [3,] 1.0104158 1.0104158 1.0104158
#> [4,] 0.1514963 0.1514963 0.1514963
#> [5,] 1.3205617 1.3205617 1.3205617
#> [6,] 0.3468957 0.3468957 0.3468957
#> [7,] 1.3622047 1.3622047 1.3622047
#> [8,] 3.3790260 3.3790260 3.3790260
#> [9,] 0.6025503 0.6025503 0.6025503
#> [10,] 1.7651095 1.7651095 1.7651095
rexmo(
10, 3,
c(1.2, 0.3, 0.4),
method = "MDCM"
)
#> [,1] [,2] [,3]
#> [1,] 0.14121826 0.1412183 0.1412183
#> [2,] 2.69213140 1.0623892 2.2725220
#> [3,] 2.75819713 1.3599618 1.3599618
#> [4,] 1.06184200 1.4985106 1.4985106
#> [5,] 0.80863073 0.1510506 0.2297900
#> [6,] 0.34242933 0.3424293 2.1238143
#> [7,] 2.57179388 2.9439201 0.2451691
#> [8,] 0.75677086 0.2184215 1.1688276
#> [9,] 1.13290512 0.9245572 0.1159344
#> [10,] 0.01712256 3.1868653 0.2974880
## independence
rexmo(
10, 3,
c(3, 0, 0),
method = "MDCM"
)
#> [,1] [,2] [,3]
#> [1,] 0.12484451 0.12488045 0.3198860
#> [2,] 0.09781810 1.39609535 0.7083548
#> [3,] 2.41052478 0.16618177 1.1766452
#> [4,] 0.38266525 1.86615889 1.1197771
#> [5,] 0.02661438 0.46839103 0.4085215
#> [6,] 0.10738519 0.43408557 0.4809424
#> [7,] 0.03297437 0.46704954 0.7335127
#> [8,] 0.17384076 2.10204754 1.2186602
#> [9,] 1.48031845 0.68395080 0.4337029
#> [10,] 0.11259334 0.09670318 0.2463315
## comonotone
rexmo(
10, 3,
c(0, 0, 1),
method = "MDCM"
)
#> [,1] [,2] [,3]
#> [1,] 2.29826255 2.29826255 2.29826255
#> [2,] 1.15793598 1.15793598 1.15793598
#> [3,] 2.01196499 2.01196499 2.01196499
#> [4,] 2.23616817 2.23616817 2.23616817
#> [5,] 0.72107886 0.72107886 0.72107886
#> [6,] 0.78373196 0.78373196 0.78373196
#> [7,] 0.05259812 0.05259812 0.05259812
#> [8,] 0.74744020 0.74744020 0.74744020
#> [9,] 1.71822050 1.71822050 1.71822050
#> [10,] 0.04856027 0.04856027 0.04856027
rexmo(
10, 3,
c(1.2, 0.3, 0.4),
method = "AM"
)
#> [,1] [,2] [,3]
#> [1,] 1.43926802 1.94799687 0.04705807
#> [2,] 0.22853590 0.00907878 0.22853590
#> [3,] 1.30830516 1.88488402 1.88488402
#> [4,] 0.06869989 0.05353936 0.42985456
#> [5,] 1.22820504 1.22820504 1.22820504
#> [6,] 0.19416056 0.06250867 0.06250867
#> [7,] 0.27702987 0.19031433 0.27702987
#> [8,] 0.27458761 0.31582896 0.77459066
#> [9,] 1.64903010 0.13622790 2.20238194
#> [10,] 0.67769813 0.67769813 0.67769813
## independence
rexmo(
10, 3,
c(3, 0, 0),
method = "AM"
)
#> [,1] [,2] [,3]
#> [1,] 0.33701505 0.2473189 0.979247369
#> [2,] 0.70369158 0.3646893 0.162414210
#> [3,] 2.23078367 0.4197012 0.009829709
#> [4,] 0.23464860 1.6858060 0.737566681
#> [5,] 0.01781154 4.0248128 1.483777490
#> [6,] 0.96510390 1.1954639 0.457030197
#> [7,] 1.15840960 4.2019282 2.975544094
#> [8,] 2.55197317 0.1661977 0.243863497
#> [9,] 0.46882261 1.5675788 0.886858970
#> [10,] 1.71301886 0.5342615 0.691543318
## comonotone
rexmo(
10, 3,
c(0, 0, 1),
method = "AM"
)
#> [,1] [,2] [,3]
#> [1,] 0.38143820 0.38143820 0.38143820
#> [2,] 0.54960317 0.54960317 0.54960317
#> [3,] 0.44061157 0.44061157 0.44061157
#> [4,] 2.53032357 2.53032357 2.53032357
#> [5,] 3.09594521 3.09594521 3.09594521
#> [6,] 0.11517457 0.11517457 0.11517457
#> [7,] 0.28590440 0.28590440 0.28590440
#> [8,] 0.02643718 0.02643718 0.02643718
#> [9,] 0.56745503 0.56745503 0.56745503
#> [10,] 1.80836899 1.80836899 1.80836899
rexmo(
10, 3,
c(1.2, 0.3, 0.4),
method = "ESM"
)
#> [,1] [,2] [,3]
#> [1,] 0.2414913 0.6768541 0.86928184
#> [2,] 2.3424629 0.9520258 1.41077064
#> [3,] 1.2131195 1.2131195 1.21311948
#> [4,] 0.4415666 0.4415666 0.44156655
#> [5,] 0.5146282 1.3620439 0.03413037
#> [6,] 0.3812194 0.8569765 0.38121941
#> [7,] 0.4130806 0.4130806 0.41308063
#> [8,] 1.2303584 1.1172528 1.26976555
#> [9,] 0.2271262 1.2983898 0.18661145
#> [10,] 0.4028176 0.4028176 0.40281763
## independence
rexmo(
10, 3,
c(3, 0, 0),
method = "ESM"
)
#> [,1] [,2] [,3]
#> [1,] 0.1337382 0.4031007 0.35869338
#> [2,] 1.1937091 0.7122422 0.00172762
#> [3,] 1.8328224 1.3235227 1.43574533
#> [4,] 0.3049590 0.4688882 0.63502629
#> [5,] 0.9171085 0.4204346 0.35984127
#> [6,] 1.5298437 0.5309312 0.25393326
#> [7,] 0.4606769 0.8791399 0.17469336
#> [8,] 0.2767780 0.3234208 2.17911850
#> [9,] 0.7538959 1.5739987 1.35014191
#> [10,] 2.2507029 1.0062164 0.46594104
## comonotone
rexmo(
10, 3,
c(0, 0, 1),
method = "ESM"
)
#> [,1] [,2] [,3]
#> [1,] 0.45581045 0.45581045 0.45581045
#> [2,] 0.09144684 0.09144684 0.09144684
#> [3,] 0.46749264 0.46749264 0.46749264
#> [4,] 0.16870689 0.16870689 0.16870689
#> [5,] 1.46950074 1.46950074 1.46950074
#> [6,] 0.04305777 0.04305777 0.04305777
#> [7,] 0.44115116 0.44115116 0.44115116
#> [8,] 1.01066819 1.01066819 1.01066819
#> [9,] 0.20444482 0.20444482 0.20444482
#> [10,] 0.54432307 0.54432307 0.54432307