rig {ig}R Documentation

Random number generator from the IGTD

Description

Generate random numbers from the IGTD with mean mu, scale parameter lambda and associated kernel g.

Usage

rig(n, mu = 1, lambda = 1, kernel = "normal", parameter.nu = 1)

Arguments

n Number of observations.
mu Mean.
lambda Scale parameter.
kernel Kernel of the pdf of the associated symmetrical distribution by means of which the IGTD is obtained. The kernels: "Laplace", "logistic", "normal" and "t" are available.
parameter.nu Additional parameter of the IGTD when the t kernel is used.

Details

Statistical inference tools may not exist in closed form for the IGTD, which is not the case for the classical IGD. Hence, simulation and numerical studies are needed, which require a random number (r.n) generator. Next, we present a r.n. generator for the IGTD following a similar procedure to the one given in Chhikara and Folks (1989, pp. 52-53) for the classical inverse Gaussian distribution.

Value

rig() gives a vector of n random numbers from the IGTD for mu, lambda and kernel specified.

Author(s)

Víctor Leiva <victor.leiva@uv.cl>, Hugo Hernández <hugo.hernandez@msn.com>, and Antonio Sanhueza <asanhue@ufro.cl>.

References

Chhikara, R. S. and Folks, J. L. (1989). The Inverse Gaussian Distribution. Marcel Dekker, New York.

Examples

## Generate a sample x from the IGTD. At the end we have the histogram of x
x <- rig(1000,mu=1.0,lambda=1.0,kernel="normal")
hist(x, main="Histogram of a sample from IGTD")

[Package ig version 1.0 Index]