rsubbo {Rsubbotools} | R Documentation |
Produces a random sample from a Subbotin distribution
Description
Generate pseudo random-number from a Subbotin distribution using the Tadikamalla method.
Usage
rsubbo(n, m = 0, a = 1, b = 2)
Arguments
n |
(int) - the size of the sample. |
m |
(numeric) - the location parameter. |
a |
(numeric) - the scale parameter. |
b |
(numeric) - the shape parameter. |
Details
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.
Value
a numeric vector containing a random sample.
Examples
sample_gamma <- rsubbo(1000, 1, 1)