gamlssZadj: Fitting positive real line response variable with zeros.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Function gamlssZadj() allows to fit zero adjusted gamlss models when the response variable distribution is defined on the positive real line. The gamlssZadj model for adjusted positive variables is a gamlss model provides one extra parameters for the mass point at zero. This is equivalent to fit two separate models, a gamlss model for the (0,Inf) part, and a logit model for zero part versus the non-zero part. The function works similarly but provides one fitted object.

Usage

1
2
3
4
5
gamlssZadj(y = NULL, mu.formula = ~1, sigma.formula = ~1, 
         nu.formula = ~1, tau.formula = ~1, 
         xi0.formula = ~1, data = NULL, 
         family = GA, 
         weights = rep(1, length(Y_)), trace = FALSE, ...)

Arguments

y

the response variable

mu.formula

a model formula for mu

sigma.formula

a model formula for sigma

nu.formula

a model formula for nu

tau.formula

a model formula for tau

xi0.formula

a model formula for xi0

data

a data frame containing the variables occurring in the formula.

family

any gamlss distribution family defined on the rael line

weights

a vector of weights as in gamlss

trace

logical, if TRUE information on model estimation will be printed during the fitting

...

for extra arguments to pass to gamlss

Details

The default family is a gamma distribution (GA), but other distributions on the positive rael line can be used, e.g. those generated from existing continuous gamlss.family distributions using say gen.Family() with "log" or gen.trun() from package gamlss.tr

Value

. Returns a gamlssZadj object which has its own methods

Author(s)

Mikis Stasinopoulos, Robert Rigby and Marco Enea

References

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/).

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, http://www.jstatsoft.org/v23/i07.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC. https://www.crcpress.com/Flexible-Regression-and-Smoothing-Using-GAMLSS-in-R/Stasinopoulos-Rigby-Heller-Voudouris-Bastiani/p/book/9781138197909.

See Also

gamlss.family, ZAGA, ZAIG

Examples

1
2
3
4
  y0 <- rZAGA(1000, mu=.3, sigma=.4, nu=.15)# p0=0.13
  g0 <- gamlss(y0~1, family=ZAGA)
 t0 <- gamlssZadj(y=y0, mu.formula=~1, family=GA, trace=TRUE)
AIC(g0,t0, k=0)

gamlss.inf documentation built on May 2, 2019, 6:46 a.m.