Lognormal with a GPD tail
lognormal_gpd.RdSpliced family obtained by attaching a generalized Pareto tail above threshold to a single
lognormal bulk.
Usage
dLognormalGpd(x, meanlog, sdlog, threshold, tail_scale, tail_shape, log = 0)
pLognormalGpd(
q,
meanlog,
sdlog,
threshold,
tail_scale,
tail_shape,
lower.tail = 1,
log.p = 0
)
rLognormalGpd(n, meanlog, sdlog, threshold, tail_scale, tail_shape)
qLognormalGpd(
p,
meanlog,
sdlog,
threshold,
tail_scale,
tail_shape,
lower.tail = TRUE,
log.p = FALSE
)Arguments
- x
Numeric scalar giving the point at which the density is evaluated.
- meanlog
Numeric scalar log-mean parameter for the Lognormal bulk.
- sdlog
Numeric scalar log-standard deviation for the Lognormal bulk.
- threshold
Numeric scalar threshold at which the GPD tail is attached.
- tail_scale
Numeric scalar GPD scale parameter; must be positive.
- tail_shape
Numeric scalar GPD shape parameter.
- log
Integer flag
0/1; if1, return the log-density.- q
Numeric scalar giving the point at which the distribution function is evaluated.
- lower.tail
Integer flag
0/1; if1(default), probabilities are \(P(X \le q)\).- log.p
Integer flag
0/1; if1, probabilities are returned on the log scale.- n
Integer giving the number of draws. The RNG implementation supports
n = 1.- p
Numeric scalar probability in \((0,1)\) for the quantile function.
Value
Spliced density/CDF/RNG functions return numeric scalars. qLognormalGpd() returns a
numeric vector with the same length as p.
Details
This is the single-lognormal counterpart of lognormal_mixgpd(). If \(F_{LN}(u)\) denotes the
bulk probability below the threshold, then the spliced density is
$$
f(x) =
\left\{
\begin{array}{ll}
f_{LN}(x \mid \mu,\sigma), & x < u, \\
\{1-F_{LN}(u)\} g_{GPD}(x \mid u,\sigma_u,\xi), & x \ge u.
\end{array}
\right.
$$
The ordinary mean is finite only when the GPD tail has \(\xi < 1\);
otherwise the package requires restricted means or quantiles.
Functions
dLognormalGpd(): Lognormal + GPD tail densitypLognormalGpd(): Lognormal + GPD tail distribution functionrLognormalGpd(): Lognormal + GPD tail random generationqLognormalGpd(): Lognormal + GPD tail quantile function
See also
lognormal_mix(), lognormal_mixgpd(), gpd(), lognormal_lowercase().
Other lognormal kernel families:
lognormal_mix,
lognormal_mixgpd
Examples
meanlog <- 0.4
sdlog <- 0.35
threshold <- 3
tail_scale <- 0.9
tail_shape <- 0.2
dLognormalGpd(4.0, meanlog, sdlog, threshold, tail_scale, tail_shape, log = FALSE)
#> [1] 0.007654624
pLognormalGpd(4.0, meanlog, sdlog, threshold, tail_scale, tail_shape,
lower.tail = TRUE, log.p = FALSE)
#> [1] 0.9915799
qLognormalGpd(0.50, meanlog, sdlog, threshold, tail_scale, tail_shape)
#> [1] 1.491825
qLognormalGpd(0.95, meanlog, sdlog, threshold, tail_scale, tail_shape)
#> [1] 2.65302
replicate(10, rLognormalGpd(1, meanlog, sdlog, threshold, tail_scale, tail_shape))
#> [1] 1.129289 3.913359 2.131822 1.554833 1.452250 1.370077 1.738250 1.507340
#> [9] 2.228381 3.814826