Random Numbers from the TPPGX Distribution {TPXG} | R Documentation |
Random Numbers from the TPPGX Distribution
Description
Generates random numbers form the Two Parameter Poisson Xgamma distribution.
Usage
rtppxg(n, alpha = 1, theta = 1)
Arguments
n |
An integer indicating the desired sample size. |
alpha |
A positive real number. |
theta |
A positive real number. |
Details
In order to obtain random numbers from the TPPXG distribution this function works in two parts. First it
generates n random \lambda
values where \lambda|\alpha,\theta \sim \text{TPXG}(\alpha,\theta)
. Given
this, it generates n numbers X where X|\lambda \sim \text{Poisson}(\lambda)
.
Value
A numeric vector of size n containing random values from the TPPXG distribution.
Author(s)
Nikolaos Kontemeniotis.
R implementation and documentation: Nikolaos Kontemeniotis kontemeniotisn@gmail.com and Michail Tsagris mtsagris@uoc.gr.
References
"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."
See Also
Examples
x <- rtppxg(100)