| Title: | Two Parameter Xgamma & Poisson Xgamma: Regression & Distribution Functions |
|---|---|
| Description: | The two-parameter Xgamma and Poisson Xgamma distributions are analyzed, covering standard distribution and regression functions, maximum likelihood estimation, quantile functions, probability density and mass functions, cumulative distribution functions, and random number generation. References include: "Sen, S., Chandra, N. and Maiti, S. S. (2018). On properties and applications of a two-parameter XGamma distribution. Journal of Statistical Theory and Applications, 17(4): 674--685. <doi:10.2991/jsta.2018.17.4.9>." "Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics. <doi:10.1007/s41060-023-00453-1>." |
| Authors: | Nikolaos Kontemeniotis [aut, cre], Michail Tsagris [aut] |
| Maintainer: | Nikolaos Kontemeniotis <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.0 |
| Built: | 2026-06-01 11:05:10 UTC |
| Source: | https://github.com/cran/TPXG |
Computes the cumulative density function of the Two-Parameter Xgamma distribution for given values.
ptpxg(x, alpha = 1, theta = 1)ptpxg(x, alpha = 1, theta = 1)
x |
A numeric vector with strictly positive values. |
alpha |
A positive real number. |
theta |
A positive real number. |
Let . Then the cumulative distribution function of X is given by:
A numeric vector containing the cumulative density function values of the TPXG distribution for each of the given values of x.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Sen, S., Chandra, N. and Maiti, S. S. (2018). On properties and applications of a two-parameter XGamma distribution. Journal of Statistical Theory and Applications, 17(4): 674–685."
x <- ptpxg(100) ptpxg(x, 1, 1)x <- ptpxg(100) ptpxg(x, 1, 1)
Computes the cumulative mass function of the Two Parameter Poisson Xgamma distribution for given values.
ptppxg(x , alpha = 1, theta = 1)ptppxg(x , alpha = 1, theta = 1)
x |
A numeric vector containg non-negative integer values. |
alpha |
A positive real number. |
theta |
A positive real number. |
The cumulative distribution function of the Two Parameter Poisson Xgamma is given by:
A numeric vector containing the cumulative mass function of the TPPXG distribution for each of the given values of x.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics."
x <- rtppxg(100) ptppxg(x, 1, 1)x <- rtppxg(100) ptppxg(x, 1, 1)
Computes the inverse cumulative density function of the Two-Parameter Xgamma distribution for given probabilities.
qtpxg(p, alpha = 1, theta = 1 , tol = 1e-5)qtpxg(p, alpha = 1, theta = 1 , tol = 1e-5)
p |
A numeric vector containing values in [0,1]. |
alpha |
A positive real number. |
theta |
A positive real number |
tol |
A positive real number specifying the tolerance level for the convergence of the Newton-Raphson algorithm. |
This function uses the Newton-Raphson algorithm in order to estimate the inverse cumulative density function.
A numeric vector containing the inverse cumulative density function values of the TPXG distribution for each of the given values of x.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Sen, S., Chandra, N. and Maiti, S. S. (2018). On properties and applications of a two-parameter XGamma distribution. Journal of Statistical Theory and Applications, 17(4): 674–685."
p <- runif(100) qtpxg(p, 1, 1)p <- runif(100) qtpxg(p, 1, 1)
Computes the inverse cumulative mass function (quantile function) of the Two Parameter Poisson Xgamma distribution for given probability values.
qtppxg(p, alpha = 1, theta = 1, tol = 1e-5)qtppxg(p, alpha = 1, theta = 1, tol = 1e-5)
p |
A numeric vector containg values in [0,1]. |
alpha |
A positive real number. |
theta |
A positive real number. |
tol |
A positive real number specifying the tolerance level for the convergence of the Newton-Raphson algorithm. |
This function uses the Newton-Raphson algorithm in order to estimate the inverse cumulative mass function.
A numeric vector containing the inverse cumulative mass function of the TPPXG distribution at the given values of p.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics."
p <- runif(100) qtppxg(p, 1, 1)p <- runif(100) qtppxg(p, 1, 1)
Estimation of and parameters of Two Parameter Poisson Xgamma distribution using maximum likelihood.
tppxg.mle(x)tppxg.mle(x)
x |
A numeric vector containg non-negative integer values. |
The log-likelihood function of the TPPXG distribution is given by:
A named numeric vector containing the estimated values for , and maximum likelihood.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics."
x <- rtppxg(1000) tppxg.mle(x)x <- rtppxg(1000) tppxg.mle(x)
This function estimates the Two Parameter Poisson Xgamma regression coefficients as well as the
parameter of the Two Parameter Poisson Xgamma distribution using the maximum likelihood method.
tppxg.reg(y, x)tppxg.reg(y, x)
y |
A numeric vector containg non-negative integer values. |
x |
A matrix or a data.frame with the predictor variables. |
The parameter has been transformed as a function of the expected value of the response variable Y
in the following manner:
Given that the response variable satisfies , then the
mean of Y is related to the predictor variables using the log link function:
For more details, see the paper referenced below.
A named list containing parameter, a vector containing the coefficients and the maximum likelihood value.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics."
x <- matrix( rnorm(100 * 2), ncol = 2 ) y <- rtppxg(100) tppxg.reg(y, x)x <- matrix( rnorm(100 * 2), ncol = 2 ) y <- rtppxg(100) tppxg.reg(y, x)
Estimation of and parameters of Two Parameter Xgamma distribution using maximum likelihood.
tpxg.mle(x)tpxg.mle(x)
x |
A numeric vector containg strictly positive values. |
The log-likelihood functiono of the TPXG distribution is given by:
A named numeric vector containing the estimated values for , and maximum likelihood.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Sen, S., Chandra, N. and Maiti, S. S. (2018). On properties and applications of a two-parameter XGamma distribution. Journal of Statistical Theory and Applications, 17(4): 674–685."
x <- rtpxg(1000) tpxg.mle(x)x <- rtpxg(1000) tpxg.mle(x)
This function estimates the Two Parameter Xgamma regression coefficients as well as the
parameter of the Two Parameter Xgamma distribution using the maximum likelihood method.
tpxg.reg(y,x)tpxg.reg(y,x)
y |
A numeric vector containg strictly positive values. |
x |
A matrix or a data.frame with the predictor variables. |
This implementation employs a logarithmic link function to relate the parameter of the
Two-Parameter Xgamma distribution to the predictor variables.
Specifically, the relationship is defined as:
where X is a matrix whose columns represent the predictor variables, and
is a column vector of corresponding regression coefficients.
A named list containing parameter, a vector containing the coefficients and the maximum likelihood value.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Sen, S., Chandra, N. and Maiti, S. S. (2018). On properties and applications of a two-parameter XGamma distribution. Journal of Statistical Theory and Applications, 17(4): 674–685."
x <- matrix( rnorm(100 * 2), ncol = 2 ) y <- rtpxg(100) tpxg.reg(y, x)x <- matrix( rnorm(100 * 2), ncol = 2 ) y <- rtpxg(100) tpxg.reg(y, x)
Computes the probability density function of the Two Parameter Xgamma distribution for a given set positive real values.
dtpxg(x, alpha = 1, theta = 1)dtpxg(x, alpha = 1, theta = 1)
x |
A numeric vector containing strictly positive values. |
alpha |
A positive real number. |
theta |
A positive real number. |
Let .Then the probability density function of U is given by:
A numeric vector containing the probability density function value of the TPXG distribution for each of the given values of x.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Sen, S., Chandra, N. and Maiti, S. S. (2018). On properties and applications of a two-parameter XGamma distribution. Journal of Statistical Theory and Applications, 17(4): 674–685."
x <- rtpxg(100) dtpxg(x, 1, 1)x <- rtpxg(100) dtpxg(x, 1, 1)
Computes the probability mass function of the Two Parameter Poisson Xgamma distribution for a given set of non-negative integer values.
dtppxg(x, alpha = 1, theta = 1)dtppxg(x, alpha = 1, theta = 1)
x |
A numeric vector containing non-negative integer values. |
alpha |
A positive real number. |
theta |
A positive real number. |
Assume a random variable X follows the two-parameter Poisson-Xgamma distribution, which has the following stochastic representation:
Then the probability mass function of X is given by:
A numeric vector containing the probability mass function value of the TPPXG distribution for each of the given values of x.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics."
x <- rtppxg(100) dtppxg(x, 1, 1)x <- rtppxg(100) dtppxg(x, 1, 1)
Generates random numbers form the Two Parameter Xgamma distribution.
rtpxg(n, alpha = 1, theta = 1)rtpxg(n, alpha = 1, theta = 1)
n |
An integer indicating the desired sample size. |
alpha |
A positive real number. |
theta |
A positive real number. |
The TPXG distribution is a mixture of and with mixing proportions
and respectively.
A numeric vector of size n containing random values from the TPXG distribution.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Sen, S., Chandra, N. and Maiti, S. S. (2018). On properties and applications of a two-parameter XGamma distribution. Journal of Statistical Theory and Applications, 17(4): 674–685."
x <- rtpxg(100)x <- rtpxg(100)
Generates random numbers form the Two Parameter Poisson Xgamma distribution.
rtppxg(n, alpha = 1, theta = 1)rtppxg(n, alpha = 1, theta = 1)
n |
An integer indicating the desired sample size. |
alpha |
A positive real number. |
theta |
A positive real number. |
In order to obtain random numbers from the TPPXG distribution this function works in two parts. First it
generates n random values where . Given
this, it generates n numbers X where .
A numeric vector of size n containing random values from the TPPXG distribution.
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics."
x <- rtppxg(100)x <- rtppxg(100)
The two-parameter Xgamma and Poisson Xgamma distributions are analyzed, covering standard distribution and regression functions, maximum likelihood estimation, quantile functions, probability density and mass functions, cumulative distribution functions, and random number generation.
| Package: | tpxg | |
| Type: | Package | |
| Version: | 1.0 | |
| Date: | 2025-03-12 | |
| License: | GPL-2 |
Nikolaos Kontemeniotis [email protected].
Nikolaos Kontemeniotis [email protected] and Michail Tsagris [email protected].
"Wani, M. A., Ahmad, P. B., Para, B. A. and Elah, N. (2023). A new regression model for count data with applications to health care data. International Journal of Data Science and Analytics."
"Sen, S., Chandra, N. and Maiti, S. S. (2018). On properties and applications of a two-parameter XGamma distribution. Journal of Statistical Theory and Applications, 17(4): 674–685."