Skip to contents

Draws n iid samples from a d-variate extendible Marshall–Olkin distribution parametrized by a Bernstein function bf.

Usage

rextmo(n, d, bf, method = c("MDCM", "AM", "ESM"))

Arguments

n

An integer for the number of samples.

d

An integer for the dimension.

bf

A BernsteinFunction representing the Bernstein function of a extendible Marshall–Olkin distribution.

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

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

Details

The extendible Marshall–Olkin distribution has the survival function $$ \bar{F}{(t)} = \exp{\left\{ - \sum_{i=1}^{d}{ {[ \psi{(i)} - \psi{(i-1)} ]} t_{[i]} } \right\}} , \quad t = {(t_{1}, \ldots, t_{d})} > 0 , $$ for Bernstein functions \(\psi\), see BernsteinFunction, and \(t_{[1]} \geq \cdots \geq t_{[d]}\), see (Mai and Scherer 2017) .

The relationship between Bernstein functions and exchangeable shock-size arrival intensities of the exchangeable Marshall–Olkin distribution, see rexmo(), is as follows: $$ \eta_{i} = \binom{d}{i} {(-1)}^{i-1} \Delta{ \psi{(d-i)} } , \quad i \in {\{ 1 , \ldots , d \}} . $$

This formula for the exchangeable shock-size arrival intensities is not numerically stable in higher dimensions, and rextmo() uses approximation techniques from (Sloot 2022) to calculate them.

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.

See also

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

Examples

rextmo(
  10, 3,
  AlphaStableBernsteinFunction(alpha = log2(2 - 0.5))
)
#>            [,1]        [,2]      [,3]
#>  [1,] 1.0872304 2.792422255 2.9725145
#>  [2,] 3.6450810 3.645080973 0.3804027
#>  [3,] 0.5792869 0.169943024 0.1699430
#>  [4,] 1.0469452 2.282182095 2.4644173
#>  [5,] 1.0330454 0.423650580 1.0330454
#>  [6,] 0.7331805 0.002293368 1.9656892
#>  [7,] 0.4766692 0.705533671 0.7055337
#>  [8,] 0.4413880 0.441387973 1.4510156
#>  [9,] 0.4115962 0.882216696 0.2871684
#> [10,] 0.0802551 0.080255102 1.8376307
# independence
rextmo(
  10, 3,
  LinearBernsteinFunction(scale = 1)
)
#>            [,1]      [,2]      [,3]
#>  [1,] 1.6411971 3.8119882 0.5990257
#>  [2,] 3.2562000 0.7061565 1.3115348
#>  [3,] 1.6711142 1.0056146 0.7735775
#>  [4,] 1.8368560 0.7249240 1.1799694
#>  [5,] 0.2379712 0.1242276 0.3248210
#>  [6,] 1.6553843 0.2783175 0.5640013
#>  [7,] 1.1059275 3.6414076 0.2085992
#>  [8,] 1.7976998 0.9169977 0.2978873
#>  [9,] 0.1357380 0.3336813 0.9044296
#> [10,] 0.6573731 1.5758531 1.8963599
# comonotone
rextmo(
  10, 3,
  ConstantBernsteinFunction(constant = 1)
)
#>            [,1]      [,2]      [,3]
#>  [1,] 4.3011018 4.3011018 4.3011018
#>  [2,] 1.0655519 1.0655519 1.0655519
#>  [3,] 1.3208260 1.3208260 1.3208260
#>  [4,] 2.9288245 2.9288245 2.9288245
#>  [5,] 1.1715608 1.1715608 1.1715608
#>  [6,] 0.1065810 0.1065810 0.1065810
#>  [7,] 1.3158619 1.3158619 1.3158619
#>  [8,] 0.4641451 0.4641451 0.4641451
#>  [9,] 3.8443458 3.8443458 3.8443458
#> [10,] 2.1129294 2.1129294 2.1129294

rextmo(
  10, 3,
  AlphaStableBernsteinFunction(alpha = log2(2 - 0.5)),
  method = "AM"
)
#>            [,1]       [,2]       [,3]
#>  [1,] 2.1753048 0.58172535 0.66567357
#>  [2,] 0.4259764 0.42597641 0.42597641
#>  [3,] 0.1028965 0.10289648 0.10289648
#>  [4,] 1.2307672 0.54766356 0.54766356
#>  [5,] 0.1887831 0.18878313 2.65736334
#>  [6,] 0.9687834 0.19981060 1.25201838
#>  [7,] 0.3967045 0.60101202 1.14465128
#>  [8,] 0.5170917 0.05121645 0.51709166
#>  [9,] 0.5643279 0.56432792 0.56432792
#> [10,] 1.2964948 1.29649481 0.05490517
# independence
rextmo(
  10, 3,
  LinearBernsteinFunction(scale = 1),
  method = "AM"
)
#>            [,1]      [,2]      [,3]
#>  [1,] 0.9630554 1.6107066 0.3570616
#>  [2,] 0.4407074 1.9178355 0.4748393
#>  [3,] 0.1490991 1.3944559 0.6555654
#>  [4,] 0.2679317 1.1935537 0.2396400
#>  [5,] 0.5332349 0.9546471 2.1059928
#>  [6,] 0.7561929 3.0058950 0.8234033
#>  [7,] 0.1393863 0.2176269 1.6825048
#>  [8,] 0.1396111 1.0587873 0.9650992
#>  [9,] 0.5313197 0.1490523 0.2252934
#> [10,] 0.2352280 0.4372914 0.4384672
# comonotone
rextmo(
  10, 3,
  ConstantBernsteinFunction(constant = 1),
  method = "AM"
)
#>            [,1]      [,2]      [,3]
#>  [1,] 1.6247460 1.6247460 1.6247460
#>  [2,] 0.9178814 0.9178814 0.9178814
#>  [3,] 2.6424760 2.6424760 2.6424760
#>  [4,] 0.3693751 0.3693751 0.3693751
#>  [5,] 1.4027242 1.4027242 1.4027242
#>  [6,] 0.1444253 0.1444253 0.1444253
#>  [7,] 0.5222246 0.5222246 0.5222246
#>  [8,] 2.5005813 2.5005813 2.5005813
#>  [9,] 1.3610902 1.3610902 1.3610902
#> [10,] 1.2047865 1.2047865 1.2047865

rextmo(
  10, 3,
  AlphaStableBernsteinFunction(alpha = log2(2 - 0.5)),
  method = "ESM"
)
#>            [,1]      [,2]      [,3]
#>  [1,] 1.1145959 2.0169782 2.0169782
#>  [2,] 2.6961030 0.8760312 2.6961030
#>  [3,] 0.1454685 0.1454685 0.1454685
#>  [4,] 1.0154625 1.3137280 1.0154625
#>  [5,] 1.3303817 0.4974266 1.9690948
#>  [6,] 0.8186939 0.3737764 0.4896543
#>  [7,] 0.1033532 0.1033532 0.1033532
#>  [8,] 3.6114416 1.5738218 2.6873203
#>  [9,] 2.0072453 2.8618523 0.4438147
#> [10,] 0.3982220 0.6322462 0.5414308
# independence
rextmo(
  10, 3,
  LinearBernsteinFunction(scale = 1),
  method = "ESM"
)
#>            [,1]       [,2]        [,3]
#>  [1,] 1.0482667 0.29932952 0.132269757
#>  [2,] 1.8800452 0.78485500 0.197307731
#>  [3,] 0.1896417 2.47906218 0.489811563
#>  [4,] 0.4510803 0.60559777 0.006899859
#>  [5,] 0.7518321 0.07228223 1.563443373
#>  [6,] 0.9530684 0.35148384 1.946474349
#>  [7,] 0.5261581 0.78501282 0.322845910
#>  [8,] 0.3881392 0.76686648 1.910238074
#>  [9,] 1.3475999 1.45035432 4.321532268
#> [10,] 0.2599657 2.34783097 1.094813817
# comonotone
rextmo(
  10, 3,
  ConstantBernsteinFunction(constant = 1),
  method = "ESM"
)
#>             [,1]       [,2]       [,3]
#>  [1,] 0.20081123 0.20081123 0.20081123
#>  [2,] 0.36210751 0.36210751 0.36210751
#>  [3,] 4.28051980 4.28051980 4.28051980
#>  [4,] 1.02321426 1.02321426 1.02321426
#>  [5,] 0.32834311 0.32834311 0.32834311
#>  [6,] 0.62036333 0.62036333 0.62036333
#>  [7,] 0.06631438 0.06631438 0.06631438
#>  [8,] 0.07198635 0.07198635 0.07198635
#>  [9,] 0.65923089 0.65923089 0.65923089
#> [10,] 0.63313330 0.63313330 0.63313330