| Title: | Discrete Composite Distributions with Pareto Tails |
|---|---|
| Description: | The package contains basic functions for discrete composite distributions with Pareto tails. |
| Authors: | Bowen Liu [aut, cre], Malwane M.A. Ananda [aut] |
| Maintainer: | Bowen Liu <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-05-15 09:58:05 UTC |
| Source: | https://github.com/liuaber/comppareto |
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.
dcomppareto(x, spec, alpha = 1, theta = 1, log = FALSE, ...)dcomppareto(x, spec, alpha = 1, theta = 1, log = FALSE, ...)
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 |
an object of the same length of x as the density evaluated at x
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)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)
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.
dwdcomppareto(x, spec, alpha, theta, log = FALSE, ...)dwdcomppareto(x, spec, alpha, theta, log = FALSE, ...)
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 |
an object of the same length of x as the probability mass evaluated at x
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)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)
pcomppareto returns the CDF of a composite distribution with a Pareto upper tail at x, with a specified distribution at the lower tail.
pcomppareto( x, spec, alpha = 1, theta = 1, lower.tail = TRUE, log.p = FALSE, ... )pcomppareto( x, spec, alpha = 1, theta = 1, lower.tail = TRUE, log.p = FALSE, ... )
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 |
an object of the same length of x as the CDF evaluated at x
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)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)
pwdcomppareto returns the CDF of a discrete composite distribution with a Pareto upper tail at x, with a specified distribution at the lower tail.
pwdcomppareto(x, spec, alpha, theta, log.p = FALSE, ...)pwdcomppareto(x, spec, alpha, theta, log.p = FALSE, ...)
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 |
an object of the same length of x as the CDF evaluated at x
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)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)
qcomppareto returns the quantile of a composite distribution with a Pareto upper tail given p, with a specified distribution at the lower tail.
qcomppareto(p, spec, alpha = 1, theta = 1, log.p = FALSE, ...)qcomppareto(p, spec, alpha = 1, theta = 1, log.p = FALSE, ...)
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 |
an object of the same length of x as the CDF evaluated at x
p <-seq(0.01,0.99,b=0.01) qcomppareto(p, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)p <-seq(0.01,0.99,b=0.01) qcomppareto(p, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
qwdcomppareto returns the quantile of a composite distribution with a Pareto upper tail given p, with a specified distribution at the lower tail.
qwdcomppareto(p, spec, alpha, theta, log = FALSE, ...)qwdcomppareto(p, spec, alpha, theta, log = FALSE, ...)
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 |
an object of the same length of x as the CDF evaluated at x
p <-seq(0.1,0.9,b=0.1) qcomppareto(p, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)p <-seq(0.1,0.9,b=0.1) qcomppareto(p, "weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
rcomppareto returns a random sample of a composite distribution with a Pareto upper tail, with a specified distribution at the lower tail.
rcomppareto(n, spec, alpha = 1, theta = 1, ...)rcomppareto(n, spec, alpha = 1, theta = 1, ...)
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 |
an object of the same length of n
n<-100 rcomppareto(n,"weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)n<-100 rcomppareto(n,"weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)
rwdcomppareto returns a random sample of a discrete composite distribution with a Pareto upper tail, with a specified distribution at the lower tail.
rwdcomppareto(n, spec, alpha = 1, theta = 1, ...)rwdcomppareto(n, spec, alpha = 1, theta = 1, ...)
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 |
an object of the same length of n
n<-10 rcomppareto(n,"weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)n<-10 rcomppareto(n,"weibull", alpha = 1.5, theta = 1.5, shape = 2, scale = 2)