% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/laplace.R
\name{laplace_gpd}
\alias{laplace_gpd}
\alias{dLaplaceGpd}
\alias{pLaplaceGpd}
\alias{rLaplaceGpd}
\alias{qLaplaceGpd}
\title{Laplace with a GPD tail}
\usage{
dLaplaceGpd(x, location, scale, threshold, tail_scale, tail_shape, log = 0)

pLaplaceGpd(
  q,
  location,
  scale,
  threshold,
  tail_scale,
  tail_shape,
  lower.tail = 1,
  log.p = 0
)

rLaplaceGpd(n, location, scale, threshold, tail_scale, tail_shape)

qLaplaceGpd(
  p,
  location,
  scale,
  threshold,
  tail_scale,
  tail_shape,
  lower.tail = TRUE,
  log.p = FALSE
)
}
\arguments{
\item{x}{Numeric scalar giving the point at which the density is evaluated.}

\item{location}{Numeric scalar location parameter for the Laplace bulk.}

\item{scale}{Numeric scalar scale parameter for the Laplace bulk.}

\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.}

\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.}
}
\value{
Spliced density/CDF/RNG functions return numeric scalars. \code{qLaplaceGpd()} 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
Laplace bulk.
}
\details{
This topic pairs a single Laplace bulk distribution with a generalized Pareto exceedance tail.
The splice is continuous at the threshold because the tail density is multiplied by the Laplace
survival probability at that threshold.

The ordinary mean exists only when the GPD tail has \eqn{\xi < 1}. If the fitted tail is too
heavy for an ordinary mean to exist, the package directs users to restricted means or quantiles
rather than returning an unstable mean summary.
}
\section{Functions}{
\itemize{
\item \code{dLaplaceGpd()}: Laplace + GPD tail density

\item \code{pLaplaceGpd()}: Laplace + GPD tail distribution function

\item \code{rLaplaceGpd()}: Laplace + GPD tail random generation

\item \code{qLaplaceGpd()}: Laplace + GPD tail quantile function

}}
\examples{
location <- 0.5
scale <- 1.0
threshold <- 1
tail_scale <- 1.0
tail_shape <- 0.2

dLaplaceGpd(2.0, location, scale, threshold, tail_scale, tail_shape, log = FALSE)
pLaplaceGpd(2.0, location, scale, threshold, tail_scale, tail_shape,
           lower.tail = TRUE, log.p = FALSE)
qLaplaceGpd(0.50, location, scale, threshold, tail_scale, tail_shape)
qLaplaceGpd(0.95, location, scale, threshold, tail_scale, tail_shape)
replicate(10, rLaplaceGpd(1, location, scale, threshold, tail_scale, tail_shape))
}
\seealso{
\code{\link[=laplace_mix]{laplace_mix()}}, \code{\link[=laplace_MixGpd]{laplace_MixGpd()}}, \code{\link[=gpd]{gpd()}}, \code{\link[=laplace_lowercase]{laplace_lowercase()}}.

Other laplace kernel families: 
\code{\link{laplace_MixGpd}},
\code{\link{laplace_mix}}
}
\concept{laplace kernel families}
