UnivRNG-package: Univariate Pseudo-Random Number Generation

Description Details Author(s) References

Description

This package implements the algorithms described in Demirtas (2005) for pseudo-random number generation of 17 univariate distributions. The following distributions are available: Left Truncated Gamma, Laplace, Inverse Gaussian, Von Mises, Zeta (Zipf), Logarithmic, Beta-Binomial, Rayleigh, Pareto, Non-central t, Non-central Chi-squared, Doubly non-central F, Standard t, Weibull, Gamma with alpha<1, Gamma with alpha>1, and Beta with alpha<1 and beta<1. For some distributions, functions that have similar capabilities exist in the base package; the functions herein should be regarded as complementary tools.

The methodology for each random-number generation procedure varies and each distribution has its own function. draw.left.truncated.gamma, draw.von.mises, draw.inverse.gaussian, draw.zeta, draw.gamma.alpha.less.than.one, and draw.beta.alphabeta.less.than.one are based on acceptance/rejection region techniques. draw.rayleigh, draw.pareto, and draw.weibull utilize the inverse CDF method. The chop-down method is used for draw.logarithmic. In draw.laplace, a sample from an exponential distribution with mean lambda is generated and subsequently the sign is changed with probability 0.5 and all variables are shifted by alpha. For the Beta-Binomial distribution in draw.beta.binomial, pi is generated as the appropriate beta and used as the success probability for the binomial portion. draw.noncentral.t utilizes on arithmetic functions of normal and chi-squared random variables. draw.noncentral.chisquared is based on the sum of squared random normal variables, and draw.noncentral.F is a ratio of chi-squared random variables generated via draw.noncentral.chisquared. draw.t employs a rejection polar method developed by Bailey (1994). draw.gamma.alpha.greater.than.one uses a ratio of uniforms method by Cheng and Feast (1979).

Details

Package: UnivRNG
Type: Package
Version: 1.2.3
Date: 2021-03-05
License: GPL-2 | GPL-3

Author(s)

Hakan Demirtas, Rawan Allozi, Ran Gao

Maintainer: Ran Gao <rgao8@uic.edu>

References

Bailey, R. W. (1994). Polar generation of random variates with the t-distribution. Mathematics of Computation, 62, 779-781.

Cheng, R. C. H., & Feast, G. M. (1979). Some simple gamma variate generation. Applied Statistics, 28, 290-295.

Demirtas, H. (2005). Pseudo-random number generation in R for some univariate distributions. Journal of Modern Applied Statistical Methods, 4(1), 300-311.


UnivRNG documentation built on March 6, 2021, 1:08 a.m.