Package 'dtgiw'

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 12:31:16 UTC
Source: https://github.com/cran/dtgiw

Help Index


The probability mass function (PMF) for Discrete Transmuted Generalized Inverse Weibull (DTGIW) distribution.

Description

This function calculated the PMF of the DTGIW distribution.

Usage

dDTGIW(x, alpha, beta, lambda, theta, log = FALSE)

Arguments

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.

Details

The PMF of the DTGIW distribution is shown in Theorem 1 based on the research paper in references.

Value

the PMF of DTGIW distribution

References

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

Examples

x <- c(0:10)
dDTGIW(x,3.45,0.7,1.05,0)

Negative Log-Likelihood value of DTGIW distribution.

Description

The function for calculating negative log-likelihood value of DTGIW distribution.

Usage

loglikeDTGIW(x, alpha, beta, lambda, theta)

Arguments

x

a vector of quantile

alpha

shape parameter#1

beta

scale parameter

lambda

shape pameter#2

theta

the transmuted parameter

Value

the negative log-likelihood value of DTGIW distribution

References

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>.

Examples

x <- rDTGIW(n=20,3.45,0.7,1.05,0)
loglikeDTGIW(x,3.45,0.7,1.05,0)

Maximum likelihood estimation of the DTGIW distribution

Description

The function is used to estimate parameters based on the maximum likelihood method

Usage

mleDTGIW(x, par)

Arguments

x

a data vector

par

a parameter vector of the DTGIW distribution; i.e. c(2.5, 1.5, 1.5, -0.5) means alpha=2.5, beta=1.5, lambda=1.5, theta=-0.5

Value

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.

References

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>.

Examples

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)

The cumulative distribution function (CDF) for Discrete Transmuted Generalized Inverse Weibull (DTGIW) distribution.

Description

This function calculated the CDF of the DTGIW distribution.

Usage

pDTGIW(q, alpha, beta, lambda, theta, lower.tail = TRUE, log.p = FALSE)

Arguments

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.

Details

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.

Value

the cdf of DTGIW distribution

References

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

Examples

x <- c(0:10)
pDTGIW(x,3.45,0.7,1.05,0)

Plot Discrete Transmuted Generalized Inverse Weibull(DTGIW) distribution.

Description

This function for the plot of DTGIW distribution.

Usage

plotDTGIW(x, fx, alpha = 3.45, beta = 0.7, lambda = 1.05, theta = 0)

Arguments

x

a vector of quantile

fx

probability mass function

alpha

shape parameter#1.

beta

scale parameter.

lambda

shape pameter#2.

theta

the transmuted parameter.

Value

the figure of DTGIW distribution

Examples

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)

The quantile function for Discrete Transmuted Generalized Inverse Weibull (DTGIW) distribution.

Description

This function calculated the quantile values of the DTGIW distribution.

Usage

qDTGIW(p, alpha, beta, lambda, theta, lower.tail = TRUE, log.p = FALSE)

Arguments

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.

Details

The R script calculated the quantile values of the DTGIW distribution is shown based on the research paper in references.

Value

the quantile values of DTGIW distribution

References

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.

Examples

x <- c(0:10)
p<- pDTGIW(x,3.45,0.7,1.05,0)
qDTGIW(p,3.45,0.7,1.05,0)

The random generating function for Discrete Transmuted Generalized Inverse Weibull(DTGIW) distribution.

Description

This function generates random numbers for the DTGIW distribution.

Usage

rDTGIW(n, alpha, beta, lambda, theta)

Arguments

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.

Details

The R script generates the n random values of the DTGIW distribution is shown based on the research paper in references.

Value

the n random number of DTGIW distribution.

References

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.

Examples

rDTGIW(n=100,3.45,0.7,1.05,0)