| Gaitnbinom.mlm {VGAM} | R Documentation |
Density, distribution function, quantile function and random generation for the generally–altered, –inflated and –truncated negative binomial distribution, based on the multinomial logit model (MLM). This distribution is sometimes abbreviated as GAIT–NB–MLM–MLM.
dgaitnbinom.mlm(x, size, prob = NULL, munb = NULL, alter = NULL,
inflate = NULL, truncate = NULL, max.support = Inf,
pobs.a = 0, pstr.i = 0, byrow.arg = FALSE,
log.arg = FALSE)
pgaitnbinom.mlm(q, size, prob = NULL, munb = NULL, alter = NULL,
inflate = NULL, truncate = NULL, max.support = Inf,
pobs.a = 0, pstr.i = 0, byrow.arg = FALSE)
qgaitnbinom.mlm(p, size, prob = NULL, munb = NULL, alter = NULL,
inflate = NULL, truncate = NULL, max.support = Inf,
pobs.a = 0, pstr.i = 0, byrow.arg = FALSE)
rgaitnbinom.mlm(n, size, prob = NULL, munb = NULL, alter = NULL,
inflate = NULL, truncate = NULL, max.support = Inf,
pobs.a = 0, pstr.i = 0, byrow.arg = FALSE)
x, q, p, n, log.arg |
Same meaning as in |
size, prob, munb |
Same meaning as in |
alter, inflate, truncate |
Se |
pstr.i, byrow.arg |
See |
pobs.a, max.support |
See |
Largely similar to Gaitpois except a
negative binomial distribution replaces the Poisson distribution.
Special cases of these functions include
dposnegbin,
dzanegbin,
dzinegbin,
pposnegbin,
pzanegbin,
pzinegbin,
qposnegbin,
qzanegbin,
qzinegbin,
rposnegbin,
rzanegbin,
rzinegbin
corresponding to the special value 0.
However, now arguments alter, inflate and truncate
have been supplied in one function.
dgaitnbinom.mlm gives the density (PMF),
pgaitnbinom.mlm gives the distribution function,
qgaitnbinom.mlm gives the quantile function, and
rgaitnbinom.mlm generates random deviates.
The default values of the arguments correspond to ordinary
dnegbin,
pnegbin,
qnegbin,
rnegbin
respectively.
T. W. Yee.
gatnbinomial.mlm,
Gaitpois,
NegBinomial.
avec <- c(5, 10) # Alter these (special) values
ivec <- c(15, 20) # Inflate these (special) values
tvec <- 0 # Truncate this (special) value
pobs.a <- c(0.1, 0.2)
pstr.i <- c(0.1, 0.1); size <- 3; munb <- 15; x <- 0:22
y <- rgaitnbinom.mlm(1000, size, munb = munb, alter = avec,
inflate = ivec, truncate = tvec, max.support = 20,
pstr.i = pstr.i, pobs.a = pobs.a, byrow = TRUE)
table(y)
(pmf <- dgaitnbinom.mlm(x, size, munb = munb, alter = avec,
inflate = ivec, truncate = tvec, max.support = 20,
pstr.i = pstr.i, pobs.a = pobs.a, byrow = TRUE))
## Not run: plot(x, pmf, type = "h", col = "blue", las = 1,
main = "Heaped data that is also upper-truncated")
## End(Not run)