Type: | Package |
Title: | Estimation and Other Tools for Generalized Transmuted Models |
Version: | 1.0 |
Date: | 2025-07-12 |
Description: | Provide estimation and data generation tools for a generalization of the transmuted distributions discussed in Shaw and Buckley (2007). See <doi:10.48550/arXiv.0901.0434> for more information. |
Depends: | R (≥ 4.0.0) |
Imports: | pracma, VGAM |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
NeedsCompilation: | no |
Packaged: | 2025-07-17 01:01:10 UTC; Diego |
Author: | Yolanda M. Gomez [aut], Hector W. Gomez [aut], Barry C. Arnold [aut], Diego I. Gallardo [aut, cre] |
Maintainer: | Diego I. Gallardo <dgallardo@ubiobio.cl> |
Repository: | CRAN |
Date/Publication: | 2025-07-19 09:50:02 UTC |
The Exponentiated and Exponentiated2 distributions
Description
Density, distribution function, quantile function and random generation for the Exponentiated (EXP) and Exponentiated of the second kind (EXP2) distributions.
Usage
dEXP(x, alpha = 1, log = FALSE)
pEXP(q, alpha = 1, lower.tail = TRUE, log.p = FALSE)
qEXP(p, alpha = 1, lower.tail = TRUE, log.p = FALSE)
rEXP(n, alpha = 1)
dEXP2(x, alpha = 1, log = FALSE)
pEXP2(q, alpha = 1, lower.tail = TRUE, log.p = FALSE)
qEXP2(p, alpha = 1, lower.tail = TRUE, log.p = FALSE)
rEXP2(n, alpha = 1)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
alpha |
shape parameter (by default is 1). |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
Details
The EXP model has cumulative distribution function
F(x;\alpha)=x^\alpha, \quad x \in (0,1), \alpha>0,
whereas the EXP2 model has cumulative distribution function
F(x;\alpha)=1-(1-x)^\alpha, \quad x \in (0,1), \alpha>0,
Value
dEXP and dEXP2 give the density, pEXP and pEXP2 give the distribution function, qEXP and qEXP2 give the quantile function, and rEXP and rEXP2 generate random deviates. The length of the result is determined by n for rcompound, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Author(s)
Yolanda M. Gomez, Diego I. Gallardo, Hector W. Gomez and Barry Arnold
Examples
set.seed(2100)
y=rEXP(100, alpha = 1.2)
The Marshall-Olkin and Marshall-Olkin of the second kind distributions
Description
Density, distribution function, quantile function and random generation for the Marshall-Olkin (MO) and Marshall-Olkin of the second kind (MO2) distributions.
Usage
dMO(x, theta = 1, log = FALSE)
pMO(q, theta = 1, lower.tail = TRUE, log.p = FALSE)
qMO(p, theta = 1, lower.tail = TRUE, log.p = FALSE)
rMO(n, theta = 1)
dMO2(x, theta = 1, log = FALSE)
pMO2(q, theta = 1, lower.tail = TRUE, log.p = FALSE)
qMO2(p, theta = 1, lower.tail = TRUE, log.p = FALSE)
rMO2(n, theta = 1)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
theta |
shape parameter (by default is 1). |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
Details
The MO model has cumulative distribution function
F(x;\alpha)=\frac{\theta x}{1-(1-\theta)x}, \quad x \in (0,1), \theta>0,
whereas the MO2 model has cumulative distribution function
F(x;\alpha)=\frac{x}{1-(1-\theta)(1-x)}, \quad x \in (0,1), \alpha>0,
Value
dEXP and dEXP2 give the density, pEXP and pEXP2 give the distribution function, qEXP and qEXP2 give the quantile function, and rEXP and rEXP2 generate random deviates. The length of the result is determined by n for rcompound, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Author(s)
Yolanda M. Gomez, Diego I. Gallardo, Hector W. Gomez and Barry Arnold
Examples
set.seed(2100)
y=rMO(100, theta = 1.2)
The Shaw and Buckley (transmuted) distribution
Description
Density, distribution function, quantile function and random generation for the Shaw and Buckley (SB) distribution.
Usage
dSB(x, lambda = 0, log = FALSE)
pSB(q, lambda = 0, lower.tail = TRUE, log.p = FALSE)
qSB(p, lambda = 0, lower.tail = TRUE, log.p = FALSE)
rSB(n, lambda = 0)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
lambda |
shape parameter (by default is 0). |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
Details
The SB model has cumulative distribution function
F(x;\delta)=\delta x^2+(1-\delta)[1-(1-x)^2], \quad x \in (0,1),
where \delta=(1-\lambda)/2
and \lambda \in (-1,1)
.
Value
dSB gives the density, pSB gives the distribution function, qSB gives the quantile function, and rSB generates random deviates. The length of the result is determined by n for rcompound, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Author(s)
Yolanda M. Gomez, Diego I. Gallardo, Hector W. Gomez and Barry Arnold
Examples
set.seed(2100)
y=rSB(100, lambda = 0.7)
Choose a compound distribution.
Description
choose.compound select a combination of baseline and compounding distributions in the class of compound distribution. See details for supported distributions.
Usage
choose.compound(x, type = "positive", criteria = "AIC")
Arguments
x |
the vector of values to be fitted. |
type |
Support of the x's. Avaliable options: positive (default), unit, real. |
criteria |
model selection criteria to be applied for the selection. Avaliable options: AIC (default, Akaike's information criteria) and BIC (Bayesian's information criteria). |
Details
The compound distribution has cumulative distribution function
F(x;\gamma,\beta,\theta_1,\theta_2)=G_2(G_1(F(x;\gamma,\beta),\theta_1),\theta_2),
where F
is related to the baseline distribution and G_1, G_2
are related to compounding models.
For positive values, the options assessed for F
are exponential, gamma, log-normal, paretoII and Birnbaum-Saunders.
For unit values, the options for F
are beta and Kumaraswamy.
For real values, the options for F
are normal, logistic, Cauchy and Gumbel.
For G_1
and G_2
are assessed all the combinations among the exponentiated, exponentiated of second kind,
Marshall-Olkin, Marshall-Olkin of the second kind and
Value
A list containing the following components:
coefficients |
A matrix with the estimates and standard errors. |
logLik |
The log-likelihood function evaluated in the estimated parameters |
AIC |
Akaike's Information Criterion |
BIC |
Bayesian's Information Criterion |
Author(s)
Yolanda M. Gomez, Diego I. Gallardo, Hector W. Gomez and Barry Arnold
Examples
set.seed(2100)
y=rcompound(100, 1.2, 1.4, 1, 0.8, dist="exp", comp1="EXP", comp2="MO")
choose.compound(y, type="positive")
The Exponentiated and Exponentiated2 distributions
Description
Density, distribution function, quantile function and random generation for the compound distributions.
Usage
dcompound(x, dist = "exp", comp1 = as.null(), comp2 = as.null(), gamma = 1, beta = 1,
theta1 = 1, theta2 = 1, log = FALSE)
pcompound(q, dist = "exp", comp1 = as.null(), comp2 = as.null(), gamma = 1, beta = 1,
theta1 = 1, theta2 = 1, lower.tail = TRUE, log.p = FALSE)
qcompound(p, dist = "exp", comp1 = as.null(), comp2 = as.null(), gamma = 1, beta = 1,
theta1 = 1, theta2 = 1, lower.tail = TRUE, log.p = FALSE)
rcompound(n, dist = "exp", comp1 = as.null(), comp2 = as.null(), gamma = 1, beta = 1,
theta1 = 1, theta2 = 1)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
dist |
baseline distribution. Avaliable options: exp (exponential), gamma, lnorm (log-normal), paretoII, bisa (Birnbaum-Saunders), lomax, beta, kumar (Kumaraswamy), norm (normal), logis (logistic), cauchy, gumbel. See details for parameterizations of these distributions. |
comp1 , comp2 |
compounding distributions. Avaliable options: EXP (Exponentiated), EXP2 (Exponentiated of the second kind), MO (Marshall-Olkin), MO2 (Marshall-Olkin of the second kind), SB (Shaw and Buckley). |
gamma , beta |
parameters for the baseline distribution. |
theta1 , theta2 |
shape parameter for the comp1 and comp2 distributions, respectively. |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
Details
The compound distribution has cumulative distribution function
F(x;\gamma,\beta,\theta_1,\theta_2)=G_2(G_1(F(x;\gamma,\beta),\theta_1),\theta_2),
where F
is related to dist, G_1
is related to comp1 and G_2
is related to comp2.
The support for x
depends on the baseline distribution. For exp, gamma, lnorm, paretoII, bisa and lomax, the support
is (0,\infty)
; for beta and kumar is (0,1)
; for norm, logis, cauchy and gumbel is (-\infty,\infty)
.
The parameter space for \gamma
and \beta
also depend on the baseline distribution. For exp, \gamma>0
; for gamma, paretoII, bisa, lomax,
beta and kumar \gamma,\beta >0
; for lnorm, norm, logis, cauchy and gumbel \gamma \in \mathbb{R}, \beta>0
.
The parameter space for \theta_1
and \theta_2
depend on comp1 and comp2. For EXP, EXP2, MO and MO2 options
the corresponding parameter space is (0,\infty)
, whereas for SB option is (-1,1)
. The probability density function for
each of the baseline distribution is given below.
exp
f(x)=\gamma e^{-\gamma x}
gamma
f(x)=\frac{\beta^\gamma}{\Gamma(\gamma)}x^{\gamma-1} e^{-\beta x}
lnorm
f(x)=\frac{1}{x\sqrt{2\pi \beta^2}}\exp\left(-\frac{(\log(x)-\gamma)^2}{\beta^2}\right)
paretoII
f(x)=\frac{\gamma}{\beta}\left(1+\frac{x}{\beta}\right)^{-(\gamma+1)}
bisa
f(x)=\frac{1}{2\sqrt{2\pi}\gamma\beta}\left[\left(\frac{\beta}{x}\right)^{1/2}+\left(\frac{\beta}{x}\right)^{3/2}\right]\exp\left[-\frac{1}{2\gamma^2}\left(\frac{x}{\beta}+\frac{\beta}{x}-2\right)\right]
beta
f(x)=\frac{1}{B(\gamma,\beta)}x^{\gamma-1}(1-x)^{\beta-1}
kumar
f(x)=\gamma \beta x^{\gamma-1}(1-x^\gamma)^{\beta-1}
For norm, logis, cauchy and gumbel, the probability density function is given by
f(x)=\frac{1}{\beta} g\left(\frac{x-\gamma}{\beta}\right)
where g
is given by
norm
g(x)=\frac{1}{\sqrt{2\pi}}e^{-x^2/2}
logis
g(x)=\frac{e^{x}}{(1+e^x)^2}
cauchy
g(x)=\frac{1}{\pi (1+x^2)}
gumbel
g(x)=\exp\left(-(x+e^{-x})\right)
Value
dcompound gives the density, pcompound gives the distribution function, qcompound gives the quantile function, and rcompound generates random deviates. The length of the result is determined by n for rcompound, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
Author(s)
Yolanda M. Gomez, Diego I. Gallardo, Hector W. Gomez and Barry Arnold
Examples
set.seed(2100)
y=rcompound(100, 1.2, 1.4, 1, 0.8, dist="exp", comp1="EXP", comp2="MO")
Fitting a compound distribution.
Description
estimate.compound computes the maximum likelihood estimates for a compound distribution. See arguments for supported distributions.
Usage
estimate.compound(x, dist = "exp", comp1 = as.null(), comp2 = as.null(), est.var = TRUE)
Arguments
x |
the vector of values to be fitted. |
dist |
baseline distribution. Avaliable options: exp (exponential), gamma, lnorm (log-normal), paretoII, bisa (Birnbaum-Saunders), lomax, beta, kumar (Kumaraswamy), norm (normal), logis (logistic), cauchy, gumbel. See details for parameterizations of these distributions. |
comp1 , comp2 |
compounding distributions. Avaliable options: EXP (Exponentiated), EXP2 (Exponentiated of the second kind), MO (Marshall-Olkin), MO2 (Marshall-Olkin of the second kind), SB (Shaw and Buckley). |
est.var |
Logical. If TRUE the standard errors are estimated. |
Details
The parameterization for the different distributions is given in .
Value
A list containing the following components:
coefficients |
A matrix with the estimates and standard errors. |
logLik |
The log-likelihood function evaluated in the estimated parameters |
AIC |
Akaike's Information Criterion |
BIC |
Bayesian's Information Criterion |
Author(s)
Yolanda M. Gomez, Diego I. Gallardo, Hector W. Gomez and Barry Arnold
Examples
set.seed(2100)
y=rcompound(100, 1.2, 1.4, 1, 0.8, dist="exp", comp1="EXP", comp2="MO")
estimate.compound(y, dist="exp", comp1="EXP", comp2="MO")