Amoroso distribution
amoroso.RdScalar Amoroso utilities used as flexible positive-support base kernels and mixture components.
The package parameterization uses loc, scale, shape1, and shape2, allowing the family
to represent a broad range of skewed bulk shapes.
Usage
dAmoroso(x, loc, scale, shape1, shape2, log = 0)
pAmoroso(q, loc, scale, shape1, shape2, lower.tail = 1, log.p = 0)
qAmoroso(p, loc, scale, shape1, shape2, lower.tail = TRUE, log.p = FALSE)
rAmoroso(n, loc, scale, shape1, shape2)Arguments
- x
Numeric scalar giving the point at which the density is evaluated.
- loc
Numeric scalar location parameter.
- scale
Numeric scalar scale parameter.
- shape1
Numeric scalar first shape parameter.
- shape2
Numeric scalar second shape parameter.
- log
Logical; if
TRUE, return the log-density (integer flag0/1in NIMBLE).- q
Numeric scalar giving the point at which the distribution function is evaluated.
- lower.tail
Logical; if
TRUE(default), probabilities are \(P(X \le q)\).- log.p
Logical; if
TRUE, probabilities are returned on the log scale.- p
Numeric scalar probability in \((0,1)\) for the quantile function.
- n
Integer giving the number of draws. For portability inside NIMBLE, the RNG implementation supports
n = 1.
Value
Density/CDF/RNG functions return numeric scalars. The quantile function returns a numeric
scalar or vector matching the length of p.
Details
Writing loc = a, scale = theta, shape1 = alpha, and shape2 = beta, the transformed
quantity \(((X - a) / \theta)^\beta\) follows a gamma law with shape \(\alpha\).
These uppercase NIMBLE-compatible functions are scalar (x/q and n = 1).
For vectorized R usage, use base_lowercase().
The Amoroso family used in the package is defined by the density $$ f(x) = \left|\frac{\beta}{\theta}\right| \frac{z^{\alpha \beta - 1}\exp(-z^\beta)}{\Gamma(\alpha)}, \qquad z = \frac{x-a}{\theta}, $$ on the side of the location parameter determined by the sign of \(\theta\). Equivalently, \(Z = ((X-a)/\theta)^\beta\) follows a Gamma distribution with shape \(\alpha\) and unit scale. That representation explains why the quantile function is computed from a gamma quantile and then mapped back through the inverse transformation.
The mean exists whenever \(\alpha + 1/\beta\) lies in the domain of the gamma function used by the moment formula. In the package this family serves as a flexible positive-support bulk kernel capable of reproducing gamma-like, Weibull-like, and other skewed shapes with a single parameterization.
Functions
dAmoroso(): Density Function of Amoroso DistributionpAmoroso(): Distribution Function of Amoroso DistributionqAmoroso(): Quantile Function of Amoroso DistributionrAmoroso(): Sample generating Function of Amoroso Distribution
See also
Examples
loc <- 0
scale <- 1.5
shape1 <- 2
shape2 <- 1.2
dAmoroso(1.0, loc, scale, shape1, shape2, log = 0)
#> [1] 0.2452362
pAmoroso(1.0, loc, scale, shape1, shape2, lower.tail = 1, log.p = 0)
#> [1] 0.126778
qAmoroso(0.50, loc, scale, shape1, shape2)
#> [1] 2.309366
qAmoroso(0.95, loc, scale, shape1, shape2)
#> [1] 5.489526
replicate(10, rAmoroso(1, loc, scale, shape1, shape2))
#> [1] 2.7006836 1.1196594 0.2684797 2.1882428 2.3012404 1.5863122 3.3273216
#> [8] 3.5601145 4.3648873 1.1861036