Learn R Programming

VGAM (version 1.1-3)

Gaitzeta: Generally--Altered, --Inflated and --Truncated Zeta Distribution

Description

Density, distribution function, quantile function and random generation for the generally--altered, --inflated and --truncated zeta distribution. Both parametric and nonparametric variants are supported; these are based on finite mixtures of the parent with itself and the multinomial logit model (MLM) respectively. Altogether it can be abbreviated as GAAIIT--Zeta(shape.p)--Zeta(shape.a)--MLM--Zeta(shape.i)--MLM, and it is also known as the GAIT-Zeta PNP combo.

Usage

dgaitzeta(x, shape.p, alter.mix = NULL, alter.mlm = NULL,
          inflate.mix = NULL, inflate.mlm = NULL, truncate = NULL,
          max.support = Inf, pobs.mix.a = 0, pobs.mlm.a = 0,
          pstr.mix.i = 0, pstr.mlm.i = 0, shape.a = shape.p,
          shape.i = shape.p, byrow.arg = FALSE, deflation = FALSE,
          log.arg = FALSE)
pgaitzeta(q, shape.p, alter.mix = NULL, alter.mlm = NULL,
          inflate.mix = NULL, inflate.mlm = NULL, truncate = NULL,
          max.support = Inf, pobs.mix.a = 0, pobs.mlm.a = 0,
          pstr.mix.i = 0, pstr.mlm.i = 0, shape.a = shape.p,
          shape.i = shape.p, byrow.arg = FALSE)
qgaitzeta(p, shape.p, alter.mix = NULL, alter.mlm = NULL,
          inflate.mix = NULL, inflate.mlm = NULL, truncate = NULL,
          max.support = Inf, pobs.mix.a = 0, pobs.mlm.a = 0,
          pstr.mix.i = 0, pstr.mlm.i = 0, shape.a = shape.p,
          shape.i = shape.p, byrow.arg = FALSE)
rgaitzeta(n, shape.p, alter.mix = NULL, alter.mlm = NULL,
          inflate.mix = NULL, inflate.mlm = NULL, truncate = NULL,
          max.support = Inf, pobs.mix.a = 0, pobs.mlm.a = 0,
          pstr.mix.i = 0, pstr.mlm.i = 0, shape.a = shape.p,
          shape.i = shape.p, byrow.arg = FALSE)

Arguments

x, q, p, n, log.arg

Same meaning as in dzeta.

shape.p, shape.a, shape.i

Same meaning as shape for dzeta, i.e., for an ordinary zeta distribution. See Gaitpois for generic information.

truncate, max.support

See Gaitpois for generic information.

alter.mix, inflate.mix

See Gaitpois for generic information.

alter.mlm, inflate.mlm

See Gaitpois for generic information.

pobs.mlm.a, pstr.mlm.i, byrow.arg

See Gaitpois for generic information.

pobs.mix.a, pstr.mix.i

See Gaitpois for generic information.

deflation

See Gaitpois for generic information.

Value

dgaitzeta gives the density, pgaitzeta gives the distribution function, qgaitzeta gives the quantile function, and rgaitzeta generates random deviates. The default values of the arguments correspond to ordinary dzeta, pzeta, qzeta, rzeta respectively.

Details

These functions allow any combination of 3 operator types: truncation, alteration and inflation. See Gaitpois for generic information. These functions do what Oazeta, Oizeta, Otzeta collectively did plus much more.

In the notation of Yee and Ma (2020) these functions allow for the special cases: (i) GAIT--Zeta(shape.p)--Zeta(shape.a, alter.mix, pobs.mix.a)--Zeta(shape.i, inflate.mix, pstr.mix.i); (ii) GAIT--Zeta(shape.p)--MLM(alter.mlm, pobs.mlm.a)--MLM(inflate.mlm, pstr.mlm.i). Model (i) is totally parametric while model (ii) is the most nonparametric possible.

See Also

Gaitpois, multinomial, gaitzeta.mix, Oazeta, Oizeta, Otzeta.

Examples

Run this code
# NOT RUN {
ivec <- c(2, 10); avec <- ivec + 4; shape <- 0.95; xgrid <- 0:29
tvec <- 15; max.support <- 25; pobs.a <- 0.10; pstr.i <- 0.15
(ddd <- dgaitzeta(xgrid, shape, truncate = tvec,
   max.support = max.support, pobs.mix.a = pobs.a,
   alter.mix = avec, pstr.mix.i = pstr.i, inflate.mix = ivec))
# }
# NOT RUN {
plot(xgrid, ddd, type = "n", ylab = "Probability", xlab = "x",
              main = "GAIT PMF---Zeta Parent")
mylwd <- 0.5
abline(v = avec, col = 'green', lwd = mylwd)
abline(v = ivec, col = 'red', lwd = mylwd)
abline(v = tvec, col = 'tan', lwd = mylwd)
abline(v = max.support, col = 'magenta', lwd = mylwd)
abline(h = c(pobs.a, pstr.i, 0:1), col = 'gray', lty = "dashed")
lines(xgrid, dzeta(xgrid, shape), col = 'gray', lty = "dashed")  # f_{\pi}
lines(xgrid, ddd, type = "h", col = "blue", lwd = 3)  # GAIT PMF
points(xgrid[ddd == 0], ddd[ddd == 0], pch = 16)  
# }

Run the code above in your browser using DataLab