Generally–Altered, –Inflated and –Truncated Binomial Distribution
Density, distribution function, quantile function and random generation for the generally–altered, –inflated and –truncated binomial 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–Binom(size.p, prob.p)–Binom(size.a, prob.a)–MLM–Binom(size.i, prob.i)–MLM, and it is also known as the GAIT-Binom PNP combo where PNP stands for parametric and nonparametric.
dgaitbinom(x, size.p, prob.p, alt.mix = NULL, alt.mlm = NULL, inf.mix = NULL, inf.mlm = NULL, truncate = NULL, max.support = NULL, pobs.mix = 0, pobs.mlm = 0, pstr.mix = 0, pstr.mlm = 0, byrow.ai = FALSE, size.a = size.p, size.i = size.p, prob.a = prob.p, prob.i = prob.p, deflation = FALSE, log = FALSE) pgaitbinom(q, size.p, prob.p, alt.mix = NULL, alt.mlm = NULL, inf.mix = NULL, inf.mlm = NULL, truncate = NULL, max.support = NULL, pobs.mix = 0, pobs.mlm = 0, pstr.mix = 0, pstr.mlm = 0, byrow.ai = FALSE, size.a = size.p, size.i = size.p, prob.a = prob.p, prob.i = prob.p, lower.tail = TRUE) qgaitbinom(p, size.p, prob.p, alt.mix = NULL, alt.mlm = NULL, inf.mix = NULL, inf.mlm = NULL, truncate = NULL, max.support = NULL, pobs.mix = 0, pobs.mlm = 0, pstr.mix = 0, pstr.mlm = 0, byrow.ai = FALSE, size.a = size.p, size.i = size.p, prob.a = prob.p, prob.i = prob.p) rgaitbinom(n, size.p, prob.p, alt.mix = NULL, alt.mlm = NULL, inf.mix = NULL, inf.mlm = NULL, truncate = NULL, max.support = NULL, pobs.mix = 0, pobs.mlm = 0, pstr.mix = 0, pstr.mlm = 0, byrow.ai = FALSE, size.a = size.p, size.i = size.p, prob.a = prob.p, prob.i = prob.p)
x, q, p, n, log, lower.tail |
Same meaning as in |
size.p, prob.p |
Same meaning as in |
size.a, prob.a |
See |
size.i, prob.i |
See |
truncate, max.support |
See |
alt.mix, inf.mix |
See |
alt.mlm, inf.mlm |
See |
pobs.mlm, pstr.mlm, byrow.ai |
See |
pobs.mix, pstr.mix |
See |
deflation |
See |
These functions for the GAIT binomial distribution
are analogous to the GAIT Poisson,
hence most details have been put in
Gaitpois
.
Functions Posbinom
have been moved
to VGAMdata.
It is better to use
dgaitbinom(x, size, prob, truncate = 0)
instead of
dposbinom(x, size, prob)
, etc.
T. W. Yee.
size <- 20 ivec <- c(6, 10); avec <- c(8, 11); prob <- 0.5; xgrid <- 0:25 tvec <- 14; pobs.a <- 0.05; pstr.i <- 0.15 (ddd <- dgaitbinom(xgrid, size, prob.p = prob, prob.a = prob + 5, truncate = tvec, pobs.mix = pobs.a, pobs.mlm = pobs.a, alt.mlm = avec, pstr.mix = pstr.i, inf.mix = ivec)) ## Not run: plot(xgrid, ddd, type = "n", ylab = "Probability", xlab = "x", main = "GAIT PNP Combo PMF---Binomial Parent") mylwd <- 1 abline(v = avec, col = 'blue', lwd = mylwd) abline(v = ivec, col = 'purple', lwd = mylwd) abline(v = tvec, col = 'tan', lwd = mylwd) abline(h = c(pobs.a, pstr.i, 0:1), col = 'gray', lty = "dashed") lines(xgrid, dbinom(xgrid, size, prob), col = 'gray', lty = 2) lines(xgrid, ddd, type = "h", col = "pink", lwd = 7) # GAIT PNP combo PMF points(xgrid[ddd == 0], ddd[ddd == 0], pch = 16) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.