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,{\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,\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,{\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 \(\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\).
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)
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
".
a vector of value(s) between 0 and 1 at which the quantile needs to be computed.
number of realizations to be generated.
Vector of observations.
parameter vector \(\Theta=(a,\theta,\mu)\)
If FALSE
, then the location parameter will be omitted.
If TRUE
, then log(pdf) is returned.
If TRUE
, then log(cdf) is returned and quantile is computed for exp(-p)
.
If FALSE
, then 1-cdf
is returned and quantile is computed for 1-p
.
The used method for maximizing the sum of log-spacing function. It will be "BFGS
", "CG
", "L-BFGS-B
", "Nelder-Mead
", or "SANN
".
Significance level for the Chi-square goodness-of-fit test.
A vector of the same length as mydata
, giving the pdf values computed at mydata
.
A vector of the same length as mydata
, giving the cdf values computed at mydata
.
A vector of the same length as p
, giving the quantile values computed at p
.
A vector of the same length as n
, giving the random numbers realizations.
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.
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(\(\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
.
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.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab