rsubbo | R Documentation |
Generate pseudo random-number from a Subbotin distribution using the Tadikamalla method.
rsubbo(n, m = 0, a = 1, b = 2)
n |
(int) - the size of the sample. |
m |
(numeric) - the location parameter. |
a |
(numeric) - the scale parameter. |
b |
(numeric) - the shape parameter. |
The Subbotin distribution is given by the function:
f(x;a,b,m) = \frac{1}{A} e^{- \frac{1}{b} \left|\frac{x-m}{a}\right|^b}
where m
is a location parameter, b
is a shape parameter, a
is a scale parameter and \Gamma
representes the gamma function.
Since the Subbotin distribution is basically the exponential distribution
with scale parameter a = ab^{1/b}
and m=0
, we use the same
method of the exponential power RNG and add the location parameter.
Details can be found on the documentation of the rpower
function.
a numeric vector containing a random sample.
sample_gamma <- rsubbo(1000, 1, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.