% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/amoroso.R
\name{amoroso_gpd}
\alias{amoroso_gpd}
\alias{dAmorosoGpd}
\alias{pAmorosoGpd}
\alias{rAmorosoGpd}
\alias{qAmorosoGpd}
\title{Amoroso with a GPD tail}
\usage{
dAmorosoGpd(
  x,
  loc,
  scale,
  shape1,
  shape2,
  threshold,
  tail_scale,
  tail_shape,
  log = 0
)

pAmorosoGpd(
  q,
  loc,
  scale,
  shape1,
  shape2,
  threshold,
  tail_scale,
  tail_shape,
  lower.tail = 1,
  log.p = 0
)

rAmorosoGpd(n, loc, scale, shape1, shape2, threshold, tail_scale, tail_shape)

qAmorosoGpd(
  p,
  loc,
  scale,
  shape1,
  shape2,
  threshold,
  tail_scale,
  tail_shape,
  lower.tail = TRUE,
  log.p = FALSE,
  tol = 1e-10,
  maxiter = 200
)
}
\arguments{
\item{x}{Numeric scalar giving the point at which the density is evaluated.}

\item{loc}{Numeric scalar location parameter of the Amoroso bulk.}

\item{scale}{Numeric scalar scale parameter of the Amoroso bulk.}

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

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

\item{threshold}{Numeric scalar threshold at which the GPD tail is attached.}

\item{tail_scale}{Numeric scalar GPD scale parameter; must be positive.}

\item{tail_shape}{Numeric scalar GPD 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{n}{Integer giving the number of draws. The RNG implementation supports \code{n = 1}.}

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

\item{tol}{Numeric tolerance for numerical inversion in \code{qAmorosoGpd}.}

\item{maxiter}{Maximum iterations for numerical inversion in \code{qAmorosoGpd}.}
}
\value{
Spliced density/CDF/RNG functions return numeric scalars. \code{qAmorosoGpd()} returns a
numeric vector with the same length as \code{p}.
}
\description{
Spliced family obtained by attaching a generalized Pareto tail above \code{threshold} to a single
Amoroso bulk.
}
\details{
This is the single-component Amoroso splice. The Amoroso law controls the distribution below the
threshold and the GPD controls exceedances above it, scaled so that the resulting CDF is
continuous at the threshold. The ordinary mean of the spliced law exists only when the tail
satisfies \eqn{\xi < 1}; otherwise users should rely on restricted means or quantile summaries.
}
\section{Functions}{
\itemize{
\item \code{dAmorosoGpd()}: Density Function of Amoroso Distribution with GPD Tail

\item \code{pAmorosoGpd()}: Cumulative Distribution Function of Amoroso Distribution with GPD Tail

\item \code{rAmorosoGpd()}: Random Generation for Amoroso Distribution with GPD Tail

\item \code{qAmorosoGpd()}: Quantile Function of Amoroso Distribution with GPD Tail

}}
\examples{
loc <- 0
scale <- 1.5
shape1 <- 2
shape2 <- 1.2
threshold <- 3
tail_scale <- 1.0
tail_shape <- 0.2

dAmorosoGpd(4.0, loc, scale, shape1, shape2,
           threshold, tail_scale, tail_shape, log = 0)
pAmorosoGpd(4.0, loc, scale, shape1, shape2,
           threshold, tail_scale, tail_shape, lower.tail = 1, log.p = 0)
qAmorosoGpd(0.50, loc, scale, shape1, shape2,
           threshold, tail_scale, tail_shape)
qAmorosoGpd(0.95, loc, scale, shape1, shape2,
           threshold, tail_scale, tail_shape)
replicate(10, rAmorosoGpd(1, loc, scale, shape1, shape2,
                         threshold, tail_scale, tail_shape))
}
\seealso{
\code{\link[=amoroso_mix]{amoroso_mix()}}, \code{\link[=amoroso_mixgpd]{amoroso_mixgpd()}}, \code{\link[=gpd]{gpd()}}, \code{\link[=amoroso_lowercase]{amoroso_lowercase()}}.

Other amoroso kernel families: 
\code{\link{amoroso_mix}},
\code{\link{amoroso_mixgpd}}
}
\concept{amoroso kernel families}
