| Gaitbinom.mlm {VGAM} | R Documentation |
Density, distribution function, quantile function and random generation for the generally–altered, –inflated and –truncated binomial distribution based on the multinomial logit model (MLM). This distribution is sometimes abbreviated as GAIT–Binom–MLM–MLM.
dgaitbinom.mlm(x, size, prob, alter = NULL, inflate = NULL,
truncate = NULL, pobs.a = 0, pstr.i = 0,
byrow.arg = FALSE, log.arg = FALSE, .errorcheck = TRUE)
pgaitbinom.mlm(q, size, prob, alter = NULL, inflate = NULL,
truncate = NULL, pobs.a = 0, pstr.i = 0,
byrow.arg = FALSE, .errorcheck = TRUE)
qgaitbinom.mlm(p, size, prob, alter = NULL, inflate = NULL,
truncate = NULL, pobs.a = 0, pstr.i = 0, byrow.arg = FALSE)
rgaitbinom.mlm(n, size, prob, alter = NULL, inflate = NULL,
truncate = NULL, pobs.a = 0, pstr.i = 0, byrow.arg = FALSE)
x, q, p, n, log.arg |
Same meaning as in |
size, prob |
Same meaning as in |
alter, inflate, truncate |
Vectors of nonnegative integers;
the altered, inflated and truncated values.
Each argument must have unique values only.
The default value of |
pstr.i, byrow.arg |
The first argument can be a |
pobs.a |
This argument is similar to |
.errorcheck |
Logical. Should be ignored by the user. |
See Gaitpois for generic details applying
to both distributions.
These functions do what
dgabinom,
dgibinom,
dgtbinom,
pgabinom,
pgibinom,
pgtbinom,
qgabinom,
qgibinom,
qgtbinom,
rgabinom,
rgibinom,
rgtbinom
collectively did because the
arguments alter, inflate and truncate
have been combined.
dgaitbinom.mlm gives the density,
pgaitbinom.mlm gives the distribution function,
qgaitbinom.mlm gives the quantile function, and
rgaitbinom.mlm generates random deviates.
The default values of the arguments correspond to ordinary
dbinom,
pbinom,
qbinom,
rbinom
respectively.
T. W. Yee.
Gaitnbinom.mlm,
Posbinom,
Binomial.
avec <- 5:6 # Alter these (special) values
ivec <- 9:10 # Inflate these (special) values
tvec <- 2:4 # Truncate these (special) values
pobs.a <- c(0.1, 0.2)
pstr.i <- (1:2)/10
size <- 10; prob <- 0.5; xx <- 0:11
y <- rgaitbinom.mlm(1000, size, prob, alter = avec, inflate = ivec,
truncate = tvec, pstr.i = pstr.i, pobs.a = pobs.a, byrow = TRUE)
table(y)
(ii <- dgaitbinom.mlm(xx, size, prob, alter = avec, inflate = ivec,
truncate = tvec, pstr.i = pstr.i, pobs.a = pobs.a, byrow = TRUE))