| Type: | Package |
| Title: | Generated Probability Distribution Models |
| Version: | 2.0 |
| Date: | 2019-01-30 |
| Author: | Shaiful Anuar Abu Bakar |
| Maintainer: | Shaiful Anuar Abu Bakar <saab@um.edu.my> |
| Description: | Computes the probability density function (pdf), cumulative distribution function (cdf), quantile function (qf) and generates random values (rg) for the following general models : mixture models, composite models, folded models, skewed symmetric models and arc tan models. |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Packaged: | 2019-01-31 08:50:24 UTC; saab |
| Repository: | CRAN |
| Date/Publication: | 2019-01-31 09:33:20 UTC |
Generated Probability Distribution Models
Description
Computes the probability density function (pdf), cumulative distribution function (cdf), quantile function (qf) and generates random values (rg) for the following general models : mixture models, composite models, folded models, skewed symmetric models and arc tan models.
Details
| Package: | gendist |
| Type: | Package |
| Version: | 2.0 |
| Date: | 2019-01-30 |
| License: | GPL (>=2) |
All the models use parent distribution(s) and thus flexible to incorporate many exisiting probability distributions.
Author(s)
Shaiful Anuar Abu Bakar
Maintainer: Shaiful Anuar Abu Bakar <saab@um.edu.my>
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Gomez-Deniz, E., & Calderin-Ojeda, E. Modelling insurance data with the pareto arctan distribution. ASTIN Bulletin, 1-22.
Cooray, K., & Ananda, M. M. (2005). Modeling actuarial data with a composite lognormal-Pareto model. Scandinavian Actuarial Journal, 2005(5), 321-334.
Scollnik, D. P. (2007). On composite lognormal-Pareto models. Scandinavian Actuarial Journal, 2007(1), 20-33.
Nadarajah, S., & Bakar, S. A. A. (2014). New composite models for the Danish fire insurance data. Scandinavian Actuarial Journal, 2014(2), 180-187.
Bakar, S. A., Hamzah, N. A., Maghsoudi, M., & Nadarajah, S. (2015). Modeling loss data using composite models. Insurance: Mathematics and Economics, 61, 146-154.
Brazauskas, V., & Kleefeld, A. (2011). Folded and log-folded-t distributions as models for insurance loss data. Scandinavian Actuarial Journal, 2011(1), 59-74.
Pearson, K. (1894). Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London. A, 71-110.
Azzalini, A. (1985). A class of distributions which includes the normal ones. Scandinavian journal of statistics, 171-178.
Probabilty density function of arc tan model.
Description
Computes pdf of the arc tan model.
Usage
darctan(x, alpha, spec, arg, log = FALSE)
Arguments
x |
scalar or vector of values to compute the pdf. |
alpha |
the value of |
spec |
a character string specifying the parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg |
list of arguments/parameters of the parent distribution. |
log |
logical; if |
Details
The pdf of arc tan model with parameter \alpha has a general form of:
f(x) = \frac{1}{\arctan(\alpha)} \frac{\alpha g(x)}{1 + (\alpha (1-G(x)))^{2}}
for a\leq x\leq b where a and b follow the support of g(x). \arctan denote the inverse function of tangent. g(x) and G(x) are the pdf and cdf of parent distribution, respectively. Note also that \alpha>0.
Value
An object of the same length as x, giving the pdf values computed at x.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Gomez-Deniz, E., & Calderin-Ojeda, E. Modelling insurance data with the pareto arctan distribution. ASTIN Bulletin, 1-22.
Examples
x=runif(10, min=0, max=1)
y=darctan(x, alpha=0.5, spec="lnorm", arg=list(meanlog=1,sdlog=2) )
Probabilty density function of composite model.
Description
Computes pdf of the composite model.
Usage
dcomposite(x, spec1, arg1, spec2, arg2, initial = 1, log = FALSE)
Arguments
x |
scalar or vector of values to compute the pdf. |
spec1 |
a character string specifying the head parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the head parent distribution. |
spec2 |
a character string specifying the tail parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the tail parent distribution. |
initial |
initial values of the threshold, |
log |
logical; if |
Details
The pdf of composite model has a general form of:
f(x) =
\frac{1}{1+\phi} f_{1}^{*}(x), \mbox{ if} \quad x \leq \theta,
= \frac{\phi}{1+\phi} f_{2}^{*}(x), \mbox{ if} \quad x > \theta,
whereby \phi is the weight component, \theta is the threshold and f_{i}^{*}(x) for i=1,2 are the truncated pdfs correspond to head and tail parent distributions defined by
f_{1}^{*}(x) = \frac{f_{1}(x)}{F_{1}(\theta)}
and
f_{2}^{*}(x) = \frac{f_{2}(x)}{1-F_{2}(\theta)}
respectively.
Value
An object of the same length as x, giving the pdf values computed at x.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Cooray, K., & Ananda, M. M. (2005). Modeling actuarial data with a composite lognormal-Pareto model. Scandinavian Actuarial Journal, 2005(5), 321-334.
Scollnik, D. P. (2007). On composite lognormal-Pareto models. Scandinavian Actuarial Journal, 2007(1), 20-33.
Nadarajah, S., & Bakar, S. A. A. (2014). New composite models for the Danish fire insurance data. Scandinavian Actuarial Journal, 2014(2), 180-187.
Bakar, S. A., Hamzah, N. A., Maghsoudi, M., & Nadarajah, S. (2015). Modeling loss data using composite models. Insurance: Mathematics and Economics, 61, 146-154.
Examples
x=runif(10, min=0, max=1)
y=dcomposite(x, spec1="lnorm", arg1=list(meanlog=0.1,sdlog=0.2), spec2="exp",
arg2=list(rate=0.5) )
Probabilty density function of folded model.
Description
Computes pdf of the folded model.
Usage
dfolded(x, spec, arg, log = FALSE)
Arguments
x |
scale or vector of values to compute the pdf. |
spec |
a character string specifying the parent distribution (for example, "norm" if the parent disstribution correspond to the normal). |
arg |
list of arguments/parameters of the parent distribution. |
log |
logical; if |
Details
The pdf of folded model has a general form of:
f(x) = g(x) + g(-x) \quad x>0
where G(x) is the cdf of parent distribution.
Value
An object of the same length as x, giving the pdf values computed at x.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Brazauskas, V., & Kleefeld, A. (2011). Folded and log-folded-t distributions as models for insurance loss data. Scandinavian Actuarial Journal, 2011(1), 59-74.
Examples
x=runif(10, min=0, max=1)
y=dfolded(x, spec="norm", arg=list(mean=1,sd=2) )
Probabilty density function of mixture model.
Description
Computes pdf of the mixture model.
Usage
dmixt(x, phi, spec1, arg1, spec2, arg2, log = FALSE)
Arguments
x |
scalar or vector of values to compute the pdf. |
phi |
the value of |
spec1 |
a character string specifying the first parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the first parent distribution. |
spec2 |
a character string specifying the second parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the second parent distribution. |
log |
logical; if |
Details
The pdf of mixture model with parameter phi has a general form of:
f(x) = \frac{1}{1+\phi} \left( g_{1}(x) + \phi g_{2}(x)\right)
where x follows the support of parent distributions, \phi is the weight component and g_{i}(x) for i=1,2 are the pdfs of first and second parent distributions, respectively.
Value
An object of the same length as x, giving the pdf values computed at x.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Pearson, K. (1894). Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London. A, 71-110.
Examples
x=runif(10, min=0, max=1)
y=dmixt(x, phi=0.5, spec1="lnorm", arg1=list(meanlog=1,sdlog=2), spec2="exp",
arg2=list(rate=2) )
Probabilty density function of skewed symmetric model.
Description
Computes pdf of the skewed symmetric model.
Usage
dskew(x, spec1, arg1, spec2, arg2, log = FALSE)
Arguments
x |
scalar or vector of values to compute the pdf. |
spec1 |
a character string specifying the parent distribution |
arg1 |
list of arguments/parameters of the parent distribution |
spec2 |
a character string specifying the parent distribution |
arg2 |
list of arguments/parameters of the parent distribution |
log |
logical; if |
Details
The pdf of skewed symmetric model has a general form of:
f(x) = 2h(x)G(x), \quad -\infty < x < \infty
where h(x) and G(x) are the pdf and cdf of parent distributions, respectively.
Value
An object of the same length as x, giving the pdf values computed at x.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Azzalini, A. (1985). A class of distributions which includes the normal ones. Scandinavian journal of statistics, 171-178.
Examples
x=runif(10, min=0, max=1)
y=dskew(x, spec1="norm", arg1=list(mean=0,sd=1), spec2="logis",
arg2=list(location=0,scale=2) )
Cumulative distribution function of arc tan model.
Description
Computes cdf of the arc tan model.
Usage
parctan(q, alpha, spec, arg, lower.tail = TRUE, log.p = FALSE)
Arguments
q |
scalar or vector of values to compute the cdf. |
alpha |
the value of |
spec |
a character string specifying the parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg |
list of arguments/parameters of the parent distribution. |
lower.tail |
logical; if |
log.p |
logical; if |
Details
The cdf of arc tan model with parameter \alpha has a general form of:
F(q) = 1- \frac{\arctan(\alpha (1-G(q)) )}{\arctan(\alpha)}
for a\leq x\leq b where a and b follow the support of g(q). \arctan denote the inverse function of tangent. g(q) and G(q) are the pdf and cdf of parent distribution, respectively. Note also that \alpha>0.
Value
An object of the same length as q, giving the cdf values computed at q.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Gomez-Deniz, E., & Calderin-Ojeda, E. Modelling insurance data with the pareto arctan distribution. ASTIN Bulletin, 1-22.
Examples
x=runif(10, min=0, max=1)
y=parctan(x, alpha=0.5, spec="lnorm", arg=list(meanlog=1,sdlog=2) )
Cumulative distribution function of composite model.
Description
Computes cdf of the composite model.
Usage
pcomposite(q, spec1, arg1, spec2, arg2, initial = 1, lower.tail = TRUE, log.p = FALSE)
Arguments
q |
scalar or vector of values to compute the cdf. |
spec1 |
a character string specifying the head parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the head parent distribution. |
spec2 |
a character string specifying the tail parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the tail parent distribution. |
initial |
initial values of the threshold, |
lower.tail |
logical; if |
log.p |
logical; if |
Details
The cdf of composite model has a general form of:
F(x) =
\frac{1}{1+\phi} \frac{F_{1}(x)}{F_{1}(\theta)} \mbox{ if } \quad x \leq \theta,
= \frac{1}{1+\phi} \left( 1 + \phi \frac{F_{2}(x)-F_{2}(\theta)}{1-F_{2}(\theta)} \right) \mbox{ if } \quad x > \theta,
whereby \phi is the weight component, \theta is the threshold and F_{i}(x) for i=1,2 are the cdfs correspond to head and tail parent distributions, respectively.
Value
An object of the same length as q, giving the cdf values computed at q.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Cooray, K., & Ananda, M. M. (2005). Modeling actuarial data with a composite lognormal-Pareto model. Scandinavian Actuarial Journal, 2005(5), 321-334.
Scollnik, D. P. (2007). On composite lognormal-Pareto models. Scandinavian Actuarial Journal, 2007(1), 20-33.
Nadarajah, S., & Bakar, S. A. A. (2014). New composite models for the Danish fire insurance data. Scandinavian Actuarial Journal, 2014(2), 180-187.
Bakar, S. A., Hamzah, N. A., Maghsoudi, M., & Nadarajah, S. (2015). Modeling loss data using composite models. Insurance: Mathematics and Economics, 61, 146-154.
Examples
x=runif(10, min=0, max=1)
y=pcomposite(x, spec1="lnorm", arg1=list(meanlog=0.1,sdlog=0.2), spec2="exp",
arg2=list(rate=0.5) )
Cumulative distribution function of folded model.
Description
Computes cdf of the folded model.
Usage
pfolded(q, spec, arg, lower.tail = TRUE, log.p = FALSE)
Arguments
q |
scale or vector of values to compute the cdf. |
spec |
a character string specifying the parent distribution (for example, "norm" if the parent distribution correspond to the normal). |
arg |
list of arguments/parameters of the parent distribution. |
lower.tail |
logical; if |
log.p |
logical; if |
Details
The cdf of folded model has a general form of:
F(x) = G(x) - G(-x) \quad x>0
where G(x) is the cdf of parent distribution.
Value
An object of the same length as q, giving the cdf values computed at q.
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Brazauskas, V., & Kleefeld, A. (2011). Folded and log-folded-t distributions as models for insurance loss data. Scandinavian Actuarial Journal, 2011(1), 59-74.
Examples
x=runif(10, min=0, max=1)
y=pfolded(x, spec="norm", arg=list(mean=1,sd=2) )
Cumulative distribution function of mixture model.
Description
Computes cdf of the mixture model.
Usage
pmixt(q, phi, spec1, arg1, spec2, arg2, lower.tail = TRUE, log.p = FALSE)
Arguments
q |
scalar or vector of values to compute the cdf. |
phi |
the value of |
spec1 |
a character string specifying the first parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the first parent distribution. |
spec2 |
a character string specifying the second parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the second parent distribution. |
lower.tail |
logical; if |
log.p |
logical; if |
Details
The cdf of mixture model has a general form of:
F(x) = \\frac{1}{1+\phi} \left(G_{1}(x) + \phi G_{2}(x) \right)
where x follows the support of parent distributions, \phi is the weight component and G_{i}(x) for i=1,2 are the cdfs of first and second parent distributions, respectively.
Value
An object of the same length as q, giving the cdf values computed at q.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Pearson, K. (1894). Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London. A, 71-110.
Examples
x=runif(10, min=0, max=1)
y=pmixt(x, phi=0.5, spec1="lnorm", arg1=list(meanlog=1,sdlog=2), spec2="exp",
arg2=list(rate=2) )
Cumulative distribution function of skewed symmetric model.
Description
Computes cdf of the skewed symmetric model.
Usage
pskew(q, spec1, arg1, spec2, arg2, lower.tail = TRUE, log.p = FALSE)
Arguments
q |
scale or vector of values to compute the cdf. |
spec1 |
a character string specifying the parent distribution |
arg1 |
list of arguments/parameters of the parent distribution |
spec2 |
a character string specifying the parent distribution |
arg2 |
list of arguments/parameters of the parent distribution |
lower.tail |
logical; if |
log.p |
logical; if |
Details
The cdf of skewed symmetric model has a general form of:
F(x) = \int_{-\infty}^{x} 2 h(y) G(y) dy, \quad -\infty < x < \infty
where h(x) and G(x) are the pdf and cdf of parent distributions, respectively.
Value
An object of the same length as q, giving the cdf values computed at q.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Azzalini, A. (1985). A class of distributions which includes the normal ones. Scandinavian journal of statistics, 171-178.
Examples
x=runif(10, min=0, max=1)
y=pskew(x, spec1="norm", arg1=list(mean=0,sd=1), spec2="logis",
arg2=list(location=0,scale=2) )
Quantile function of arc tan model.
Description
Computes qf of the arc tan model.
Usage
qarctan(p, alpha, spec, arg, lower.tail = TRUE, log.p = FALSE)
Arguments
p |
scalar or vector of probabilities to compute the qf. |
alpha |
the value of |
spec |
a character string specifying the parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg |
list of arguments/parameters of the parent distribution. |
lower.tail |
logical; if |
log.p |
logical; if |
Details
The qf of arc tan model with parameter \alpha has a general form of:
Q(p) = G^{-1}\left(1-\frac{1}{\alpha} \tan( (1-p)\arctan(\alpha) )\right)
for a\leq x\leq b where a and b follow the support of G(x). \arctan denote the inverse function of tangent and G^{-1} is the inverse cdf of parent distribution, respectively. Note also that \alpha>0.
Value
An object of the same length as p, giving the qf values computed at p.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Gomez-Deniz, E., & Calderin-Ojeda, E. Modelling insurance data with the pareto arctan distribution. ASTIN Bulletin, 1-22.
Examples
x=runif(10, min=0, max=1)
y=qarctan(x, alpha=0.5, spec="lnorm", arg=list(meanlog=1,sdlog=2) )
Quantile function of composite model.
Description
Computes qf of the composite model.
Usage
qcomposite(p, spec1, arg1, spec2, arg2, initial = 1, lower.tail = TRUE, log.p = FALSE)
Arguments
p |
scalar or vector of probabilities to compute the qf. |
spec1 |
a character string specifying the head parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the head parent distribution. |
spec2 |
a character string specifying the tail parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the tail parent distribution. |
initial |
initial values of the threshold, |
lower.tail |
logical; if |
log.p |
logical; if |
Details
The qf of composite model has a general form of:
Q(p) =
Q_{1}(p(1+\phi)F_{1}(\theta)) \mbox{ if } \quad p \leq \frac{1}{1+\phi},
= Q_{2} \left( F_{2}(\theta) + (1-F_{2}(\theta)) \left( \frac{p(1+\phi)-1}{\phi} \right)\right) \mbox{ if } \quad p > \frac{1}{1+\phi}
whereby \phi is the weight component, \theta is the threshold and F_{i}(x) for i=1,2 are the qfs correspond to head and tail parent distributions, respectively.
Value
An object of the same length as p, giving the qf values computed at p.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Cooray, K., & Ananda, M. M. (2005). Modeling actuarial data with a composite lognormal-Pareto model. Scandinavian Actuarial Journal, 2005(5), 321-334.
Scollnik, D. P. (2007). On composite lognormal-Pareto models. Scandinavian Actuarial Journal, 2007(1), 20-33.
Nadarajah, S., & Bakar, S. A. A. (2014). New composite models for the Danish fire insurance data. Scandinavian Actuarial Journal, 2014(2), 180-187.
Bakar, S. A., Hamzah, N. A., Maghsoudi, M., & Nadarajah, S. (2015). Modeling loss data using composite models. Insurance: Mathematics and Economics, 61, 146-154.
Examples
x=runif(10, min=0, max=1)
y=qcomposite(x, spec1="lnorm", arg1=list(meanlog=0.1,sdlog=0.2), spec2="exp",
arg2=list(rate=0.5) )
Quantile function of folded model.
Description
Computes cdf of the folded model.
Usage
qfolded(p, spec, arg, interval = c(0, 100), lower.tail = TRUE, log.p = FALSE)
Arguments
p |
scalar or vector of probabilities to compute the qf. |
spec |
a character string specifying the parent distribution (for example, "norm" if the parent distribution correspond to the normal). |
arg |
list of arguments/parameters of the parent distribution. |
interval |
a vector of interval end-points for |
lower.tail |
logical; if |
log.p |
logical; if |
Value
An object of the same length as p, giving the qf values computed at p.
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Brazauskas, V., & Kleefeld, A. (2011). Folded and log-folded-t distributions as models for insurance loss data. Scandinavian Actuarial Journal, 2011(1), 59-74.
Examples
x=runif(10, min=0, max=1)
y=qfolded(x, spec="norm", arg=list(mean=1,sd=2), interval=c(0,100) )
Quantile function of mixture model.
Description
Computes qf of the mixture model.
Usage
qmixt(p, phi, spec1, arg1, spec2, arg2, interval = c(0, 100),
lower.tail = TRUE, log.p = FALSE)
Arguments
p |
scalar or vector of probabilities to compute the qf. |
phi |
the value of |
spec1 |
a character string specifying the first parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the first parent distribution. |
spec2 |
a character string specifying the second parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the second parent distribution. |
interval |
a vector of interval end-points for |
lower.tail |
logical; if |
log.p |
logical; if |
Value
An object of the same length as p, giving the qf values computed at p.
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Pearson, K. (1894). Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London. A, 71-110.
Examples
x=runif(10, min=0, max=1)
y=qmixt(x, phi=0.5, spec1="lnorm", arg1=list(meanlog=0.1,sdlog=0.2), spec2="exp",
arg2=list(rate=0.5))
Quantile function of skewed symmetric model.
Description
Computes qf of the skewed symmetric model.
Usage
qskew(p, spec1, arg1, spec2, arg2, interval = c(1, 10), lower.tail = TRUE, log.p = FALSE)
Arguments
p |
scalar or vector of probabilities to compute the qf. |
spec1 |
a character string specifying the parent distribution |
arg1 |
list of arguments/parameters of the parent distribution |
spec2 |
a character string specifying the parent distribution |
arg2 |
list of arguments/parameters of the parent distribution |
interval |
a vector of interval end-points for |
lower.tail |
logical; if |
log.p |
logical; if |
Value
An object of the same length as p, giving the qf values computed at p.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Azzalini, A. (1985). A class of distributions which includes the normal ones. Scandinavian journal of statistics, 171-178.
Examples
x=runif(10, min=0, max=1)
y=qskew(x, spec1="norm", arg1=list(mean=0,sd=0.1), spec2="logis",
arg2=list(location=0,scale=0.2))
Random generation of arc tan model.
Description
Computes rg of the arc tan model.
Usage
rarctan(n, alpha, spec, arg)
Arguments
n |
number of random generated values. |
alpha |
the value of |
spec |
a character string specifying the parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg |
list of arguments/parameters of the parent distribution. |
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Gomez-Deniz, E., & Calderin-Ojeda, E. Modelling insurance data with the pareto arctan distribution. ASTIN Bulletin, 1-22.
Examples
y=rarctan(10, alpha=0.5, spec="lnorm", arg=c(meanlog=1,sdlog=2) )
Random generation of composite model.
Description
Computes rg of the composite model.
Usage
rcomposite(n, spec1, arg1, spec2, arg2, initial = 1)
Arguments
n |
number of random generated values. |
spec1 |
a character string specifying the head parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the head parent distribution. |
spec2 |
a character string specifying the tail parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the tail parent distribution. |
initial |
initial values of the threshold, |
Value
An object of the length n, giving the random generated values for the composite model.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Cooray, K., & Ananda, M. M. (2005). Modeling actuarial data with a composite lognormal-Pareto model. Scandinavian Actuarial Journal, 2005(5), 321-334.
Scollnik, D. P. (2007). On composite lognormal-Pareto models. Scandinavian Actuarial Journal, 2007(1), 20-33.
Nadarajah, S., & Bakar, S. A. A. (2014). New composite models for the Danish fire insurance data. Scandinavian Actuarial Journal, 2014(2), 180-187.
Bakar, S. A., Hamzah, N. A., Maghsoudi, M., & Nadarajah, S. (2015). Modeling loss data using composite models. Insurance: Mathematics and Economics, 61, 146-154.
Examples
y=rcomposite(10, spec1="lnorm", arg1=list(meanlog=0.1,sdlog=0.2), spec2="exp",
arg2=list(rate=0.5))
Random generation of folded model.
Description
Computes rg of the folded model.
Usage
rfolded(n, spec, arg, interval = c(0, 100))
Arguments
n |
number of random generated values. |
spec |
a character string specifying the parent distribution (for example, "norm" if the parent distribution correspond to the normal). |
arg |
list of arguments/parameters of the parent distribution. |
interval |
a vector of interval end-points to search function root. |
Value
An object of the length n, giving the random generated values for the folded model.
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Brazauskas, V., & Kleefeld, A. (2011). Folded and log-folded-t distributions as models for insurance loss data. Scandinavian Actuarial Journal, 2011(1), 59-74.
Examples
y=rfolded(10, spec="norm", arg=list(mean=1,sd=2), interval=c(0,100) )
Random generation of mixture model.
Description
Computes rg of the mixture model.
Usage
rmixt(n, phi, spec1, arg1, spec2, arg2, interval = c(0, 100))
Arguments
n |
number of random generated values. |
phi |
the value of |
spec1 |
a character string specifying the first parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the first parent distribution. |
spec2 |
a character string specifying the second parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the second parent distribution. |
interval |
a vector of interval end-points to search function root. |
Value
An object of the length n, giving the random generated values for the mixture model.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Pearson, K. (1894). Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London. A, 71-110.
Examples
y=rmixt(10, phi=0.5, spec1="lnorm", arg1=list(meanlog=0.1,sdlog=0.2), spec2="exp",
arg2=list(rate=0.5) )
Random generation of skewed symmetric model.
Description
Computes rg of the skewed symmetric model.
Usage
rskew(n, spec1, arg1, spec2, arg2, interval = c(1, 10))
Arguments
n |
number of random generated values. |
spec1 |
a character string specifying the parent distribution |
arg1 |
list of arguments/parameters of the parent distribution |
spec2 |
a character string specifying the parent distribution |
arg2 |
list of arguments/parameters of the parent distribution |
interval |
a vector of interval end-points to search function root. |
Value
An object of the length n, giving the random generated values for the skewed symmetric model.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Azzalini, A. (1985). A class of distributions which includes the normal ones. Scandinavian journal of statistics, 171-178.
Examples
y=rskew(10, spec1="norm", arg1=list(mean=0,sd=0.1), spec2="logis",
arg2=list(location=0,scale=0.2))