| Title: | Discrete Transmuted Generalized Inverse Weibull Distribution |
|---|---|
| Description: | The Discrete Transmuted Generalized Inverse Weibull (DTGIW) distribution is a new distribution for count data analysis. The DTGIW is a discrete distribution based on Atchanut and Sirinapa (2021). <DOI: 10.14456/sjst-psu.2021.149>. In addition, a function for maximum likelihood estimation of the DTGIW distribution is provided. |
| Authors: | Atchanut Rattanalertnusorn [cre, aut], Sirinapa Aryuyuen [aut] |
| Maintainer: | Atchanut Rattanalertnusorn <[email protected]> |
| License: | GPL-3 |
| Version: | 1.1.0 |
| Built: | 2026-07-03 10:00:56 UTC |
| Source: | https://github.com/cran/dtgiw |
This function calculated the PMF of the DTGIW distribution.
dDTGIW(x, alpha, beta, lambda, theta, log = FALSE)dDTGIW(x, alpha, beta, lambda, theta, log = FALSE)
x |
vector of quantiles. |
alpha |
shape parameter#1. |
beta |
scale parameter. |
lambda |
shape pameter#2. |
theta |
the transmuted parameter. |
log |
logical(TRUE or FALSE); if log=FALSE, then return the PMF; if log=TRUE, then return the natural logarithms of the PMF. |
The PMF of the DTGIW distribution is shown in Theorem 1 based on the research paper in references.
the PMF of DTGIW distribution
Atchanut Rattanalertnusorn and Sirinapa Aryuyuen (2021). The zero-truncated discrete transmuted generalized inverse Weibull distribution and its applications, Songklanakarin Journal of Science and Technology (SJST), Volume 43 No.4 (July - August 2021), pp. 1140 - 1151. DOI: 10.14456/sjst-psu.2021.149
x <- c(0:10) dDTGIW(x,3.45,0.7,1.05,0)x <- c(0:10) dDTGIW(x,3.45,0.7,1.05,0)
The function for calculating negative log-likelihood value of DTGIW distribution.
loglikeDTGIW(x, alpha, beta, lambda, theta)loglikeDTGIW(x, alpha, beta, lambda, theta)
x |
a vector of quantile |
alpha |
shape parameter#1 |
beta |
scale parameter |
lambda |
shape pameter#2 |
theta |
the transmuted parameter |
the negative log-likelihood value of DTGIW distribution
Atchanut Rattanalertnusorn and Sirinapa Aryuyuen (2021). The zero-truncated discrete transmuted generalized inverse Weibull distribution and its applications, Songklanakarin Journal of Science and Technology (SJST), Volume 43 No.4 (July - August 2021), pp. 1140 - 1151 <DOI: 10.14456/sjst-psu.2021.149>.
x <- rDTGIW(n=20,3.45,0.7,1.05,0) loglikeDTGIW(x,3.45,0.7,1.05,0)x <- rDTGIW(n=20,3.45,0.7,1.05,0) loglikeDTGIW(x,3.45,0.7,1.05,0)
The function is used to estimate parameters based on the maximum likelihood method
mleDTGIW(x, par)mleDTGIW(x, par)
x |
a data vector |
par |
a parameter vector of the DTGIW distribution;
i.e. c(2.5, 1.5, 1.5, -0.5) means |
a list of variables as follows:
mle.est gives the estimated parameter vector,
negloglik gives a value of the negative loglikelihood function,
method gives the method of optimization,
AIC gives the Akaike Information Criterion,
and BIC gives the Bayesian Information Criterion.
Rattanalertnusorn, A., & Aryuyuen, S. (2022). An R implementation for estimating the parameters of the discrete transmuted generalized inverse Weibull distribution, International Journal of Mathematics and Computer Science, Volume 17, Issue 3, pp. 1427 - 1438. <https://www.scopus.com/pages/publications/85130592908?origin=resultslist>.
x <- rDTGIW(30,alpha = 2.5,beta = 1.5, lambda = 1.5, theta = -0.5) initpar <- c(2.5,1.5,1.5,-0.5) mleDTGIW(x=x,par=initpar)x <- rDTGIW(30,alpha = 2.5,beta = 1.5, lambda = 1.5, theta = -0.5) initpar <- c(2.5,1.5,1.5,-0.5) mleDTGIW(x=x,par=initpar)
This function calculated the CDF of the DTGIW distribution.
pDTGIW(q, alpha, beta, lambda, theta, lower.tail = TRUE, log.p = FALSE)pDTGIW(q, alpha, beta, lambda, theta, lower.tail = TRUE, log.p = FALSE)
q |
vector of quantiles. |
alpha |
shape parameter#1. |
beta |
scale parameter. |
lambda |
shape pameter#2. |
theta |
the transmuted parameter. |
lower.tail |
logical; if TRUE (default), probabilities are Prob of X less than or equal to x. Otherwise, Prob of X greater than x. |
log.p |
logical(TRUE or FALSE); if log.p=FALSE, then return the CDF; if log.p=TRUE, then return the natural logarithms of the CDF. |
The PMF of DTGIW distribution is shown in Theorem 1. based on the research paper in references. For discrete random variables, the CDF of DTGIW distribution can be calculated by summation of the PMF.
the cdf of DTGIW distribution
Atchanut Rattanalertnusorn and Sirinapa Aryuyuen (2021). The zero-truncated discrete transmuted generalized inverse Weibull distribution and its applications, Songklanakarin Journal of Science and Technology (SJST), Volume 43 No.4 (July - August 2021), pp. 1140 - 1151. DOI: 10.14456/sjst-psu.2021.149
x <- c(0:10) pDTGIW(x,3.45,0.7,1.05,0)x <- c(0:10) pDTGIW(x,3.45,0.7,1.05,0)
This function for the plot of DTGIW distribution.
plotDTGIW(x, fx, alpha = 3.45, beta = 0.7, lambda = 1.05, theta = 0)plotDTGIW(x, fx, alpha = 3.45, beta = 0.7, lambda = 1.05, theta = 0)
x |
a vector of quantile |
fx |
probability mass function |
alpha |
shape parameter#1. |
beta |
scale parameter. |
lambda |
shape pameter#2. |
theta |
the transmuted parameter. |
the figure of DTGIW distribution
x <- c(0:10) fx<- dDTGIW(x,3.45,0.7,1.05,0) plotDTGIW(x,fx,alpha=3.45,beta=0.7,lambda=1.05,theta=0) fx2 <- dDTGIW(x,2.50,0.5,1.00,0) plotDTGIW(x,fx2,alpha=2.50,beta=0.5,lambda=1.00,theta=0)x <- c(0:10) fx<- dDTGIW(x,3.45,0.7,1.05,0) plotDTGIW(x,fx,alpha=3.45,beta=0.7,lambda=1.05,theta=0) fx2 <- dDTGIW(x,2.50,0.5,1.00,0) plotDTGIW(x,fx2,alpha=2.50,beta=0.5,lambda=1.00,theta=0)
This function calculated the quantile values of the DTGIW distribution.
qDTGIW(p, alpha, beta, lambda, theta, lower.tail = TRUE, log.p = FALSE)qDTGIW(p, alpha, beta, lambda, theta, lower.tail = TRUE, log.p = FALSE)
p |
vector of probabilities |
alpha |
shape parameter#1. |
beta |
scale parameter. |
lambda |
shape pameter#2. |
theta |
the transmuted parameter. |
lower.tail |
logical; if TRUE (default), probabilities are Prob of X less than or equal to x. Otherwise, Prob of X greater than x. |
log.p |
logical(TRUE or FALSE); if log.p=FALSE, then return the cdf; if log.p=TRUE, then return the natural logarithms of the cdf. |
The R script calculated the quantile values of the DTGIW distribution is shown based on the research paper in references.
the quantile values of DTGIW distribution
Atchanut Rattanalertnusorn and Sirinapa Aryuyuen (2021). The zero-truncated discrete transmuted generalized inverse Weibull distribution and its applications, Songklanakarin Journal of Science and Technology (SJST), Volume 43 No.4 (July - August 2021), pp. 1140 - 1151. DOI: 10.14456/sjst-psu.2021.149.
x <- c(0:10) p<- pDTGIW(x,3.45,0.7,1.05,0) qDTGIW(p,3.45,0.7,1.05,0)x <- c(0:10) p<- pDTGIW(x,3.45,0.7,1.05,0) qDTGIW(p,3.45,0.7,1.05,0)
This function generates random numbers for the DTGIW distribution.
rDTGIW(n, alpha, beta, lambda, theta)rDTGIW(n, alpha, beta, lambda, theta)
n |
number of observations. If length(n) > 1, the length is taken to be the number required. |
alpha |
shape parameter#1. |
beta |
scale parameter. |
lambda |
shape pameter#2. |
theta |
the transmuted parameter. |
The R script generates the n random values of the DTGIW distribution is shown based on the research paper in references.
the n random number of DTGIW distribution.
Atchanut Rattanalertnusorn and Sirinapa Aryuyuen (2021). The zero-truncated discrete transmuted generalized inverse Weibull distribution and its applications, Songklanakarin Journal of Science and Technology (SJST), Volume 43 No.4 (July - August 2021), pp. 1140 - 1151. DOI: 10.14456/sjst-psu.2021.149.
rDTGIW(n=100,3.45,0.7,1.05,0)rDTGIW(n=100,3.45,0.7,1.05,0)