Package 'MPS'

Title: Estimating Through the Maximum Product Spacing Approach
Description: Developed for computing the probability density function, computing the cumulative distribution function, computing the quantile function, random generation, drawing q-q plot, and estimating the parameters of 24 G-family of statistical distributions via the maximum product spacing approach introduced in <https://www.jstor.org/stable/2345411>. The set of families contains: beta G distribution, beta exponential G distribution, beta extended G distribution, exponentiated G distribution, exponentiated exponential Poisson G distribution, exponentiated generalized G distribution, exponentiated Kumaraswamy G distribution, gamma type I G distribution, gamma type II G distribution, gamma uniform G distribution, gamma-X generated of log-logistic family of G distribution, gamma-X family of modified beta exponential G distribution, geometric exponential Poisson G distribution, generalized beta G distribution, generalized transmuted G distribution, Kumaraswamy G distribution, log gamma type I G distribution, log gamma type II G distribution, Marshall Olkin G distribution, Marshall Olkin Kumaraswamy G distribution, modified beta G distribution, odd log-logistic G distribution, truncated-exponential skew-symmetric G distribution, and Weibull G distribution.
Authors: Mahdi Teimouri and Saralees Nadarajah
Maintainer: Mahdi Teimouri <[email protected]>
License: GPL (>= 2)
Version: 2.3.1
Built: 2024-11-05 05:27:18 UTC
Source: https://github.com/cran/MPS

Help Index


Developed for computing pdf, cdf, quantile, random generation, drawing q-q plot, and estimating the parameters of 24 G-family of statistical distributions.

Description

Developed for computing the probability density function, computing the cumulative distribution function, computing the quantile function, random generation, and estimating the parameters of 24 G-family of statistical distributions via the maximum product spacing approach introduced in <https://www.jstor.org/stable/2345411>. These families are: beta G distribution due to Eugene et al. (2002), beta exponential G distribution due to Alzaatreh et al. (2013), beta extended G distribution due to Alzaatreh et al. (2013), exponentiated G distribution due to Gupta et al. (1998), exponentiated Kumaraswamy G distribution due to Lemonte et al. (2013), exponentiated exponential Poisson G distribution due to Ristic and Nadarajah (2014), exponentiated generalized G distribution due to Cordeiro et al. (2013), gamma type I G distribution due to Zografos and Balakrishnan (2009), gamma type II G distribution due to Ristic and Balakrishnan (2012), gamma uniform G distribution due to Torabi and Montazeri (2012), gamma-X generated of log-logistic family of G distribution due to Alzaatreh et al. (2013), gamma-X family of modified beta exponential G distribution due to Alzaatreh et al. (2013), geometric exponential Poisson G distribution due to Nadarajah et al. (2013), generalized beta G distribution due to Alexander et al. (2012), generalized transmuted G distribution due to Merovci et al. (2017), Kumaraswamy G distribution due to Cordeiro and Castro (2011), log gamma type I G distribution due to Amini et al. (2013), log gamma type II G distribution due to Amini et al. (2013), Marshall-Olkin G distribution due to Marshall and Olkin (1997), Marshall-Olkin Kumaraswamy G distribution due to Roshini and Thobias (2017), modified beta G distribution due to Nadarajah et al. (2013), odd log-logistic G distribution due to Gauss et al. (2017), truncated-exponential skew-symmetric G distribution due to Nadarajah et al. (2014), and Weibull G distribution due to Alzaatreh et al. (2013).

Details

Package: MPS

Type: Package

Version: 2.3.1

Date: 2019-09-04

License: GPL(>=2)

Author(s)

Mahdi Teimouri and Saralees Nadarajah

Maintainer: Mahdi Teimouri <[email protected]>

References

Alexander, C., Cordeiro, G. M., and Ortega, E. M. M. (2012). Generalized beta-generated distributions, Computational Statistics and Data Analysis, 56, 1880-1897.

Alzaatreh, A., Lee, C., and Famoye, F. (2013). A new method for generating families of continuous distributions, Metron, 71, 63-79.

Amini, M., MirMostafaee, S. M. T. K., and Ahmadi, J. (2013). Log-gamma-generated families of distributions, Statistics, 48 (4), 913-932.

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Cordeiro, G. M. and Castro, M. (2011). A new family of generalized distributions, Journal of Statistical Computation and Simulation, 81, 883-898.

Cordeiro, G. M., Ortega, E. M. M., and da Cunha, D. C. C. (2013). The exponentiated generalized class of distributions, Journal of Data Science, 11, 1-27.

Eugene, N., Lee, C., and Famoye, F. (2002). Beta-normal distribution and its applications, Communications in Statistics-Theory and Methods, 31, 497-512.

Gupta, R. C., Gupta, P. L., and Gupta, R. D. (1998). Modeling failure time data by Lehman alternatives, Communications in Statistics-Theory and Methods, 27, 887-904.

Gauss, M. C., Alizadeh, M., Ozel, G., Hosseini, B. Ortega, E. M. M., and Altunc, E. (2017). The generalized odd log-logistic family of distributions: properties, regression models and applications, Journal of Statistical Computation and Simulation, 87(5), 908-932.

Lemonte, A. J., Barreto-Souza, W., and Cordeiro, G. M. (2013). The exponentiated Kumaraswamy distribution and its log-transform, Brazilian Journal of Probability and Statistics, 27, 31-53.

Marshall, A. W. and Olkin, I. (1997). A new method for adding a parameter to a family of distributions with application to the exponential and Weibull families, Biometrika, 84, 641-652.

Merovcia, F., Alizadeh, M., Yousof, H. M., and Hamedani, G. G. (2017). The exponentiated transmuted-G family of distributions: Theory and applications, Communications in Statistics-Theory and Methods, 46(21), 10800-10822.

Nadarajah, S., Cancho, V. G., and Ortega, E. M. M. (2013). The geometric exponential Poisson distribution, Statistical Methods & Applications, 22, 355-380.

Nadarajah, S., Teimouri, M., and Shih, S. H. (2014). Modified beta distributions, Sankhya, 76 (1), 19-48.

Nadarajah, S., Nassiri, V., and Mohammadpour, A. (2014). Truncated-exponential skew-symmetric distributions, Statistics, 48 (4), 872-895.

Ristic, M. M. and Balakrishnan, N. (2012). The gamma exponentiated exponential distribution, Journal of Statistical Computation and Simulation, 82, 1191-1206.

Ristic, M. M. and Nadarajah, S. (2014). A new lifetime distribution, Journal of Statistical Computation and Simulation, 84 (1), 135-150.

Roshini, G. and Thobias, S. (2017). Marshall-Olkin Kumaraswamy Distribution, International Mathematical Forum, 12 (2), 47-69.

Torabi, H. and Montazeri, N. H. (2012). The gamma uniform distribution and its applications, Kybernetika, 48, 16-30.

Zografos, K. and Balakrishnan, N. (2009). On families of beta- and generalized gamma-generated distributions and associated inference, Statistical Methodology, 6, 344-362.


beta exponential G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the beta exponential G distribution. The General form for the probability density function (pdf) of the beta exponential G distribution due to Alzaatreh et al. (2013) is given by

f(x,Θ)=dg(xμ,θ)[1(1G(xμ,θ))d]b1(1G(xμ,θ))ad1B(a,b),f(x,{\Theta}) = \frac{{d\,g(x-\mu,\theta ){{\left[ {1 - {{\left( {1 - G(x-\mu,\theta )} \right)}^d}} \right]}^{b - 1}}{{\left( {1 - G(x-\mu,\theta )} \right)}^{ad - 1}}}}{{B(a,b)}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, d>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the beta exponential G distribution is given by

F(x,Θ)=10(1G(xμ,θ))dya1(1y)b1dyB(a,b).F(x,{\Theta}) = 1 - \frac{{\int_0^{{{\left( {1 - G(x-\mu,\theta )} \right)}^d}} {{y^{a - 1}}{{\left( {1 - y} \right)}^{b - 1}}} dy}}{{B(a,b)}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a, b, and d are the first, second, and the third shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dbetaexpg(mydata, g, param, location = TRUE, log=FALSE)
pbetaexpg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qbetaexpg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rbetaexpg(n, g, param, location = TRUE)
qqbetaexpg(mydata, g, location ="TRUE", method)
mpsbetaexpg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Alzaatreh, A., Lee, C., and Famoye, F. (2013). A new method for generating families of continuous distributions, Metron, 71, 63-79.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dbetaexpg(mydata, "weibull", c(1,1,1,2,2,3))
pbetaexpg(mydata, "weibull", c(1,1,1,2,2,3))
qbetaexpg(runif(100), "weibull", c(1,1,1,2,2,3))
rbetaexpg(100, "weibull", c(1,1,1,2,2,3))
qqbetaexpg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsbetaexpg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

beta G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the beta G distribution. General form for the probability density function (pdf) of beta G distribution due to Eugene et al. (2002) is given by

f(x,Θ)=g(xμ,θ)(G(xμ,θ))a1(1G(xμ,θ))b1B(a,b),f(x,{\Theta}) = \frac{{g(x-\mu,\theta ){{\left( {G(x-\mu,\theta )} \right)}^{a - 1}}{{\left( {1 - G(x-\mu,\theta )} \right)}^{b - 1}}}}{{B(a,b)}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the beta G distribution is given by

F(x,Θ)=0G(xμ,θ)ya1(1y)b1dyB(a,b).F(x,{\Theta}) = \frac{{\int_0^{G(x-\mu,\theta )} {{y^{a - 1}}{{\left( {1 - y} \right)}^{b - 1}}} dy}}{{B(a,b)}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dbetag(mydata, g, param, location = TRUE, log=FALSE)
pbetag(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qbetag(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rbetag(n, g, param, location = TRUE)
qqbetag(mydata, g, location =TRUE, method)
mpsbetag(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Eugene, N., Lee, C., and Famoye, F. (2002). Beta-normal distribution and its applications, Communications in Statistics-Theory and Methods, 31, 497-512.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dbetag(mydata, "weibull", c(1,1,2,2,3))
pbetag(mydata, "weibull", c(1,1,2,2,3))
qbetag(runif(100), "weibull", c(1,1,2,2,3))
rbetag(100, "weibull", c(1,1,2,2,3))
qqbetag(mydata, "weibull", TRUE, "Nelder-Mead")
mpsbetag(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

exponentiated exponential Poisson G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the exponentiated exponential Poisson G distribution. The general form for the probability density function (pdf) of the the exponentiated exponential Poisson G distribution due to Ristic and Nadarajah (2014) is given by

f(x,Θ)=abg(xμ,θ)(G(xμ,θ))a1eb(G(xμ,θ))a1eb,f(x,{\Theta}) = \frac{{a\,b\,g(x-\mu,\theta ){{\left( {G(x-\mu,\theta )} \right)}^{a - 1}}{e^{ - b{{\left( {G(x-\mu,\theta )} \right)}^a}}}}}{{1 - {e^{ - b}}}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the exponentiated exponential Poisson G distribution is given by

F(x,Θ)=1eb(G(xμ,θ))a1eb.F(x,{\Theta}) = \frac{{1 - {e^{ - b{{\left( {G(x-\mu,\theta )} \right)}^a}}}}}{{1 - {e^{ - b}}}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dexpexppg(mydata, g, param, location = TRUE, log=FALSE)
pexpexppg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qexpexppg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rexpexppg(n, g, param, location = TRUE)
qqexpexppg(mydata, g, location = TRUE, method)
mpsexpexppg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Ristic, M. M. and Nadarajah, S. (2014). A new lifetime distribution, Journal of Statistical Computation and Simulation, 84 (1), 135-150.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dexpexppg(mydata, "weibull", c(1,1,2,2,3))
pexpexppg(mydata, "weibull", c(1,1,2,2,3))
qexpexppg(runif(100), "weibull", c(1,1,2,2,3))
rexpexppg(100, "weibull", c(1,1,2,2,3))
qqexpexppg(mydata, "weibull", location = TRUE, "Nelder-Mead")
mpsexpexppg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

exponentiated G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the exponentiated G distribution. General form for the probability density function (pdf) of the exponentiated G distribution due to Gupta et al. (1998) is given by

f(x,Θ)=ag(xμ,θ)(G(xμ,θ))a1,f(x,{\Theta}) = a\,g(x-\mu,\theta ){\left( {G(x-\mu,\theta )} \right)^{a - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0 and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the exponentiated G distribution is given by

F(x,Θ)=(G(xμ,θ))a.F(x,{\Theta}) = \left( {G(x-\mu,\theta )} \right)^{a}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,θ,μ)\Theta=(a,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a is the shape parameter). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dexpg(mydata, g, param, location = TRUE, log=FALSE)
pexpg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qexpg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rexpg(n, g, param, location = TRUE)
qqexpg(mydata, g, location = TRUE, method)
mpsexpg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,θ,μ)\Theta=(a,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Gupta, R. C., Gupta, P. L., and Gupta, R. D. (1998). Modeling failure time data by Lehman alternatives, Communications in Statistics-Theory and Methods, 27, 887-904.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dexpg(mydata, "weibull", c(1,2,2,3))
pexpg(mydata, "weibull", c(1,2,2,3))
qexpg(runif(100), "weibull", c(1,2,2,3))
rexpg(100, "weibull", c(1,2,2,3))
qqexpg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsexpg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

exponentiated generalized G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the exponentiated generalized G distribution. The General form for the probability density function (pdf) of the exponentiated generalized G distribution due to Cordeiro et al. (2013) is given by

f(x,Θ)=abg(xμ,θ)(1G(xμ,θ))a1[1(1G(xμ,θ))a]b1,f(x,{\Theta}) = a\,b\,g(x-\mu,\theta ){\left( {1 - G(x-\mu,\theta )} \right)^{a - 1}}{\left[ {1 - {{\left( {1 - G(x-\mu,\theta )} \right)}^a}} \right]^{b - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the exponentiated generalized G distribution is given by

F(x,Θ)=[1(1G(xμ,θ))a]b.F(x,{\Theta}) = {\left[ {1 - {{\left( {1 - G(x-\mu,\theta )} \right)}^a}} \right]^b}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dexpgg(mydata, g, param, location = TRUE, log=FALSE)
pexpgg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qexpgg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rexpgg(n, g, param, location = TRUE)
qqexpgg(mydata, g, location = TRUE, method)
mpsexpgg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Cordeiro, G. M., Ortega, E. M. M., and da Cunha, D. C. C. (2013). The exponentiated generalized class of distributions, Journal of Data Science, 11, 1-27.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dexpgg(mydata, "weibull", c(1,1,2,2,3))
pexpgg(mydata, "weibull", c(1,1,2,2,3))
qexpgg(runif(100), "weibull", c(1,1,2,2,3))
rexpgg(100, "weibull", c(1,1,2,2,3))
qqexpgg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsexpgg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

exponentiated Kumaraswamy G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the exponentiated Kumaraswamy G distribution. The General form for the probability density function (pdf) of exponentiated Kumaraswamy G distribution due to Lemonte et al. (2013) is given by

f(x,Θ)=abdg(xμ,θ)(G(xμ,θ))a1[1(G(xμ,θ))a]b1{1[1(G(xμ,θ))a]b}d1,f(x,{\Theta}) = a\,b\,d\,g(x-\mu,\theta ){\left( {G(x-\mu,\theta )} \right)^{a - 1}}{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]^{b - 1}}{\left\{ {1 - {{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]}^b}} \right\}^{d - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, d>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the exponentiated Kumaraswamy G distribution is given by

F(x,Θ)={1[1(G(xμ,θ))a]b}d.F(x,{\Theta}) = {\left\{ {1 - {{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]}^b}} \right\}^d}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a, b, and d are the first, second, and the third shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dexpkumg(mydata, g, param, location = TRUE, log=FALSE)
pexpkumg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qexpkumg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rexpkumg(n, g, param, location = TRUE)
qqexpkumg(mydata, g, location = TRUE, method)
mpsexpkumg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Lemonte, A. J., Barreto-Souza, W., and Cordeiro, G. M. (2013). The exponentiated Kumaraswamy distribution and its log-transform, Brazilian Journal of Probability and Statistics, 27, 31-53.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dexpkumg(mydata, "weibull", c(1,1,1,2,2,3))
pexpkumg(mydata, "weibull", c(1,1,1,2,2,3))
qexpkumg(runif(100), "weibull", c(1,1,1,2,2,3))
rexpkumg(100, "weibull", c(1,1,1,2,2,3))
qqexpkumg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsexpkumg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

gamma uniform G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the gamma uniform G distribution. General form for the probability density function (pdf) of the gamma uniform G distribution due to Torabi and Montazeri (2012) is given by

f(x,Θ)=g(xμ,θ)Γ(a)(1G(xμ,θ))2(G(xμ,θ)1G(xμ,θ))a1eG(xμ,θ)1G(xμ,θ),f(x,{\Theta}) = \frac{{g(x-\mu,\theta )}}{{\Gamma (a){{\left( {1 - G(x-\mu,\theta )} \right)}^2}}}{\left( {\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}} \right)^{a - 1}}{e^{ - \,\,\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}}},

where θ\theta is the baseline family parameter vector. Also, a>0 and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the gamma uniform G distribution is given by

F(x,Θ)=0G(xμ,θ)1G(xμ,θ)ya1eyΓ(a)dy.F(x,{\Theta}) = \int_0^{\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}} {\frac{{{y^{a - 1}}{e^{ - y}}}}{{\Gamma (a)}}dy}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,θ,μ)\Theta=(a,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a is the shape parameter). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dgammag(mydata, g, param, location = TRUE, log=FALSE)
pgammag(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qgammag(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rgammag(n, g, param, location = TRUE)
qqgammag(mydata, g, location = TRUE, method)
mpsgammag(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,θ,μ)\Theta=(a,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Torabi, H. and Montazeri, N. H. (2012). The gamma uniform distribution and its applications, Kybernetika, 48, 16-30.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dgammag(mydata, "weibull", c(1,2,2,3))
pgammag(mydata, "weibull", c(1,2,2,3))
qgammag(runif(100), "weibull", c(1,2,2,3))
rgammag(100, "weibull", c(1,2,2,3))
qqgammag(mydata, "weibull", TRUE, "Nelder-Mead")
mpsgammag(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

gamma uniform type I G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the gamma uniform type I G distribution. General form for the probability density function (pdf) of the gamma uniform type I G distribution due to Zografos and Balakrishnan (2009) is given by

f(x,Θ)=g(xμ,θ)Γ(a)[log(1G(xμ,θ))]a1,f(x,{\Theta}) = \frac{{g(x-\mu,\theta )}}{{\Gamma \left( a \right)}}{\left[ { - \log \left( {1 - G(x-\mu,\theta )} \right)} \right]^{a - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0 and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the gamma uniform type I G distribution is given by

F(x,Θ)=0log(1G(xμ,θ))ya1eyΓ(a)dy.F(x,{\Theta}) = \int_0^{ - \log \left( {1 - G(x-\mu,\theta )} \right)} {\frac{{{y^{a - 1}}{e^{ - y}}}}{{\Gamma (a)}}dy}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,θ,μ)\Theta=(a,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a is the shape parameter). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dgammag1(mydata, g, param, location = TRUE, log=FALSE)
pgammag1(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qgammag1(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rgammag1(n, g, param, location = TRUE)
qqgammag1(mydata, g, location = TRUE, method)
mpsgammag1(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,θ,μ)\Theta=(a,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Zografos, K. and Balakrishnan, N. (2009). On families of beta- and generalized gamma-generated distributions and associated inference, Statistical Methodology, 6, 344-362.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dgammag1(mydata, "weibull", c(1,2,2,3))
pgammag1(mydata, "weibull", c(1,2,2,3))
qgammag1(runif(100), "weibull", c(1,2,2,3))
rgammag1(100, "weibull", c(1,2,2,3))
qqgammag1(mydata, "weibull", TRUE, "Nelder-Mead")
mpsgammag1(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

gamma uniform type II G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the gamma uniform type II G distribution . General form for the probability density function (pdf) of the gamma uniform type II G distribution due to Ristic and Balakrishnan (2012) is given by

f(x,Θ)=g(xμ,θ)Γ(a)[log(G(xμ,θ))]a1,f(x,{\Theta}) = \frac{{g(x-\mu,\theta )}}{{\Gamma \left( a \right)}}{\left[ { - \log \left( {G(x-\mu,\theta )} \right)} \right]^{a - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0 and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the gamma uniform type II G distribution is given by

F(x,Θ)=0log(G(xμ,θ))ya1eyΓ(a)dy.F(x,{\Theta}) = \int_0^{ - \log \left( {G(x-\mu,\theta )} \right)} {\frac{{{y^{a - 1}}{e^{ - y}}}}{{\Gamma (a)}}dy}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,θ,μ)\Theta=(a,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a is the shape parameter). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dgammag2(mydata, g, param, location = TRUE, log=FALSE)
pgammag2(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qgammag2(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rgammag2(n, g, param, location = TRUE)
qqgammag2(mydata, g, location = TRUE, method)
mpsgammag2(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,θ,μ)\Theta=(a,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Ristic, M. M. and Balakrishnan, N. (2012). The gamma exponentiated exponential distribution, Journal of Statistical Computation and Simulation, 82, 1191-1206.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dgammag2(mydata, "weibull", c(1,2,2,3))
pgammag2(mydata, "weibull", c(1,2,2,3))
qgammag2(runif(100), "weibull", c(1,2,2,3))
rgammag2(100, "weibull", c(1,2,2,3))
qqgammag2(mydata, "weibull", TRUE, "Nelder-Mead")
mpsgammag2(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

generalized beta G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the generalized beta G distribution. General form for the probability density function (pdf) of the generalized beta G distribution due to Alexander et al. (2012) is given by

f(x,Θ)=dg(xμ,θ)(G(xμ,θ))ad1[1(G(xμ,θ))d]b1B(a,b),f(x,{\Theta}) = \frac{{d\,g(x-\mu,\theta ){{\left( {G(x-\mu,\theta )} \right)}^{ad - 1}}{{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^d}} \right]}^{b - 1}}}}{{B\left( {a,b} \right)}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, d>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the generalized beta G distribution is given by

F(x,Θ)=0(G(xμ,θ))dya1(1y)b1dyB(a,b).F(x,{\Theta}) = \frac{{\int_0^{{{\left( {G(x-\mu,\theta )} \right)}^d}} {{y^{a - 1}}{{\left( {1 - y} \right)}^{b - 1}}} dy}}{{B(a,b)}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a, b, and d are the first, second, and the third shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dgbetag(mydata, g, param, location = TRUE, log=FALSE)
pgbetag(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qgbetag(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rgbetag(n, g, param, location = TRUE)
qqgbetag(mydata, g, location = TRUE, method)
mpsgbetag(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12*m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Alexander, C., Cordeiro, G. M., and Ortega, E. M. M. (2012). Generalized beta-generated distributions, Computational Statistics and Data Analysis, 56, 1880-1897.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dgbetag(mydata, "weibull", c(1,1,1,2,2,3))
pgbetag(mydata, "weibull", c(1,1,1,2,2,3))
qgbetag(runif(100), "weibull", c(1,1,1,2,2,3))
rgbetag(100, "weibull", c(1,1,1,2,2,3))
qqgbetag(mydata, "weibull", TRUE, "Nelder-Mead")
mpsgbetag(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

geometric exponential Poisson G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the geometric exponential Poisson G distribution. General form for the probability density function (pdf) of the geometric exponential Poisson G distribution due to Nadarajah et al. (2013) is given by

f(x,Θ)=a(1b)g(xμ,θ)(1ea)ea+aG(xμ,θ)(1eab+bea+aG(xμ,θ))2,f(x,{\Theta}) = \frac{{a(1 - b)\,g(x-\mu,\theta )\left( {1 - {e^{ - a}}} \right){e^{ - a + a\,G(x-\mu,\theta )}}}}{{{{\left( {1 - {e^{ - a}} - b + b{e^{ - a + a\,G(x-\mu,\theta )}}} \right)}^2}}},

where θ\theta is the baseline family parameter vector. Also, a>0, 0<b<1, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the geometric exponential Poisson G distribution is given by

F(x,Θ)=ea+aG(xμ,θ)ea1eab+bea+aG(xμ,θ).F(x,{\Theta}) = \frac{{{e^{ - a + aG(x-\mu,\theta )}} - {e^{ - a}}}}{{{{{1 - {e^{ - a}} - b + b{e^{ - a + aG(x-\mu,\theta )}}}}}}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dgexppg(mydata, g, param, location = TRUE, log=FALSE)
pgexppg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qgexppg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rgexppg(n, g, param, location = TRUE)
qqgexppg(mydata, g, location = TRUE, method)
mpsgexppg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Nadarajah, S., Cancho, V. G., and Ortega, E. M. M. (2013). The geometric exponential Poisson distribution, Statistical Methods & Applications, 22, 355-380.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dgexppg(mydata, "weibull", c(1,0.5,2,2,3))
pgexppg(mydata, "weibull", c(1,0.5,2,2,3))
qgexppg(runif(100), "weibull", c(1,0.5,2,2,3))
rgexppg(100, "weibull", c(1,0.5,2,2,3))
qqgexppg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsgexppg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

gamma-X family of modified beta exponential G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the gamma-X family of modified beta exponential G distribution. The General form for the probability density function (pdf) of the gamma-X family of the modified beta exponential G distribution due to Alzaatreh et al. (2013) is given by

f(x,Θ)=abg(xμ,θ)(1G(xμ,θ))2ebG(xμ,θ)1G(xμ,θ)[1ebG(xμ,θ)1G(xμ,θ)]a1,f(x,{\Theta}) = abg(x-\mu,\theta ){\left( {1 - G(x-\mu,\theta )} \right)^{ - 2}}{e^{ - b\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}}}{\left[ {1 - {e^{ - b\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}}}} \right]^{a - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the gamma-X family of modified beta exponential G distribution is given by

F(x,Θ)=(1ebG(xμ,θ)1G(xμ,θ))a.F(x,{\Theta}) = {\left( {1 - {e^{ - b\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}}}} \right)^a}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dgmbetaexpg(mydata, g, param, location = TRUE, log=FALSE)
pgmbetaexpg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qgmbetaexpg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rgmbetaexpg(n, g, param, location = TRUE)
qqgmbetaexpg(mydata, g, location = TRUE, method)
mpsgmbetaexpg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Alzaatreh, A., Lee, C., and Famoye, F. (2013). A new method for generating families of continuous distributions, Metron, 71, 63-79.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dgmbetaexpg(mydata, "weibull", c(1,1,2,2,3))
pgmbetaexpg(mydata, "weibull", c(1,1,2,2,3))
qgmbetaexpg(runif(100), "weibull", c(1,1,2,2,3))
rgmbetaexpg(100, "weibull", c(1,1,2,2,3))
qqgmbetaexpg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsgmbetaexpg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

exponentiated exponential Poisson G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the generalized transmuted G distribution. The general form for the probability density function (pdf) of the generalized transmuted G distribution due to Merovci et al. (2017) is given by

f(x,Θ)=ag(xμ,θ)(G(xμ,θ))a1[1+b2bG(xμ,θ)][1+b(1G(xμ,θ))]a1,f(x,{\Theta}) = a\,g(x-\mu,\theta ){\left( {G(x-\mu,\theta )} \right)^{a - 1}}\left[ {1 + b - 2bG(x-\mu,\theta )} \right]{\left[ {1 + b\left( {1 - G(x-\mu,\theta )} \right)} \right]^{a - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0, b<1, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the generalized transmuted G distribution distribution is given by

F(x,Θ)=(G(xμ,θ))a[1+b(1G(xμ,θ))]a.F(x,{\Theta}) = {\left( {G(x-\mu,\theta )} \right)^a}{\left[ {1 + b\left( {1 - G(x-\mu,\theta )} \right)} \right]^a}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dgtransg(mydata, g, param, location = TRUE, log=FALSE)
pgtransg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qgtransg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rgtransg(n, g, param, location = TRUE)
qqgtransg(mydata, g, location = TRUE, method)
mpsgtransg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Merovcia, F., Alizadeh, M., Yousof, H. M., and Hamedani, G. G. (2017). The exponentiated transmuted-G family of distributions: Theory and applications, Communications in Statistics-Theory and Methods, 46(21), 10800-10822.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dgtransg(mydata, "weibull", c(1,0.5,2,2,3))
pgtransg(mydata, "weibull", c(1,0.5,2,2,3))
qgtransg(runif(100), "weibull", c(1,0.5,2,2,3))
rgtransg(100, "weibull", c(1,0.5,2,2,3))
qqgtransg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsgtransg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

gamma-X generated of log-logistic-X familiy of G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the log-logistic-X familiy of G distribution. General form for the probability density function (pdf) of gamma-X generated of the log-logistic-X familiy of G distribution due to Alzaatreh et al. (2013) is given by

f(x,Θ)=ag(xμ,θ)[log(1G(xμ,θ))]a1(1G(x,θ)){1+[log(1G(x,θ))]a}2,f(x,{\Theta}) = \frac{{ag(x-\mu,\theta ){{\left[ { - \log \left( {1 - G(x-\mu,\theta )} \right)} \right]}^{ - a - 1}}}}{{\left( {1 - G(x,\theta )} \right){{\left\{ {1 + {{\left[ { - \log \left( {1 - G(x,\theta )} \right)} \right]}^a}} \right\}}^2}}},

where θ\theta is the baseline family parameter vector. Also, a>0 and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. It should be noted that here we set W(G(x,θ))=log(1G(x,θ))W(G(x,\theta))=-log(1-G(x,\theta )). The general form for the cumulative distribution function (cdf) of the gamma-X generated of log-logistic familiy of G distribution is given by

F(x,Θ)=11+[log(1G(x,θ))]a.F(x,{\Theta}) = \frac{1}{{1 + {{\left[ { - \log \left( {1 - G(x,\theta )} \right)} \right]}^{-a}}}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,θ,μ)\Theta=(a,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a is the shape parameter). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dgxlogisticg(mydata, g, param, location = TRUE, log=FALSE)
pgxlogisticg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qgxlogisticg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rgxlogisticg(n, g, param, location = TRUE)
qqgxlogisticg(mydata, g, location = TRUE, method)
mpsgxlogisticg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,θ,μ)\Theta=(a,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Alzaatreh, A., Lee, C., and Famoye, F. (2013). A new method for generating families of continuous distributions, Metron, 71, 63-79.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dgxlogisticg(mydata, "weibull", c(1,2,2,3))
pgxlogisticg(mydata, "weibull", c(1,2,2,3))
qgxlogisticg(runif(100), "weibull", c(1,2,2,3))
rgxlogisticg(100, "weibull", c(1,2,2,3))
qqgxlogisticg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsgxlogisticg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

Kumaraswamy G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the Kumaraswamy G distribution. General form for the probability density function (pdf) of the Kumaraswamy G distribution due to Cordeiro and Castro (2011) is given by

f(x,Θ)=abg(xμ,θ)(G(xμ,θ))a1[1(G(xμ,θ))a]b1,f(x,{\Theta}) = a\,b\,g(x-\mu,\theta ){\left( {G(x-\mu,\theta )} \right)^{a - 1}}{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]^{b - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the Kumaraswamy G distribution is given by

F(x,Θ)=1[1(G(xμ,θ))a]b.F(x,{\Theta}) = 1 - {\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]^b}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dkumg(mydata, g, param, location = TRUE, log=FALSE)
pkumg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qkumg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rkumg(n, g, param, location = TRUE)
qqkumg(mydata, g, location = TRUE, method)
mpskumg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Cordeiro, G. M. and Castro, M. (2011). A new family of generalized distributions, Journal of Statistical Computation and Simulation, 81, 883-898.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dkumg(mydata, "weibull", c(1,1,2,2,3))
pkumg(mydata, "weibull", c(1,1,2,2,3))
qkumg(runif(100), "weibull", c(1,1,2,2,3))
rkumg(100, "weibull", c(1,1,2,2,3))
qqkumg(mydata, "weibull", TRUE, "Nelder-Mead")
mpskumg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

log gamma G type I distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the log gamma type I G distribution. General form for the probability density function (pdf) of the log gamma type I G distribution due to Amini et al. (2013) is given by

f(x,Θ)=baΓ(a)g(xμ,θ)[log(1G(xμ,θ))]a1(1G(xμ,θ))b1,f(x,{\Theta}) = \frac{{{b^a}}}{{\Gamma (a)}}g(x-\mu,\theta ){\left[ { - \log (1 - G(x-\mu,\theta ))} \right]^{a - 1}}{\left( {1 - G(x-\mu,\theta )} \right)^{b - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the log gamma type I G distribution is given by

F(x,Θ)=0blog(1G(xμ,θ))ya1eyΓ(a)dy.F(x,{\Theta}) = \int_0^{ - b\log \left( {1 - G(x-\mu,\theta )} \right)} {\frac{{{y^{a - 1}}{e^{ - y}}}}{{\Gamma (a)}}dy}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dloggammag1(mydata, g, param, location = TRUE, log=FALSE)
ploggammag1(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qloggammag1(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rloggammag1(n, g, param, location = TRUE)
qqloggammag1(mydata, g, location = TRUE, method)
mpsloggammag1(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Amini, M., MirMostafaee, S. M. T. K., and Ahmadi, J. (2013). Log-gamma-generated families of distributions, Statistics, 48 (4), 913-932.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dloggammag1(mydata, "weibull", c(1,1,2,2,3))
ploggammag1(mydata, "weibull", c(1,1,2,2,3))
qloggammag1(runif(100), "weibull", c(1,1,2,2,3))
rloggammag1(100, "weibull", c(1,1,2,2,3))
qqloggammag1(mydata, "weibull", TRUE, "Nelder-Mead")
mpsloggammag1(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

log gamma G type II distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the log gamma type II G distribution. General form for the probability density function (pdf) of the log gamma type II G distribution due to Amini et al. (2013) is given by

f(x,Θ)=baΓ(a)g(xμ,θ)[log(G(xμ,θ))]a1(G(xμ,θ))b1,f(x,{\Theta}) = \frac{{{b^a}}}{{\Gamma (a)}}g(x-\mu,\theta ){\left[ { - \log (G(x-\mu,\theta ))} \right]^{a - 1}}{\left( {G(x-\mu,\theta )} \right)^{b - 1}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, d>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the log gamma type II G distribution is given by

F(x,Θ)=10blog(G(xμ,θ))ya1eyΓ(a)dy.F(x,{\Theta}) = 1 - \int_0^{ - b\log \left( {G(x-\mu,\theta )} \right)} {\frac{{{y^{a - 1}}{e^{ - y}}}}{{\Gamma (a)}}dy}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dloggammag2(mydata, g, param, location = TRUE, log=FALSE)
ploggammag2(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qloggammag2(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rloggammag2(n, g, param, location = TRUE)
qqloggammag2(mydata, g, location = TRUE, method)
mpsloggammag2(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Amini, M., MirMostafaee, S. M. T. K., and Ahmadi, J. (2013). Log-gamma-generated families of distributions, Statistics, 48 (4), 913-932.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dloggammag2(mydata, "weibull", c(1,1,2,2,3))
ploggammag2(mydata, "weibull", c(1,1,2,2,3))
qloggammag2(runif(100), "weibull", c(1,1,2,2,3))
rloggammag2(100, "weibull", c(1,1,2,2,3))
qqloggammag2(mydata, "weibull", TRUE, "Nelder-Mead")
mpsloggammag2(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

modified beta G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the modified beta G distribution. General form for the probability density function (pdf) of the modified beta G distribution due to Nadarajah et al. (2013) is given by

f(x,Θ)=dag(xμ,θ)(G(xμ,θ))a1(1G(xμ,θ))b1B(a,b)[1(1d)G(xμ,θ)]a+b,f(x,{\Theta}) = \frac{{{d^a}g(x-\mu,\theta ){{\left( {G(x-\mu,\theta )} \right)}^{a - 1}}{{\left( {1 - G(x-\mu,\theta )} \right)}^{b - 1}}}}{{B(a,b){{\left[ {1 - \left( {1 - d} \right)G(x-\mu,\theta )} \right]}^{a + b}}}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, d>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cdf of the modified beta G distribution is given by

F(x,Θ)=0dG(xμ,θ)1(1d)G(xμ,θ)ya1(1y)b1dyB(a,b).F(x,{\Theta}) = \frac{{\int_0^{\frac{{d\,G(x-\mu,\theta )}}{{1 - (1 - d)G(x-\mu,\theta )}}} {{y^{a - 1}}{{\left( {1 - y} \right)}^{b - 1}}} dy}}{{B(a,b)}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a, b, and d are the first, second, and the third shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dmbetag(mydata, g, param, location = TRUE, log=FALSE)
pmbetag(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qmbetag(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rmbetag(n, g, param, location = TRUE)
qqmbetag(mydata, g, location = TRUE, method)
mpsmbetag(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Nadarajah, S., Teimouri, M., and Shih, S. H. (2014). Modified beta distributions, Sankhya, 76 (1), 19-48.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dmbetag(mydata, "weibull", c(1,1,1,2,2,3))
pmbetag(mydata, "weibull", c(1,1,1,2,2,3))
qmbetag(runif(100), "weibull", c(1,1,1,2,2,3))
rmbetag(100, "weibull", c(1,1,1,2,2,3))
qqmbetag(mydata, "weibull", TRUE, "Nelder-Mead")
mpsmbetag(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

Marshall-Olkin G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the Marshall-Olkin G distribution. General form for the probability density function (pdf) of the Marshall-Olkin G distribution due to Marshall and Olkin (1997) is given by

f(x,Θ)=ag(xμ,θ)[1(1a)(1G(xμ,θ))]2,f(x,{\Theta}) = \frac{{ag(x-\mu,\theta )}}{{{{\left[ {1 - \left( {1 - a} \right)\left( {1 - G(x-\mu,\theta )} \right)} \right]}^2}}},

where θ\theta is the baseline family parameter vector. Also, a>0 and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the Marshall-Olkin G distribution is given by

F(x,Θ)=1a(1G(xμ,θ))[1(1a)(1G(xμ,θ))].F(x,{\Theta}) = 1 - \frac{{a\left( {1 - G(x-\mu,\theta )} \right)}}{{\left[ {1 - \left( {1 - a} \right)\left( {1 - G(x-\mu,\theta )} \right)} \right]}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,θ,μ)\Theta=(a,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter. Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dmog(mydata, g, param, location = TRUE, log=FALSE)
pmog(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qmog(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rmog(n, g, param, location = TRUE)
qqmog(mydata, g, location = TRUE, method)
mpsmog(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,θ,μ)\Theta=(a,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Marshall, A. W. and Olkin, I. (1997). A new method for adding a parameter to a family of distributions with application to the exponential and Weibull families, Biometrika, 84, 641-652.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dmog(mydata, "weibull", c(0.5,2,2,3))
pmog(mydata, "weibull", c(0.5,2,2,3))
qmog(runif(100), "weibull", c(0.5,2,2,3))
rmog(100, "weibull", c(0.5,2,2,3))
qqmog(mydata, "weibull", TRUE, "Nelder-Mead")
mpsmog(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

Marshall-Olkin Kumaraswamy G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the Marshall-Olkin Kumaraswamy G distribution. General form for the probability density function (pdf) of the Marshall-Olkin Kumaraswamy G distribution due to Roshini and Thobias (2017) is given by

f(x,Θ)=abdg(xμ,θ)(G(xμ,θ))a1[1(G(xμ,θ))a]b1[1(1d)[1(G(xμ,θ))a]b]2,f(x,{\Theta}) = \frac{{abd g(x-\mu,\theta ){{\left( {G(x-\mu,\theta )} \right)}^{a - 1}}{{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]}^{b - 1}}}}{{{{\left[ {1 - \left( {1 - d} \right){{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]}^b}} \right]}^2}}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, d>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the Marshall-Olkin Kumaraswamy G distribution is given by

F(x,Θ)=1d[1(G(xμ,θ))a]b1(1d)[1(G(xμ,θ))a]b.F(x,{\Theta}) = 1 - \frac{{d{{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]}^b}}}{{1 - \left( {1 - d} \right){{\left[ {1 - {{\left( {G(x-\mu,\theta )} \right)}^a}} \right]}^b}}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a, b, and d are the first, second, and the third shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dmokumg(mydata, g, param, location = TRUE, log=FALSE)
pmokumg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qmokumg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rmokumg(n, g, param, location = TRUE)
qqmokumg(mydata, g, location = TRUE, method)
mpsmokumg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Roshini, G. and Thobias, S. (2017). Marshall-Olkin Kumaraswamy Distribution, International Mathematical Forum, 12 (2), 47-69.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dmokumg(mydata, "weibull", c(1,1,1,2,2,3))
pmokumg(mydata, "weibull", c(1,1,1,2,2,3))
qmokumg(runif(100), "weibull", c(1,1,1,2,2,3))
rmokumg(100, "weibull", c(1,1,1,2,2,3))
qqmokumg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsmokumg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

odd log-logistic G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the odd log-logistic G distribution. General form for the probability density function (pdf) of the odd log-logistic G distribution due to Gauss et al. (2017) is given by

f(x,Θ)=abdg(xμ,θ)(G(xμ,θ))ad1[Gˉ(xμ,θ)]d1[(G(xμ,θ))d(Gˉ(xμ,θ))d]a+1{1[(G(xμ,θ))d(G(xμ,θ))d(Gˉ(xμ,θ))d]a}b1,f(x,{\Theta}) = \frac{{a\,b\,d\,g(x-\mu,\theta ){{\left( {G(x-\mu,\theta )} \right)}^{a\,d - 1}}{{\left[ {\bar G(x-\mu,\theta )} \right]}^{d - 1}}}}{{{{\left[ {{{\left( {G(x-\mu,\theta )} \right)}^d} - {{\left( {\bar G(x-\mu,\theta )} \right)}^d}} \right]}^{a + 1}}}}{\left\{ {1 - {{\left[ {\frac{{{{\left( {G(x-\mu,\theta )} \right)}^d}}}{{{{\left( {G(x-\mu,\theta )} \right)}^d} - {{\left( {\bar G(x-\mu,\theta )} \right)}^d}}}} \right]}^a}} \right\}^{b - 1}},

with Gˉ(xμ,θ)=1G(xμ,θ)\bar G(x-\mu,\theta ) = 1 - G(x-\mu,\theta ) where θ\theta is the baseline family parameter vector. Also, a>0, b>0, d>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the odd log-logistic G distribution is given by

F(x,Θ)=1{1[(G(xμ,θ))d(G(xμ,θ))d(Gˉ(xμ,θ))d]a}b.F(x,{\Theta}) = 1 - {\left\{ {1 - {{\left[ {\frac{{{{\left( {G(x-\mu,\theta )} \right)}^d}}}{{{{\left( {G(x-\mu,\theta )} \right)}^d} - {{\left( {\bar G(x-\mu,\theta )} \right)}^d}}}} \right]}^a}} \right\}^b}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a, b, and d are the first, second, and the third shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dologlogg(mydata, g, param, location = TRUE, log=FALSE)
pologlogg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qologlogg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rologlogg(n, g, param, location = TRUE)
qqologlogg(mydata, g, location = TRUE, method)
mpsologlogg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,d,θ,μ)\Theta=(a,b,d,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Gauss, M. C., Alizadeh, M., Ozel, G., Hosseini, B. Ortega, E. M. M., and Altunc, E. (2017). The generalized odd log-logistic family of distributions: properties, regression models and applications, Journal of Statistical Computation and Simulation, 87(5), 908-932.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dologlogg(mydata, "weibull", c(1,1,1,2,2,3))
pologlogg(mydata, "weibull", c(1,1,1,2,2,3))
qologlogg(runif(100), "weibull", c(1,1,1,2,2,3))
rologlogg(100, "weibull", c(1,1,1,2,2,3))
qqologlogg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsologlogg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

truncated-exponential skew-symmetric G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the truncated-exponential skew-symmetric G distribution. General form for the probability density function (pdf) of the truncated-exponential skew-symmetric G distribution due to Nadarajah et al. (2014) is given by

f(x,Θ)=a1eag(xμ,θ)eaG(xμ,θ),f(x,{\Theta}) = \frac{a}{{1 - {e^{ - a}}}}g(x-\mu,\theta ){e^{ - aG(x-\mu,\theta )}},

where θ\theta is the baseline family parameter vector. Also, a>0 and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the truncated-exponential skew-symmetric G distribution is given by

F(x,Θ)=1eaG(xμ,θ)1ea.F(x,{\Theta}) = \frac{{1 - {e^{ - aG(x-\mu,\theta )}}}}{{1 - {e^{ - a}}}}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,θ,μ)\Theta=(a,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter. Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dtexpsg(mydata, g, param, location = TRUE, log=FALSE)
ptexpsg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qtexpsg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rtexpsg(n, g, param, location = TRUE)
qqtexpsg(mydata, g, location = TRUE, method)
mpstexpsg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,θ,μ)\Theta=(a,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Nadarajah, S., Nassiri, V., and Mohammadpour, A. (2014). Truncated-exponential skew-symmetric distributions, Statistics, 48 (4), 872-895.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dtexpsg(mydata, "weibull", c(1,2,2,3))
ptexpsg(mydata, "weibull", c(1,2,2,3))
qtexpsg(runif(100), "weibull", c(1,2,2,3))
rtexpsg(100, "weibull", c(1,2,2,3))
qqtexpsg(mydata, "weibull", TRUE,"Nelder-Mead")
mpstexpsg(mydata, "weibull", TRUE,"Nelder-Mead", 0.05)

T-X{log-logistic} G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the Weibull extended or T-X{log-logistic} G distribution. General form for the probability density function (pdf) of the Weibull extended G distribution due to Alzaatreh et al. (2013) is given by

f(x,Θ)=ag(xμ,θ)b(1G(xμ,θ))2(G(xμ,θ)1G(xμ,θ))1b1exp{a(G(xμ,θ)1G(xμ,θ))1b},f(x,{\Theta}) = \frac{{a\,g(x-\mu,\theta)}}{{b{{\left( {1 - G(x-\mu,\theta )} \right)}^2}}}{\left( {\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}} \right)^{\frac{1}{b} - 1}}\exp \left\{ { - a{{\left( {\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}} \right)}^{\frac{1}{b}}}} \right\},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the Weibull extended G distribution is given by

F(x,Θ)=1exp{a(G(xμ,θ)1G(xμ,θ))1b}.F(x,{\Theta}) = 1 - \exp \left\{ { - a{{\left( {\frac{{G(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}} \right)}^{\frac{1}{b}}}} \right\}.

Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dweibullextg(mydata, g, param, location = TRUE, log=FALSE)
pweibullextg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qweibullextg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rweibullextg(n, g, param, location = TRUE)
qqweibullextg(mydata, g, location = TRUE, method)
mpsweibullextg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Alzaatreh, A., Lee, C., and Famoye, F. (2013). A new method for generating families of continuous distributions, Metron, 71, 63-79.

Examples

mydata<-rweibull(100, shape=2, scale=2)+3
dweibullextg(mydata, "weibull", c(1,1,2,2,3))
pweibullextg(mydata, "weibull", c(1,1,2,2,3))
qweibullextg(runif(100), "weibull", c(1,1,2,2,3))
rweibullextg(100, "weibull", c(1,1,2,2,3))
qqweibullextg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsweibullextg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)

Weibull G distribution

Description

Computes the pdf, cdf, quantile, and random numbers, draws the q-q plot, and estimates the parameters of the Weibull G distribution. General form for the probability density function (pdf) of the Weibull G distribution due to Alzaatreh et al. (2013) is given by

f(x,Θ)=abag(xμ,θ)1G(xμ,θ)[log(1G(xμ,θ))]a1e(log(1G(xμ,θ))b)a,f(x,{\Theta}) = \frac{a}{{{b^a}}}\frac{{g(x-\mu,\theta )}}{{1 - G(x-\mu,\theta )}}{\left[ { - \log \left( {1 - G(x-\mu,\theta )} \right)} \right]^{a - 1}}{e^{ - {{\left( {\frac{{ - \log \left( {1 - G(x-\mu,\theta )} \right)}}{b}} \right)}^a}}},

where θ\theta is the baseline family parameter vector. Also, a>0, b>0, and μ\mu are the extra parameters induced to the baseline cumulative distribution function (cdf) G whose pdf is g. The general form for the cumulative distribution function (cdf) of the Weibull G distribution is given by

F(x,Θ)=1e(log(1G(xμ,θ))b)a.F(x,{\Theta}) = 1 - {e^{ - {{\left( {\frac{{ - \log \left( {1 - G(x-\mu,\theta )} \right)}}{b}} \right)}^a}}}.

The weibullg is the special case (Weibull-X) of the Alzaatreh et al. (2013) families of distributions. Here, the baseline G refers to the cdf of famous families such as: Birnbaum-Saunders, Burr type XII, Exponential, Chen, Chisquare, F, Frechet, Gamma, Gompertz, Linear failure rate (lfr), Log-normal, Log-logistic, Lomax, Rayleigh, and Weibull. The parameter vector is Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu) where θ\theta is the baseline G family's parameter space. If θ\theta consists of the shape and scale parameters, the last component of θ\theta is the scale parameter (here, a and b are the first and second shape parameters). Always, the location parameter μ\mu is placed in the last component of Θ\Theta.

Usage

dweibullg(mydata, g, param, location = TRUE, log=FALSE)
pweibullg(mydata, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
qweibullg(p, g, param, location = TRUE, log.p = FALSE, lower.tail = TRUE)
rweibullg(n, g, param, location = TRUE)
qqweibullg(mydata, g, location = TRUE, method)
mpsweibullg(mydata, g, location = TRUE, method, sig.level)

Arguments

g

The name of family's pdf including: "birnbaum-saunders", "burrxii", "chisq", "chen", "exp", "f", "frechet", "gamma", "gompetrz", "lfr", "log-normal", "log-logistic", "lomax", "rayleigh", and "weibull".

p

a vector of value(s) between 0 and 1 at which the quantile needs to be computed.

n

number of realizations to be generated.

mydata

Vector of observations.

param

parameter vector Θ=(a,b,θ,μ)\Theta=(a,b,\theta,\mu)

location

If FALSE, then the location parameter will be omitted.

log

If TRUE, then log(pdf) is returned.

log.p

If TRUE, then log(cdf) is returned and quantile is computed for exp(-p).

lower.tail

If FALSE, then 1-cdf is returned and quantile is computed for 1-p.

method

The used method for maximizing the sum of log-spacing function. It will be "BFGS", "CG", "L-BFGS-B", "Nelder-Mead", or "SANN".

sig.level

Significance level for the Chi-square goodness-of-fit test.

Details

It can be shown that the Moran's statistic follows a normal distribution. Also, a chi-square approximation exists for small samples whose mean and variance approximately are m(log(m)+0.57722)-0.5-1/(12m) and m(π2\pi^2/6-1)-0.5-1/(6m), respectively, with m=n+1, see Cheng and Stephens (1989). So, a hypothesis tesing can be constructed based on a sample of n independent realizations at the given significance level, indicated in above as sig.level.

Value

  1. A vector of the same length as mydata, giving the pdf values computed at mydata.

  2. A vector of the same length as mydata, giving the cdf values computed at mydata.

  3. A vector of the same length as p, giving the quantile values computed at p.

  4. A vector of the same length as n, giving the random numbers realizations.

  5. A sequence of goodness-of-fit statistics such as: Akaike Information Criterion (AIC), Consistent Akaike Information Criterion (CAIC), Bayesian Information Criterion (BIC), Hannan-Quinn information criterion (HQIC), Cramer-von Misses statistic (CM), Anderson Darling statistic (AD), log-likelihood statistic (log), and Moran's statistic (M). The Kolmogorov-Smirnov (KS) test statistic and corresponding p-value. The Chi-square test statistic, critical upper tail Chi-square distribution, related p-value, and the convergence status.

Author(s)

Mahdi Teimouri

References

Cheng, R. C. H. and Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters, Biometrika, 76 (2), 385-392.

Alzaatreh, A., Lee, C., and Famoye, F. (2013). A new method for generating families of continuous distributions, Metron, 71, 63-79.

Examples

mydata<-rweibull(100,shape=2,scale=2)+3
dweibullg(mydata, "weibull", c(1,1,2,2,3))
pweibullg(mydata, "weibull", c(1,1,2,2,3))
qweibullg(runif(100), "weibull", c(1,1,2,2,3))
rweibullg(100, "weibull", c(1,1,2,2,3))
qqweibullg(mydata, "weibull", TRUE, "Nelder-Mead")
mpsweibullg(mydata, "weibull", TRUE, "Nelder-Mead", 0.05)