POISXL function

The Discrete Poisson XLindley

The Discrete Poisson XLindley

The function POISXL() defines the Discrete Poisson XLindley distribution, one-parameter discrete distribution, for a gamlss.family object to be used in GAMLSS fitting using the function gamlss().

POISXL(mu.link = "log")

Arguments

  • mu.link: defines the mu.link, with "log" link as the default for the mu parameter.

Returns

Returns a gamlss.family object which can be used to fit a Discrete Poisson XLindley distribution in the gamlss() function.

Details

The Discrete Poisson XLindley distribution with parameters μ\mu has a support 0, 1, 2, ... and mass function given by

f(xμ)=μ2(x+μ2+3(1+μ))(1+μ)4+xf(x | \mu) = \frac{\mu^2(x+\mu^2+3(1+\mu))}{(1+\mu)^{4+x}}; with μ>0\mu>0.

Note: in this implementation we changed the original parameters α\alpha for μ\mu, we did it to implement this distribution within gamlss framework.

Examples

# Example 1 # Generating some random values with # known mu y <- rPOISXL(n=1000, mu=1) # Fitting the model library(gamlss) mod1 <- gamlss(y~1, family=POISXL, control=gamlss.control(n.cyc=500, trace=FALSE)) # Extracting the fitted values for mu # using the inverse link function exp(coef(mod1, what='mu')) # Example 2 # Generating random values under some model # A function to simulate a data set with Y ~ POISXL gendat <- function(n) { x1 <- runif(n, min=0.4, max=0.6) mu <- exp(1.21 - 3 * x1) # 0.75 approximately y <- rPOISXL(n=n, mu=mu) data.frame(y=y, x1=x1) } dat <- gendat(n=1500) # Fitting the model mod2 <- NULL mod2 <- gamlss(y~x1, family=POISXL, data=dat, control=gamlss.control(n.cyc=500, trace=FALSE)) summary(mod2)

References

\insertRef ahsan2022DiscreteDists

See Also

dPOISXL .

Author(s)

Mariana Blandon Mejia, mblandonm@unal.edu.co

  • Maintainer: Freddy Hernandez-Barajas
  • License: MIT + file LICENSE
  • Last published: 2024-09-13

Downloads (last 30 days):