Type: | Package |
Title: | Discrete Composite Distributions with Pareto Tails |
Version: | 0.1.0 |
Author: | Bowen Liu [aut, cre], Malwane M.A. Ananda [aut], Mostafa Shams Esfand Abadi [aut] |
Maintainer: | Bowen Liu <bowen.liu@umkc.edu> |
Description: | Contains the probability density function, cumulative distribution function, quantile function, and random number generator for composite and discrete composite distributions with Pareto tails. The detailed description of the methods and the applications of the methods can be found in Bowen Liu, Malwane M.A. Ananda (2023) <doi:10.48550/arXiv.2309.16443>. |
License: | GPL-3 |
Encoding: | UTF-8 |
Imports: | actuar, stats |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-10-16 19:25:54 UTC; liuab |
Repository: | CRAN |
Date/Publication: | 2023-10-17 09:50:11 UTC |
The probability density function (pdf) of a composite distribution with Pareto tail
Description
dcomppareto
returns the density of a composite distribution with a Pareto upper tail at a point x, with a specified distribution at the lower tail.
Usage
dcomppareto(x, spec, alpha = 1, theta = 1, log = FALSE, ...)
Arguments
x |
A scalar or vector of positive values at which the density needs to be evaluated |
spec |
The selection of the lower tail (head) distribution |
alpha |
The shape parameter of the Pareto distribution |
theta |
The scale parameter of Pareto, also serve as the location parameter of the composite model |
log |
logical; if TRUE, probability p are given as log(p) |
... |
The parameter of the lower tail (head) distribution |
Value
an object of the same length of x as the density evaluated at x
Examples
x<-1:100
dcomppareto(x, "lnorm", 0.4, 1, meanlog = 1, sdlog = 0.8)
dcomppareto(x, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
The probability mass function (pmf) of a discrete composite distribution with Pareto tail
Description
dwdcomppareto
returns the pmf of a discrete composite distribution with a Pareto upper tail at a point x, with a specified distribution at the lower tail.
Usage
dwdcomppareto(x, spec, alpha, theta, log = FALSE, ...)
Arguments
x |
A scalar or vector of nonnegative integer values at which the probability mass needs to be evaluated |
spec |
The selection of the lower tail (head) distribution |
alpha |
The shape parameter of the Pareto distribution |
theta |
The scale parameter of Pareto, also serve as the location parameter of the composite model |
log |
logical; if TRUE, probability p are given as log(p) |
... |
The parameter of the lower tail (head) distribution |
Value
an object of the same length of x as the probability mass evaluated at x
Examples
x<-1:100
dwdcomppareto(x, "lnorm", 0.4, 1, meanlog = 1, sdlog = 0.8)
dwdcomppareto(x, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
The cumulative distribution function (CDF) of a composite distribution with Pareto tail
Description
pcomppareto
returns the CDF of a composite distribution with a Pareto upper tail at x, with a specified distribution at the lower tail.
Usage
pcomppareto(
x,
spec,
alpha = 1,
theta = 1,
lower.tail = TRUE,
log.p = FALSE,
...
)
Arguments
x |
A scalar or vector of positive values at which the CDF needs to be evaluated |
spec |
The selection of the lower tail (head) distribution |
alpha |
The shape parameter of the Pareto distribution |
theta |
The scale parameter of Pareto, also serve as the location parameter of the composite model |
lower.tail |
logical; if FALSE, the upper tail probability is provided |
log.p |
logical; if TRUE, probability p are given as log(p) |
... |
The parameter of the lower tail (head) distribution |
Value
an object of the same length of x as the CDF evaluated at x
Examples
x<-1:100
pcomppareto(x, "lnorm", 0.4, 1, meanlog = 1, sdlog = 0.8)
pcomppareto(x, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
The cumulative distribution function (CDF) of a discrete composite distribution with Pareto tail
Description
pwdcomppareto
returns the CDF of a discrete composite distribution with a Pareto upper tail at x, with a specified distribution at the lower tail.
Usage
pwdcomppareto(x, spec, alpha, theta, log.p = FALSE, ...)
Arguments
x |
A scalar or vector of positive values at which the CDF needs to be evaluated |
spec |
The selection of the lower tail (head) distribution |
alpha |
The shape parameter of the Pareto distribution |
theta |
The scale parameter of Pareto, also serve as the location parameter of the composite model |
log.p |
logical; if TRUE, probability p are given as log(p) |
... |
The parameter of the lower tail (head) distribution |
Value
an object of the same length of x as the CDF evaluated at x
Examples
x<-1:100
pwdcomppareto(x, "lnorm", 0.4, 1, meanlog = 1, sdlog = 0.8)
pwdcomppareto(x, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
The quantile function of a composite distribution with Pareto tail
Description
qcomppareto
returns the quantile of a composite distribution with a Pareto upper tail given p, with a specified distribution at the lower tail.
Usage
qcomppareto(p, spec, alpha = 1, theta = 1, log.p = FALSE, ...)
Arguments
p |
vector of probabilities |
spec |
The selection of the lower tail (head) distribution |
alpha |
The shape parameter of the Pareto distribution |
theta |
The scale parameter of Pareto, also serve as the location parameter of the composite model |
log.p |
logical; if TRUE, probability p are given as log(p) |
... |
The parameter of the lower tail (head) distribution |
Value
an object of the same length of x as the CDF evaluated at x
Examples
p <-seq(0.01,0.99,b=0.01)
qcomppareto(p, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
The quantile function of a discrete composite distribution with Pareto tail
Description
qwdcomppareto
returns the quantile of a composite distribution with a Pareto upper tail given p, with a specified distribution at the lower tail.
Usage
qwdcomppareto(p, spec, alpha, theta, log = FALSE, ...)
Arguments
p |
vector of probabilities |
spec |
The selection of the lower tail (head) distribution |
alpha |
The shape parameter of the Pareto distribution |
theta |
The scale parameter of Pareto, also serve as the location parameter of the composite model |
log |
logical; if TRUE, probability p are given as log(p) |
... |
The parameter of the lower tail (head) distribution |
Value
an object of the same length of x as the CDF evaluated at x
Examples
p <-seq(0.1,0.9,b=0.1)
qcomppareto(p, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
Generating random number from a discrete composite distribution with Pareto tail
Description
rcomppareto
returns a random sample of a composite distribution with a Pareto upper tail, with a specified distribution at the lower tail.
Usage
rcomppareto(n, spec, alpha = 1, theta = 1, ...)
Arguments
n |
number of observations |
spec |
The selection of the lower tail (head) distribution |
alpha |
The shape parameter of the Pareto distribution |
theta |
The scale parameter of Pareto, also serve as the location parameter of the composite model |
... |
The parameter of the lower tail (head) distribution |
Value
an object of the same length of n
Examples
n<-100
rcomppareto(n,"weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
Generating random number from a discrete composite distribution with Pareto tail
Description
rwdcomppareto
returns a random sample of a discrete composite distribution with a Pareto upper tail, with a specified distribution at the lower tail.
Usage
rwdcomppareto(n, spec, alpha = 1, theta = 1, ...)
Arguments
n |
number of observations |
spec |
The selection of the lower tail (head) distribution |
alpha |
The shape parameter of the Pareto distribution |
theta |
The scale parameter of Pareto, also serve as the location parameter of the composite model |
... |
The parameter of the lower tail (head) distribution |
Value
an object of the same length of n
Examples
n<-10
rcomppareto(n,"weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)