Package 'Newdistns'

Title: Computes Pdf, Cdf, Quantile and Random Numbers, Measures of Inference for 19 General Families of Distributions
Description: Computes the probability density function, cumulative distribution function, quantile function, random numbers and measures of inference for the following general families of distributions (each family defined in terms of an arbitrary cdf G): Marshall Olkin G distributions, exponentiated G distributions, beta G distributions, gamma G distributions, Kumaraswamy G distributions, generalized beta G distributions, beta extended G distributions, gamma G distributions, gamma uniform G distributions, beta exponential G distributions, Weibull G distributions, log gamma G I distributions, log gamma G II distributions, exponentiated generalized G distributions, exponentiated Kumaraswamy G distributions, geometric exponential Poisson G distributions, truncated-exponential skew-symmetric G distributions, modified beta G distributions, and exponentiated exponential Poisson G distributions.
Authors: Saralees Nadarajah, Ricardo Rocha
Maintainer: Saralees Nadarajah <[email protected]>
License: GPL (>= 2)
Version: 2.1
Built: 2024-11-01 06:34:13 UTC
Source: CRAN

Help Index


Computes Pdf, Cdf, Quantile, Random Numbers and Measures of Inference for 19 General Families of Distributions

Description

Computes the probability density function, cumulative distribution function, quantile function, random numbers and measures of inference for the following general families of distributions (each family defined in terms of an arbitrary cdf G): Marshall Olkin G distributions due to Marshall and Olkin (1997), exponentiated G distributions due to Gupta et al. (1998), beta G distributions due to Eugene et al. (2002), gamma G distributions due to Zografos and Balakrishnan (2009), Kumaraswamy G distributions due to Cordeiro and Castro (2011), generalized beta G distributions due to Alexander et al. (2012), beta extended G distributions due to Cordeiro et al. (2012), gamma G distributions due to Ristic and Balakrishnan (2012), gamma uniform G distributions due to Torabi and Montazeri (2012), beta exponential G distributions due to Alzaatreh et al. (2013), Weibull G distributions also due to Alzaatreh et al. (2013), log gamma G I distributions due to Amini et al. (2013), log gamma G II distributions also due to Amini et al. (2013), exponentiated generalized G distributions due to Cordeiro et al. (2013), exponentiated Kumaraswamy G distributions due to Lemonte et al. (2013), geometric exponential Poisson G distributions due to Nadarajah et al. (2013a), truncated-exponential skew-symmetric G distributions due to Nadarajah et al. (2013b), modified beta G distributions due to Nadarajah et al. (2013c), and exponentiated exponential Poisson G distributions due to Ristic and Nadarajah (2013).

Details

Package: Newdistns
Type: Package
Version: 2.1
Date: 2016-03-24
License: GPL(>=2)

probability density function, cumulative distribution function, quantile function, random numbers and measures of inference

Author(s)

Saralees Nadarajah, Ricardo Rocha

Maintainer: Saralees Nadarajah <[email protected]>

References

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

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

M. Amini, S. M. T. K. MirMostafaee, J. Ahmadi, Log-gamma-generated families of distributions, Statistics, 2013, doi: 10.1080/02331888.2012.748775

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

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

G. M. Cordeiro, E. M. M. Ortega, G. Silva, The beta extended Weibull family, Journal of Probability and Statistical Science 10 (2012) 15-40

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

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

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

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

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

S. Nadarajah, V. G. Cancho, E. M. M. Ortega, The geometric exponential Poisson distribution, Stat Methods Appl 22 (2013a) 355-380

S. Nadarajah, V. Nassiri, A. Mohammadpour, Truncated-exponential skew-symmetric distributions, Statistics, 2013b, to appear

S. Nadarajah, M. Teimouri, S. H. Shih, Modified beta distributions, Sankhya, 2013c, to appear

M. M. Ristic, S. Nadarajah, A new lifetime distribution, Journal of Statistical Computation and Simulation, doi: 10.1080/00949655.2012.697163

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

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


Beta Extended G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the beta extended distribution due to Cordeiro et al. (2012) specified by the pdf

f(x)=αg(x)B(a,b){1exp[αG(x)]}a1exp[αbG(x)]f (x) = \frac {\displaystyle \alpha g (x)}{\displaystyle B (a, b)} \left\{ 1 - \exp \left[ -\alpha G (x) \right] \right\}^{a - 1} \exp \left[ -\alpha b G (x) \right]

for GG any valid cdf, gg the corresponding pdf, α>0\alpha > 0, the scale parameter, a>0a > 0, the first shape parameter, and b>0b > 0, the second shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dbeg(x, spec, alpha = 1, a = 1, b = 1, log = FALSE, ...)
pbeg(x, spec, alpha = 1, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
qbeg(p, spec, alpha = 1, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
rbeg(n, spec, alpha = 1, a = 1, b = 1, ...)
mbeg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed, must be between 0 and 1 - exp(-alpha)

n

number of random numbers to be generated

alpha

the value of the scale parameter, must be positive, the default is 1

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (alpha, a, b, r) if g has one parameter or initial values of (alpha, a, b, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Note

NaNs can be produced if p∉[0,1exp(α)]p \not \in [0, 1 - \exp (-\alpha)].

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

G. M. Cordeiro, E. M. M. Ortega, G. Silva, The beta extended Weibull family, Journal of Probability and Statistical Science 10 (2012) 15-40

Examples

x=runif(10,min=0,max=1)
dbeg(x,"exp",alpha=1,a=1,b=1)
pbeg(x,"exp",alpha=1,a=1,b=1)
qbeg(x,"exp",alpha=1,a=1,b=1)
rbeg(10,"exp",alpha=1,a=1,b=1)
mbeg("exp",rexp(100),starts=c(1,1,1,1),method="BFGS")

Beta Exponential G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the beta exponential G distribution due to Alzaatreh et al. (2013) specified by the pdf

f(x)=λB(a,b)g(x)[1G(x)]λb1{1[1G(x)]λ}a1f (x) = \frac {\lambda}{B (a, b)} g (x) \left[ 1 - G (x) \right]^{\lambda b - 1}\left\{ 1 - \left[ 1 - G (x) \right]^\lambda \right\}^{a - 1}

for GG any valid cdf, gg the corresponding pdf, λ>0\lambda > 0, the first shape parameter, a>0a > 0, the second shape parameter, and b>0b > 0, the third shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dbetaexpg(x, spec, lambda = 1, a = 1, b = 1, log = FALSE, ...)
pbetaexpg(x, spec, lambda = 1, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
qbetaexpg(p, spec, lambda = 1, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
rbetaexpg(n, spec, lambda = 1, a = 1, b = 1, ...)
mbetaexpg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

lambda

the value of the first parameter, must be positive, the default is 1

a

the value of the second shape parameter, must be positive, the default is 1

b

the value of the third shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (lambda, a, b, r) if g has one parameter or initial values of (lambda, a, b, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dbetaexpg(x,"exp",lambda=1,a=1,b=1)
pbetaexpg(x,"exp",lambda=1,a=1,b=1)
qbetaexpg(x,"exp",lambda=1,a=1,b=1)
rbetaexpg(10,"exp",lambda=1,a=1,b=1)
mbetaexpg("exp",rexp(100),starts=c(1,1,1,1),method="BFGS")

Beta G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the beta G distribution due to Eugene et al. (2002) specified by the pdf

f(x)=1B(a,b)g(x)[G(x)]a1[1G(x)]b1f (x) = \frac {\displaystyle 1}{\displaystyle B(a,b)} g(x)\left[ G(x) \right]^{a - 1} \left[ 1 - G(x) \right]^{b - 1}

for GG any valid cdf, gg the corresponding pdf, a>0a > 0, the first shape parameter, and b>0b > 0, the second shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dbetag(x, spec, a = 1, b = 1, log = FALSE, ...)
pbetag(x, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
qbetag(p, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
rbetag(n, spec, a = 1, b = 1, ...)
mbetag(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, b, r) if g has one parameter or initial values of (a, b, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dbetag(x,"exp",a=1,b=1)
pbetag(x,"exp",a=1,b=1)
qbetag(x,"exp",a=1,b=1)
rbetag(10,"exp",a=1,b=1)
mbetag("exp",rexp(100),starts=c(1,1,1),method="BFGS")

Exponentiated Exponential Poisson G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the exponentiated exponential Poisson G distribution due to Ristic and Nadarajah (2013) specified by the pdf

f(x)=aλ{1exp(λ)}1g(x)Ga1(x)exp[λGa(x)]f (x) = \displaystyle a \lambda \left\{ 1 - \exp (-\lambda) \right\}^{-1} g (x) G^{a - 1} (x) \exp \left[ -\lambda G^a (x) \right]

for GG any valid cdf, gg the corresponding pdf, λ>0\lambda > 0, the scale parameter, and a>0a > 0, the shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

deepg(x, spec, lambda = 1, a = 1, log = FALSE, ...)
peepg(x, spec, lambda = 1, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
qeepg(p, spec, lambda = 1, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
reepg(n, spec, lambda = 1, a = 1, ...)
meepg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

lambda

the value of the scale parameter, must be positive, the default is 1

a

the value of the shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (lambda, a, r) if g has one parameter or initial values of (lambda, a, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

M. M. Ristic, S. Nadarajah, A new lifetime distribution, Journal of Statistical Computation and Simulation, doi: 10.1080/00949655.2012.697163

Examples

x=runif(10,min=0,max=1)
deepg(x,"exp",lambda=1,a=1)
peepg(x,"exp",lambda=1,a=1)
qeepg(x,"exp",lambda=1,a=1)
reepg(10,"exp",lambda=1,a=1)
meepg("exp",rexp(100),starts=c(1,1,1),method="BFGS")

Exponentiated Generalized G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the exponentiated generalized G distribution due to Cordeiro et al. (2013) specified by the pdf

f(x)=abg(x)[1G(x)]a1{1[1G(x)]a}b1f (x) = a b g (x) \left[ 1 - G (x) \right]^{a - 1} \left\{ 1 - \left[ 1 - G (x) \right]^a \right\}^{b - 1}

for GG any valid cdf, gg the corresponding pdf, a>0a > 0, the first shape parameter, and b>0b > 0, the second shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

deg(x, spec, a = 1, b = 1, log = FALSE, ...)
peg(x, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
qeg(p, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
reg(n, spec, a = 1, b = 1, ...)
meg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, b, r) if g has one parameter or initial values of (a, b, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
deg(x,"exp",a=1,b=1)
peg(x,"exp",a=1,b=1)
qeg(x,"exp",a=1,b=1)
reg(10,"exp",a=1,b=1)
meg("exp",rexp(100),starts=c(1,1,1),method="BFGS")

Exponentiated G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the exponentiated G distribution due to Gupta et al. (1998) specified by the pdf

f(x)=ag(x)Ga1(x)f (x) = a g (x) G^{a - 1} (x)

for GG any valid cdf, gg the corresponding pdf and a>0a > 0, the shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Crite rion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dexpg(x, spec, a = 1, log = FALSE, ...)
pexpg(x, spec, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
qexpg(p, spec, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
rexpg(n, spec, a = 1, ...)
mexpg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, r) if g has one parameter or initial values of (a, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dexpg(x,"exp",a=1)
pexpg(x,"exp",a=1)
qexpg(x,"exp",a=1)
rexpg(10,"exp",a=1)
mexpg("exp",rexp(100),starts=c(1,1),method="BFGS")

Exponentiated Kumaraswamy G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the exponentiated Kumaraswamy G distribution due to Lemonte et al. (2013) specified by the pdf

f(x)=abcg(x)Ga1(x)[1Ga(x)]b1{1[1Ga(x)]b}c1f (x) = a b c g (x) G^{a - 1} (x) \left[ 1 - G^a (x) \right]^{b - 1} \left\{ 1 - \left[ 1 - G^a (x) \right]^b \right\}^{c - 1}

for GG any valid cdf, gg the corresponding pdf, a>0a > 0, the first shape parameter, b>0b > 0, the second shape parameter and c>0c > 0, the third shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dexpkumg(x, spec, a = 1, b = 1, c = 1, log = FALSE, ...)
pexpkumg(x, spec, a = 1, b = 1, c = 1, log.p = FALSE, lower.tail = TRUE, ...)
qexpkumg(p, spec, a = 1, b = 1, c = 1, log.p = FALSE, lower.tail = TRUE, ...)
rexpkumg(n, spec, a = 1, b = 1, c = 1, ...)
mexpkumg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

c

the value of the third shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, b, c, r) if g has one parameter or initial values of (a, b, c, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dexpkumg(x,"exp",a=1,b=1,c=1)
pexpkumg(x,"exp",a=1,b=1,c=1)
qexpkumg(x,"exp",a=1,b=1,c=1)
rexpkumg(10,"exp",a=1,b=1,c=1)
mexpkumg("exp",rexp(100),starts=c(1,1,1,1),method="BFGS")

Gamma Uniform G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the gamma uniform G distribution due to Torabi and Montazeri (2012) specified by the pdf

f(x)=1Γ(a)g(x)[1G(x)]2[G(x)1G(x)]a1exp[G(x)1G(x)]f (x) = \frac {1}{\Gamma (a)} \frac {g (x)}{\left[ 1 - G (x) \right]^2} \left[ \frac {G (x)}{1 - G (x)} \right]^{a - 1} \exp \left[ -\frac {G (x)}{1 - G (x)} \right]

for GG any valid cdf, gg the corresponding pdf, and a>0a > 0, the first shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dgammag(x, spec, a = 1, log = FALSE, ...)
pgammag(x, spec, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
qgammag(p, spec, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
rgammag(n, spec, a = 1, ...)
mgammag(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, r) if g has one parameter or initial values of (a, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dgammag(x,"exp",a=1)
pgammag(x,"exp",a=1)
qgammag(x,"exp",a=1)
rgammag(10,"exp",a=1)
mgammag("exp",rexp(100),starts=c(1,1),method="BFGS")

Gamma G Distribution due to Zografos and Balakrishnan (2009)

Description

Computes the pdf, cdf, quantile and random numbers of the gamma G distribution due to Zografos and Balakrishnan (2009) specified by the pdf

f(x)=1Γ(a)g(x){log[1G(x)]}a1f (x) = \frac{\displaystyle 1}{\displaystyle \Gamma(a)} g (x) \left\{ -\log \left[ 1 - G(x) \right] \right\}^{a-1}

for GG any valid cdf, gg the corresponding pdf, and a>0a > 0, the shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dgammag1(x, spec, a = 1, log = FALSE, ...)
pgammag1(x, spec, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
qgammag1(p, spec, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
rgammag1(n, spec, a = 1, ...)
mgammag1(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, r) if g has one parameter or initial values of (a, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dgammag1(x,"exp",a=1)
pgammag1(x,"exp",a=1)
qgammag1(x,"exp",a=1)
rgammag1(10,"exp",a=1)
mgammag1("exp",rexp(100),starts=c(1,1),method="BFGS")

Gamma G Distribution due to Ristic and Balakrishnan (2012)

Description

Computes the pdf, cdf, quantile and random numbers of the gamma G distribution due to Ristic and Balakrishnan (2012) specified by the pdf

f(x)=1Γ(a)g(x){logG(x)}a1f (x) = \frac {\displaystyle 1}{\displaystyle \Gamma(a)} g (x) \left\{ -\log G(x) \right\}^{a-1}

for GG any valid cdf, gg the corresponding pdf, and a>0a > 0, the shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dgammag2(x, spec, a = 1, log = FALSE, ...)
pgammag2(x, spec, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
qgammag2(p, spec, a = 1, log.p = FALSE, lower.tail = TRUE, ...)
rgammag2(n, spec, a = 1, ...)
mgammag2(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, r) if g has one parameter or initial values of (a, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dgammag2(x,"exp",a=1)
pgammag2(x,"exp",a=1)
qgammag2(x,"exp",a=1)
rgammag2(10,"exp",a=1)
mgammag2("exp",rexp(10),starts=c(1,1),method="BFGS")

Generalized Beta G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the generalized beta G distribution due to Alexander et al. (2012) specified by the pdf

f(x)=cB(a,b)g(x)Gac1(x)[1Gc(x)]b1f (x) = \frac {c}{B (a, b)} g (x) G^{a c - 1} (x) \left[ 1 - G^c (x) \right]^{b - 1}

for GG any valid cdf, gg the corresponding pdf, a>0a > 0, the first shape parameter, b>0b > 0, the second shape parameter and c>0c > 0, the third shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dgbg(x, spec, a = 1, b = 1, c = 1, log = FALSE, ...)
pgbg(x, spec, a = 1, b = 1, c = 1, log.p = FALSE, lower.tail = TRUE, ...)
qgbg(p, spec, a = 1, b = 1, c = 1, log.p = FALSE, lower.tail = TRUE, ...)
rgbg(n, spec, a = 1, b = 1, c = 1, ...)
mgbg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

c

the value of the third shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, b, c, r) if g has one parameter or initial values of (a, b, c, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dgbg(x,"exp",a=1,b=1,c=1)
pgbg(x,"exp",a=1,b=1,c=1)
qgbg(x,"exp",a=1,b=1,c=1)
rgbg(10,"exp",a=1,b=1,c=1)
mgbg("exp",rexp(100),starts=c(1,1,1,1),method="BFGS")

Geometric Exponential Poisson G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the geometric exponential Poisson G distribution due to Nadarajah et al. (2013) specified by the pdf

f(x)=θ(1η)[1exp(θ)]g(x)exp[θ+θG(x)]{1exp(θ)η+ηexp[θ+θG(x)]}2f (x) = \displaystyle \frac {\displaystyle \theta (1 - \eta) \left[ 1 - \exp (-\theta) \right] g (x) \exp \left[ -\theta + \theta G (x) \right]}{\displaystyle \left\{ 1 - \exp (-\theta) - \eta + \eta \exp \left[ -\theta + \theta G (x) \right] \right\}^2}

for GG any valid cdf, gg the corresponding pdf, θ>0\theta > 0, the first scale parameter, and 0<eta<10 < eta < 1, the second scale parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dgepg(x, spec, theta = 1, eta = 0.5, log = FALSE, ...)
pgepg(x, spec, theta = 1, eta = 0.5, log.p = FALSE, lower.tail = TRUE, ...)
qgepg(p, spec, theta = 1, eta = 0.5, log.p = FALSE, lower.tail = TRUE, ...)
rgepg(n, spec, theta = 1, eta = 0.5, ...)
mgepg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

theta

the value of first scale parameter, must be positive, the default is 1

eta

the value of second scale parameter, must be in the open unit interval, the default is 0.5

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (theta, eta, r) if g has one parameter or initial values of (theta, eta, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

S. Nadarajah, V. G. Cancho, E. M. M. Ortega, The geometric exponential Poisson distribution, Stat Methods Appl 22 (2013) 355-380

Examples

x=runif(10,min=0,max=1)
dgepg(x,"exp",theta=1,eta=0.5)
pgepg(x,"exp",theta=1,eta=0.5)
qgepg(x,"exp",theta=1,eta=0.5)
rgepg(10,"exp",theta=1,eta=0.5)
mgepg("exp",rexp(100),starts=c(1,0.5,1),method="BFGS")

Kumaraswamy G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the Kumaraswamy G distribution due to Cordeiro and Castro (2011) specified by the pdf

f(x)=abg(x)Ga1(x)[1Ga(x)]b1f (x) = a b g (x) G^{a - 1} (x) \left[ 1 - G^a (x) \right]^{b - 1}

for GG any valid cdf, gg the corresponding pdf, a>0a > 0, the first shape parameter, and b>0b > 0, the second shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dkumg(x, spec, a = 1, b = 1, log = FALSE, ...)
pkumg(x, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
qkumg(p, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
rkumg(n, spec, a = 1, b = 1, ...)
mkumg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, b, r) if g has one parameter or initial values of (a, b, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dkumg(x,"exp",a=1,b=1)
pkumg(x,"exp",a=1,b=1)
qkumg(x,"exp",a=1,b=1)
rkumg(10,"exp",a=1,b=1)
mkumg("exp",rexp(100),starts=c(1,1,1),method="BFGS")

Log Gamma G I Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the log gamma G I distribution due to Amini et al. (2013) specified by the pdf

f(x)=baΓ(a)g(x){log[1G(x)]}a1[1G(x)]b1f (x) = \frac {b^a}{\Gamma (a)} g (x) \left\{ -\log \left[ 1 - G (x) \right] \right\}^{a - 1} \left[ 1 - G (x) \right]^{b - 1}

for GG any valid cdf, gg the corresponding pdf, a>0a > 0, the first shape parameter, b>0b > 0, and the second shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dloggammag1(x, spec, a = 1, b = 1, log = FALSE, ...)
ploggammag1(x, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
qloggammag1(p, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
rloggammag1(n, spec, a = 1, b = 1,  ...)
mloggammag1(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, b, r) if g has one parameter or initial values of (a, b, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

M. Amini, S. M. T. K. MirMostafaee, J. Ahmadi, Log-gamma-generated families of distributions, Statistics, 2013, doi: 10.1080/02331888.2012.748775

Examples

x=runif(10,min=0,max=1)
dloggammag1(x,"exp",a=1,b=1)
ploggammag1(x,"exp",a=1,b=1)
qloggammag1(x,"exp",a=1,b=1)
rloggammag1(10,"exp",a=1,b=1)
mloggammag1("exp",rexp(100),starts=c(1,1,1),method="BFGS")

Log Gamma G II Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the log gamma G II distribution due to Amini et al. (2013) specified by the pdf

f(x)=baΓ(a)g(x){logG(x)}a1Gb1(x)f (x) = \frac {b^a}{\Gamma (a)} g (x) \left\{ -\log G (x) \right\}^{a - 1} G^{b - 1} (x)

for GG any valid cdf, gg the corresponding pdf, a>0a > 0, the first shape parameter, b>0b > 0, and the second shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dloggammag2(x, spec, a = 1, b = 1, log = FALSE, ...)
ploggammag2(x, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
qloggammag2(p, spec, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
rloggammag2(n, spec, a = 1, b = 1,  ...)
mloggammag2(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (a, b, r) if g has one parameter or initial values of (a, b, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

M. Amini, S. M. T. K. MirMostafaee, J. Ahmadi, Log-gamma-generated families of distributions, Statistics, 2013, doi: 10.1080/02331888.2012.748775

Examples

x=runif(10,min=0,max=1)
dloggammag2(x,"exp",a=1,b=1)
ploggammag2(x,"exp",a=1,b=1)
qloggammag2(x,"exp",a=1,b=1)
rloggammag2(10,"exp",a=1,b=1)
mloggammag2("exp",rexp(100),starts=c(1,1,1),method="BFGS")

Modified Beta G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the modified beta G distribution due to Nadarajah et al. (2013) specified by the pdf

f(x)=βaB(a,b)g(x)[G(x)]a1[1G(x)]b1[1(1β)G(x)]a+bf (x) = \frac {\displaystyle \beta^a}{\displaystyle B(a,b)} \frac {\displaystyle g(x)\left[ G(x) \right]^{a - 1} \left[ 1 - G(x) \right]^{b - 1}}{\displaystyle \left[ 1 - (1 - \beta ) G(x) \right]^{a + b}}

for GG any valid cdf, gg the corresponding pdf, β>0\beta > 0, the scale parameter, a>0a > 0, the first shape parameter and b>0b > 0, the second shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dmbetag(x, spec, beta = 1, a = 1, b = 1, log = FALSE, ...)
pmbetag(x, spec, beta = 1, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
qmbetag(p, spec, beta = 1, a = 1, b = 1, log.p = FALSE, lower.tail = TRUE, ...)
rmbetag(n, spec, beta = 1, a = 1, b = 1, ...)
mmbetag(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

beta

the value of the scale parameter, must be positive, the default is 1

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (beta, a, b, r) if g has one parameter or initial values of (beta, a, b, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

S. Nadarajah, M. Teimouri, S. H. Shih, Modified beta distributions, Sankhya, 2013, to appear

Examples

x=runif(10,min=0,max=1)
dmbetag(x,"exp",beta=1,a=1,b=1)
pmbetag(x,"exp",beta=1,a=1,b=1)
qmbetag(x,"exp",beta=1,a=1,b=1)
rmbetag(10,"exp",beta=1,a=1,b=1)
mmbetag("exp",rexp(100),starts=c(1,1,1,1),method="BFGS")

Marshall Olkin G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the Marshall Olkin distribution due to Marshall and Olkin (1997) specified by the pdf

βg(x)[β+(1β)G(x)]2\frac {\displaystyle \beta g (x)}{\displaystyle \left[ \beta + (1 - \beta) G (x) \right]^2}

for GG any valid cdf, gg the corresponding pdf and β>0\beta > 0, the scale parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dmog(x, spec, beta = 1, log = FALSE, ...)
pmog(x, spec, beta = 1, log.p = FALSE, lower.tail = TRUE, ...)
qmog(p, spec, beta = 1, log.p = FALSE, lower.tail = TRUE, ...)
rmog(n, spec, beta = 1, ...)
mmog(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

beta

the value of the scale parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (beta, r) if g has one parameter or initial values of (beta, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dmog(x,"exp",beta=1)
pmog(x,"exp",beta=1)
qmog(x,"exp",beta=1)
rmog(10,"exp",beta=1)
mmog("exp",rexp(100),starts=c(1,1),method="BFGS")

Truncated-Exponential Skew-Symmetric G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the truncated-exponential skew-symmetric G distribution due to Nadarajah et al. (2013) specified by the pdf

f(x)=λ1exp(λ)g(x)exp{λG(x)}f (x) = \frac {\lambda}{1 - \exp (-\lambda)} g(x) \exp \left\{ -\lambda G(x) \right\}

for GG any valid cdf, gg the corresponding pdf, and <λ<-\infty < \lambda < \infty, the skewness parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status when the distribution is fitted to some data

Usage

dtessg(x, spec, lambda = 1, log = FALSE, ...)
ptessg(x, spec, lambda = 1, log.p = FALSE, lower.tail = TRUE, ...)
qtessg(p, spec, lambda = 1, log.p = FALSE, lower.tail = TRUE, ...)
rtessg(n, spec, lambda = 1, ...)
mtessg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

lambda

the value of skewness parameter, can be any real value, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (r) or two parameters (r, s), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (lambda, r) if g has one parameter or initial values of (lambda, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

S. Nadarajah, V. Nassiri, A. Mohammadpour, Truncated-exponential skew-symmetric distributions, Statistics, to appear

Examples

x=runif(10,min=0,max=1)
dtessg(x,"exp",lambda=1)
ptessg(x,"exp",lambda=1)
qtessg(x,"exp",lambda=1)
rtessg(10,"exp",lambda=1)
mtessg("exp",rexp(100),starts=c(1,1),method="BFGS")

Weibull G Distribution

Description

Computes the pdf, cdf, quantile and random numbers of the Weibull G distribution due to Alzaatreh et al. (2013) specified by the pdf

f(x)=cβg(x)1G(x){log[1G(x)]β}c1exp{[log[1G(x)]β]c}f (x) = \frac {c}{\beta} \frac {g (x)}{1 - G (x)} \left\{ -\frac {\log \left[ 1 - G (x) \right]}{\beta} \right\}^{c - 1} \exp \left\{ -\left[ -\frac {\log \left[ 1 - G (x) \right]}{\beta} \right]^c \right\}

for GG any valid cdf, gg the corresponding pdf, β>0\beta > 0, the scale parameter and c>0c > 0, the shape parameter. Also computes the Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status

Usage

dweibullg(x, spec, beta = 1, c = 1, log = FALSE, ...)
pweibullg(x, spec, beta = 1, c = 1, log.p = FALSE, lower.tail = TRUE, ...)
qweibullg(p, spec, beta = 1, c = 1, log.p = FALSE, lower.tail = TRUE, ...)
rweibullg(n, spec, beta = 1, c = 1, ...)
mweibullg(g, data, starts, method = "BFGS")

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of probabilities at which the quantile needs to be computed

n

number of random numbers to be generated

beta

the value of the scale parameter, must be positive, the default is 1

c

the value of the shape parameter, must be positive, the default is 1

spec

a character string specifying the distribution of G and g (for example, "norm" if G and g correspond to the standard normal).

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

...

other parameters

g

same as spec but must be one of chisquare ("chisq"), exponential ("exp"), F ("f"), gamma ("gamma"), lognormal ("lognormal"), Weibull ("weibull"), Burr XII ("burrxii"), Chen ("chen"), Frechet ("frechet"), Gompertz ("gompertz"), linear failure rate ("lfr"), log-logistic ("log-logistic"), Lomax ("lomax") and Rayleigh ("rayleigh"). Each of these distributions has one parameter (a) or two parameters (a, b), for details including the density function and parameter specifications see Nadarajah and Rocha (2014)

data

a vector of data values for which the distribution is to be fitted

starts

initial values of (beta, c, r) if g has one parameter or initial values of (beta, c, r, s) if g has two parameters

method

the method for optimizing the log likelihood function. It can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B" or "SANN". The default is "BFGS". The details of these methods can be found in the manual pages for optim

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the quantile values computed at p or an object of the same length as n, giving the random numbers generated, or an object giving the values of Cramer-von Misses statistic, Anderson Darling statistic, Kolmogorov Smirnov test statistic and p-value, maximum likelihood estimates, Akaike Information Criterion, Consistent Akaikes Information Criterion, Bayesian Information Criterion, Hannan-Quinn information criterion, standard errors of the maximum likelihood estimates, minimum value of the negative log-likelihood function and convergence status.

Author(s)

Saralees Nadarajah, Ricardo Rocha

References

S. Nadarajah and R. Rocha, Newdistns: An R Package for New Families of Distributions, Journal of Statistical Software, 69(10), 1-32, doi:10.18637/jss.v069.i10

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

Examples

x=runif(10,min=0,max=1)
dweibullg(x,"exp",beta=1,c=1)
pweibullg(x,"exp",beta=1,c=1)
qweibullg(x,"exp",beta=1,c=1)
rweibullg(10,"exp",beta=1,c=1)
mweibullg("exp",rexp(100),starts=c(1,1,1),method="BFGS")