| Gaitzeta {VGAM} | R Documentation |
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.
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)
x, q, p, n, log.arg |
Same meaning as in |
shape.p, shape.a, shape.i |
Same meaning as |
truncate, max.support |
See |
alter.mix, inflate.mix |
See |
alter.mlm, inflate.mlm |
See |
pobs.mlm.a, pstr.mlm.i, byrow.arg |
See |
pobs.mix.a, pstr.mix.i |
See |
deflation |
See |
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.
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.
See Gaitpois for general information also relevant
to this parent distribution.
T. W. Yee.
Gaitpois,
multinomial,
gaitzeta.mix,
Oazeta,
Oizeta,
Otzeta.
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)
## End(Not run)