% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/0-base-distributions.R
\name{amoroso}
\alias{amoroso}
\alias{dAmoroso}
\alias{pAmoroso}
\alias{rAmoroso}
\alias{qAmoroso}
\title{Amoroso distribution}
\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{
\item{x}{Numeric scalar giving the point at which the density is evaluated.}

\item{loc}{Numeric scalar location parameter.}

\item{scale}{Numeric scalar scale parameter.}

\item{shape1}{Numeric scalar first shape parameter.}

\item{shape2}{Numeric scalar second shape parameter.}

\item{log}{Logical; if \code{TRUE}, return the log-density (integer flag \code{0/1} in NIMBLE).}

\item{q}{Numeric scalar giving the point at which the distribution function is evaluated.}

\item{lower.tail}{Logical; if \code{TRUE} (default), probabilities are \eqn{P(X \le q)}.}

\item{log.p}{Logical; if \code{TRUE}, probabilities are returned on the log scale.}

\item{p}{Numeric scalar probability in \eqn{(0,1)} for the quantile function.}

\item{n}{Integer giving the number of draws. For portability inside NIMBLE,
the RNG implementation supports \code{n = 1}.}
}
\value{
Density/CDF/RNG functions return numeric scalars. The quantile function returns a numeric
scalar or vector matching the length of \code{p}.
}
\description{
Scalar Amoroso utilities used as flexible positive-support base kernels and mixture components.
The package parameterization uses \code{loc}, \code{scale}, \code{shape1}, and \code{shape2}, allowing the family
to represent a broad range of skewed bulk shapes.
}
\details{
Writing \code{loc = a}, \code{scale = theta}, \code{shape1 = alpha}, and \code{shape2 = beta}, the transformed
quantity \eqn{((X - a) / \theta)^\beta} follows a gamma law with shape \eqn{\alpha}.

These uppercase NIMBLE-compatible functions are scalar (\code{x}/\code{q} and \code{n = 1}).
For vectorized R usage, use \code{\link[=base_lowercase]{base_lowercase()}}.

The Amoroso family used in the package is defined by the density
\deqn{
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 \eqn{\theta}. Equivalently,
\eqn{Z = ((X-a)/\theta)^\beta} follows a Gamma distribution with shape \eqn{\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 \eqn{\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.
}
\section{Functions}{
\itemize{
\item \code{dAmoroso()}: Density Function of Amoroso Distribution

\item \code{pAmoroso()}: Distribution Function of Amoroso Distribution

\item \code{qAmoroso()}: Quantile Function of Amoroso Distribution

\item \code{rAmoroso()}: Sample generating Function of Amoroso Distribution

}}
\examples{
loc <- 0
scale <- 1.5
shape1 <- 2
shape2 <- 1.2

dAmoroso(1.0, loc, scale, shape1, shape2, log = 0)
pAmoroso(1.0, loc, scale, shape1, shape2, lower.tail = 1, log.p = 0)
qAmoroso(0.50, loc, scale, shape1, shape2)
qAmoroso(0.95, loc, scale, shape1, shape2)
replicate(10, rAmoroso(1, loc, scale, shape1, shape2))
}
\seealso{
\code{\link[=amoroso_mix]{amoroso_mix()}}, \code{\link[=amoroso_gpd]{amoroso_gpd()}}, \code{\link[=base_lowercase]{base_lowercase()}}, \code{\link[=kernel_support_table]{kernel_support_table()}}.

Other base bulk distributions: 
\code{\link{InvGauss}},
\code{\link{cauchy}}
}
\concept{base bulk distributions}
