rbs3 {bs}R Documentation

Random number generator from BSD (G3)

Description

Generate random numbers from the BSD with shape parameter alpha and scale parameter beta. rbs3() is based on the relationship between the inverse Gaussian distribution (IGD) and the BSD; see Johnson et al. (1994).

Usage

rbs3(n, alpha = 1, beta = 1)

Arguments

n Number of observations.
alpha Shape parameter.
beta Scale parameter.

Value

rbs3() gives a vector of n random numbers from the BSD with specific values alpha and beta.

Author(s)

Víctor Leiva <victor.leiva@uv.cl>, Hugo Hernández <hugo.hernande@msn.com>, and Marco Riquelme <mriquelm@ucm.cl>.

References

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1994). Continuous Univariate Distributions: Volume 2. Wiley, New York.

Leiva, V., Sanhueza, A., Sen, P. K., and Paula, G. A. (2006). Random number generators for the generalized Birnbaum-Saunders distribution. Submitted to Publication.

Examples

## Examples for simulations
rbs1(n=6,alpha=0.5,beta=1.0)
rbs2(n=6,alpha=0.5,beta=1.0)
rbs3(n=6,alpha=0.5,beta=1.0)

rbs(n=6,alpha=0.5,beta=1.0)

sample<-rbs(n=100,alpha=0.5,beta=1.0)
## Higtogram for sample
hist(sample)

[Package bs version 1.0 Index]