ragn | R Documentation |
Draws random values from an asymmetric generalised normal distribution.
ragn(n, location = 0, scale = 1, alpha = 0.5, beta = 2)
n |
number of instances |
location |
central location of the distribution |
scale |
scale of the distribution. Must be strictly positive: |
alpha |
value between 0.0 and 1.0 that determines the skewness of the
distribution. |
beta |
Strictly positive value ( |
Random values drawn according to an asymmetric generalised normal distribution. Here the asymmetric generalised normal distribution is a symmetric general normal distribution, that is made asymmetric using the procedure described by Gijbels et al. To generate random values we use the quantile function of the symmetric generalised normal distribution that was derived by M. Griffin.
The default parameter values produce values as if drawn from the standard
normal distribution with \sigma = \sqrt{2}
, that is, the standard
deviation is not \sqrt{2}
instead of 1
.
One or more numeric values drawn from the asymmetric generalised normal distribution.
Gijbels I, Karim R, Verhasselt A. Quantile Estimation in a Generalized
Griffin M (2018). gnorm: Generalized Normal/Exponential Power Distribution.
# Draw values from a standard normal distribution.
x <- power.transform::ragn(n = 10000, scale = 1/sqrt(2))
hist(x, 50)
# Draw values from a left-skewed normal distribution.
x <- power.transform::ragn(n = 10000, scale = 1/sqrt(2), alpha = 0.8)
hist(x, 50)
# Draw values from a right-skewed normal distribution.
x <- power.transform::ragn(n = 10000, scale = 1/sqrt(2), alpha = 0.2)
hist(x, 50)
# Draw values from a standard laplace distribution.
x <- power.transform::ragn(n = 10000, scale = 1/sqrt(2), beta = 1.0)
hist(x, 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.