# pZABS: Zero Adjusted Birnbaum-Saunders (ZABS) distribution for... In santosneto/rbsmodels: Reparameterized Birnbaum-Saunders regression model

## Description

The fuction ZABS() defines the ZABS distribution, a two paramenter distribution, for a gamlss.family object to be used in GAMLSS fitting using using the function gamlss(). The zero adjusted Birnbaum-Saunders distribution is similar to the Birnbaum-Saunders distribution but allows zeros as y values. The extra parameter models the probabilities at zero. The functions dZABS, pZABS, qZABS and rZABS define the density, distribution function, quantile function and random generation for the ZABS parameterization of the zero adjusted Birnbaum-Saunders distribution. plotZABS can be used to plot the distribution. meanZABS calculates the expected value of the response for a fitted model.

## Usage

 1 2 3 4 5 6 7 ZABS(mu.link = "identity", sigma.link = "identity") dZABS(x, mu = 1, sigma = 1, nu=0.1, log = FALSE) pZABS(q, mu = 1, sigma = 1, nu=0.1, lower.tail = TRUE, log.p = FALSE) qZABS(p, mu = 1, sigma = 1, nu=0.1, lower.tail = TRUE, log.p = FALSE) rZABS(n, mu = 1, sigma = 1) plotZABS(mu = .5, sigma = 1, nu=0.1, from = 0, to = 0.999, n = 101, ...) meanRBS(obj) 

## Arguments

 mu vector of scale parameter values sigma vector of shape parameter values lower.tail logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x] mu.link object for which the extraction of model residuals is meaningful. sigma.link type of residual to be used. x, q vector of quantiles log,  log.p logical; if TRUE, probabilities p are given as log(p). p vector of probabilities. n number of observations. If length(n) > 1, the length is taken to be the number required. from where to start plotting the distribution from to up to where to plot the distribution obj a fitted RBS object ... other graphical parameters for plotting

## Details

The parametrization of the normal distribution given in the function ZABS() is

f_{Y}(y;μ,δ,p) =\frac{[1-p]√{δ+1}}{4\,y^{3/2}\,√{πμ}}≤ft[y+\frac{δμ}{δ+1} \right]\exp≤ft(-\frac{δ}{4}≤ft[\frac{y[δ+1]}{δμ}+\frac{δμ}{y[δ+1]}-2\right]\right) I_{(0, ∞)}(y)+ pI_{\{0\}}(y).

## Value

returns a gamlss.family object which can be used to fit a normal distribution in the gamlss() function.

## Note

For the function ZABS(), mu is the mean and sigma is the precision parameter of the Birnbaum-Saunders distribution.

## Author(s)

Manoel Santos-Neto [email protected], F.J.A. Cysneiros [email protected], Victor Leiva [email protected] and Michelli Barros [email protected]

## References

Leiva, V., Santos-Neto, M., Cysneiros, F.J.A., Barros, M. (2015) A methodology for stochastic inventory models based on a zero-adjusted Birnbaum-Saunders distribution. Applied Stochastic Models in Business and Industry. 10.1002/asmb.2124.

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 plotZABS() dat <- rZABS(1000); hist(dat) fit <- gamlss(dat~1,family=ZABS(),method=CG()) meanZABS(fit) data(papatoes); fit = gamlss(I(Demand/10000)~1,sigma.formula=~1, nu.formula=~1, family=ZABS(mu.link="identity",sigma.link = "identity",nu.link = "identity"),method=CG(),data=papatoes) summary(fit) data(oil) fit1 = gamlss(Demand~1,sigma.formula=~1, nu.formula=~1, family=ZABS(mu.link="identity",sigma.link = "identity",nu.link = "identity"),method=CG(),data=oil) summary(fit1) 

santosneto/rbsmodels documentation built on May 26, 2017, 12:32 a.m.