| Library: | distribs |
| See also: | randgeo ranpois |
| Quantlet: | randmix2exp | |
| Description: | generates pseudo random variables with mixture of two exponentials distribution. |
| Usage: | r = randmix2exp (n, m, b1, b2, p) | |
| Input: | ||
| n | positive integer, number of rows | |
| m | positive integer, number of colums | |
| b1 | scalar, positive parameter (mean) from first exponential distribution function | |
| b2 | scalar, positive parameter (mean) from second exponential distribution function | |
| p | scalar, mixture parameter, part of first distribution in total distribution function (0 < p < 1) | |
| Output: | ||
| r | n x m matrix, pseudo random variables | |
library("distribs")
randomize2(0)
randmix2exp(10, 1, 13, 5, 0.2)
Contents of r [ 1,] 9.9191 [ 2,] 1.9904 [ 3,] 21.58 [ 4,] 0.52857 [ 5,] 0.16846 [ 6,] 9.2507 [ 7,] 3.4047 [ 8,] 15.74 [ 9,] 9.3186 [10,] 3.2709