Learn R Programming

gp (version 1.1)

rgp: Random values simulation from the generalized Poisson distribution

Description

Random values simulation from the generalized Poisson distribution.

Usage

rgp(n, theta, lambda, method)

Value

A vector with values from the generalized Poisson distribution.

Arguments

n

The number of random values to generate.

theta

The value of the \(\theta\) parameter.

lambda

The value of the \(\lambda\) parameter.

method

The simulation method to use. The available options are: "Inversion", "Branching", "Normal-Approximation", "Build-Up" and "Chop-Down".

Author

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

Details

The values \(\theta\) and \(\lambda\) affect the method of simulation to use. See Li et al. (2020) for more information.

References

Li H., Demirtas H. & Chen R. (2020). RNGforGPD: An R Package for Generation of Univariate and Multivariate Generalized Poisson Data. R JOURNAL, 12(2): 173--188.

Demirtas H. (2017). On accurate and precise generation of generalized Poisson variates. Communications in Statistics - Simulation and Computation, 46(1): 489--499.

See Also

gp.mle

Examples

Run this code
y <-  rgp(1000, 10, 0.5, method = "Inversion")
gp.mle(y)

Run the code above in your browser using DataLab