Description Usage Arguments Details Value Note Author(s) References Examples
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.
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)
|
p |
vector of probabilities. |
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). |
n |
number of observations. If |
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 |
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).
returns a gamlss.family
object which can be used to fit a normal distribution in the gamlss()
function.
For the function ZABS(), mu is the mean and sigma is the precision parameter of the Birnbaum-Saunders distribution.
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
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.