draw.gamma.alpha.less.than.one {UnivRNG}R Documentation

Generates variation from Gamma distribution with \alpha<1

Description

This function implements pseudo-random number generation for a gamma distribution for \alpha<1 with pdf

f(x|\alpha,\beta)=\frac{1}{\Gamma(\alpha)\beta^{\alpha}}x^{\alpha-1}e^{-x/\beta}

for 0 \leq x < \infty and \min(\alpha,\beta)>0 where \alpha and \beta are the shape and scale parameters, respectively.

Usage

draw.gamma.alpha.less.than.one(nrep,alpha,beta)

Arguments

nrep

Number of data points to generate.

alpha

Shape parameter for desired gamma distribution. Must be less than 1.

beta

Scale parameter for desired gamma distribution.

Value

A list of length five containing generated data, the theoretical mean, the empirical mean, the theoretical variance, and the empirical variance with names y, theo.mean, emp.mean, theo.var, and emp.var, respectively.

References

Ahrens, J. H., & Dieter, U. (1974). Computer methods for sampling from gamma, beta, poisson and binomial distributions. Computing, 1, 223-246.

Examples

draw.gamma.alpha.less.than.one(nrep=100000,alpha=0.5,beta=2)

[Package UnivRNG version 1.2.3 Index]