ZARBS: Zero-Adjusted Reparameterized Birnbaum-Saunders (ZARBS)...

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/zabs.R

Description

The fuction ZARBS() defines the ZARBS 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 dZARBS, pZARBS, qZARBS and rZARBS define the density, distribution function, quantile function and random generation for the ZARBS. plotZARBS can be used to plot the distribution. meanZARBS calculates the expected value of the response for a fitted model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
ZARBS(mu.link = "log", sigma.link = "log", nu.link = "logit")

dZARBS(x, mu = 1, sigma = 1, nu = 0.1, log = FALSE)

pZARBS(q, mu = 1, sigma = 1, nu = 0.1, lower.tail = TRUE, log.p = FALSE)

qZARBS(p, mu = 0.5, sigma = 1, nu = 0.1, lower.tail = TRUE, log.p = FALSE)

rZARBS(n, mu = 0.5, sigma = 1, nu = 0.1)

plotZARBS(
  mu = 0.5,
  sigma = 1,
  nu = 0.1,
  from = 0,
  to = 0.999,
  n = 101,
  title = "title",
  ...
)

meanZARBS(obj)

Arguments

mu.link

object for which the extraction of model residuals is meaningful.

sigma.link

type of residual to be used.

nu.link

link function of the parameter nu.

x, q

vector of quantiles.

mu

vector of scale parameter values.

sigma

vector of shape parameter values.

nu

vector of mixture parameter values.

log, log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x]

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.

title

title of the plot.

...

other graphical parameters for plotting.

obj

a fitted ZARBS object.

Details

The parametrization of the zero adjusted reparameterized Birnbaum-Saunders distribution given in the function ZARBS() 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 ZARBS(), mu is the mean and sigma is the precision parameter and nu is the proportion of zeros of the ZARBS distribution.

Author(s)

Manoel Santos-Neto manoel.ferreira@ufcg.edu.br, F.J.A. Cysneiros cysneiros@de.ufpe.br, Victor Leiva victorleivasanchez@gmail.com and Michelli Barros michelli.karinne@gmail.com

References

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

Santos-Neto, M., Cysneiros, F.J.A., Leiva, V., Barros, M. (2016) Reparameterized Birnbaum-Saunders regression models with varying precision. Electronic Journal of Statistics, 10, 2825–2855. doi: 10.1214/16-EJS1187.

Examples

1
2
3
4
5
data(oil)
fit1 = gamlss::gamlss(Demand~1,sigma.formula=~1, nu.formula=~1,
family=ZARBS(mu.link="log",sigma.link = "identity",nu.link = "identity"),
method=CG(),data=oil)
summary(fit1)

santosneto/RBS documentation built on Feb. 5, 2021, 2:12 p.m.