Learn R Programming

bibs (version 1.1.1)

rbs: Simulating from Birnbaum-Saunders (BS) distribution.

Description

Simulating from BS distribution whose density function is given by $$ f_{{BS}}(t|\alpha,\beta)=\frac{0.5t +0.5 \beta}{\sqrt{2\pi}\alpha \sqrt{\beta}t^{\frac{3}{2}}} \exp\left\{-\frac{(t-\beta)^2}{2\alpha^2\beta t}\right\}, $$ where \(t\)>0. The parameters of GBS distribution are \(\alpha\)>0 and \(\beta\)>0.

Usage

rbs(n, alpha, beta)

Arguments

n

Size of required realizations.

alpha

Parameter \(alpha\).

beta

Parameter \(beta\).

Value

A vector of \(n\) realizations from distribution.

Examples

Run this code
# NOT RUN {
rbs(n = 100, alpha = 1, beta = 2)
# }

Run the code above in your browser using DataLab