BS {bsgof} R Documentation

## The Birnbaum-Saunders distribution

### Description

Density, distribution function, quantile function and random generation for the Birnbaum-Saunders distribution with alpha (shape) and beta (scale)

### Usage

dbs(x, alpha = 1, beta = 1, log = FALSE)
pbs(q, alpha = 1, beta = 1, lower.tail = TRUE, log.p = FALSE)
qbs(p, alpha = 1, beta = 1, lower.tail = TRUE, log.p = FALSE)
rbs(n, alpha = 1, beta = 1)

### Arguments

 x, q vector of quantiles. p vector of probabilities. n number of observations. alpha shape parameter. beta scale parameter. log, log.p logical; if TRUE, probabilities p are given as log(p). lower.tail logical; if TRUE (default), probabilities are P[X \le x] otherwise, P[X > x].

### Details

The Birnbaum-Saunders distribution was proposed by Birnbaum and Saunders (1969) and its probability density function and cumulative distribution function are given by

f(x) = \frac{1}{\sqrt{2\pi}} \exp\left[-\frac{1}{2\alpha^{2}} \left(\frac{x}{\beta}+\frac{\beta}{x}-2\right) \right] \frac{x^{-\frac{3}{2}} (x+\beta)}{2\alpha\sqrt{\beta}}

and

F(x) = \Phi \Big[ \frac{1}{\alpha} \Big( \sqrt{\frac{x}{\beta}}-\sqrt{\frac{\beta}{x}} \Big) \Big],

where x>0, \alpha>0, and \beta>0.

### Value

dbs gives the density, pbs gives the distribution function, qbs gives the quantile function, and rbs generates random deviates.

Chanseok Park

### References

Birnbaum, Z. W. and Saunders, S. C. (1969). A new family of life distributions. J. Appl. Probab. 6(2): 637-652.

### Examples

dbs(1.5,  alpha=0.5, beta=1.5)
exp( dbs(1.5, alpha=0.5, beta=1.5, log=TRUE) )

pbs(2.5,  alpha=0.5, beta=1.5)
1 - pbs(2.5, alpha=0.5,beta=1.5, lower.tail = FALSE, log.p = FALSE)
1 - exp( pbs(2.5, alpha=0.5,beta=1.5, lower.tail = FALSE, log.p = TRUE) )

qbs(0.1, alpha=0.5, beta=1.5)
qbs(0.9, alpha=0.5, beta=1.5, lower.tail = FALSE, log.p = FALSE)
qbs(log(0.1), alpha=0.5, beta=1.5, lower.tail = TRUE,  log.p = TRUE)
qbs(log(0.9), alpha=0.5, beta=1.5, lower.tail = FALSE, log.p = TRUE)

rbs(n=10, alpha=0.5, beta=1.5)

[Package bsgof version 0.23.8 Index]