betaexpg function

beta exponential G distribution

beta exponential G distribution

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 [REMOVE_ME]f(x,Θ)=dg(xμ,θ)[1(1G(xμ,θ))d]b1(1G(xμ,θ))ad1B(a,b),[REMOVEME2] 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)}}, [REMOVE_ME_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 beta exponential G distribution is given by [REMOVE_ME]F(x,Θ)=10(1G(xμ,θ))dya1(1y)b1dyB(a,b).[REMOVEME2] 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)}}. [REMOVE_ME_2]

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.

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.

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.

Returns

  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.

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.

Author(s)

Mahdi Teimouri

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)
  • Maintainer: Mahdi Teimouri
  • License: GPL (>= 2)
  • Last published: 2019-10-04

Useful links