| Gaitdnbinom | R Documentation |
Density, distribution function, quantile function and random generation for the generally altered, inflated, truncated and deflated negative binomial (GAITD-NB) 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.
dgaitdnbinom(x, size.p, munb.p,
a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
max.support = Inf, pobs.mix = 0, pobs.mlm = 0,
pstr.mix = 0, pstr.mlm = 0,
pdip.mix = 0, pdip.mlm = 0, byrow.aid = FALSE,
size.a = size.p, size.i = size.p, size.d = size.p,
munb.a = munb.p, munb.i = munb.p, munb.d = munb.p,
log = FALSE)
pgaitdnbinom(q, size.p, munb.p,
a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
max.support = Inf, pobs.mix = 0, pobs.mlm = 0,
pstr.mix = 0, pstr.mlm = 0,
pdip.mix = 0, pdip.mlm = 0, byrow.aid = FALSE,
size.a = size.p, size.i = size.p, size.d = size.p,
munb.a = munb.p, munb.i = munb.p, munb.d = munb.p,
lower.tail = TRUE)
qgaitdnbinom(p, size.p, munb.p,
a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
max.support = Inf, pobs.mix = 0, pobs.mlm = 0,
pstr.mix = 0, pstr.mlm = 0,
pdip.mix = 0, pdip.mlm = 0, byrow.aid = FALSE,
size.a = size.p, size.i = size.p, size.d = size.p,
munb.a = munb.p, munb.i = munb.p, munb.d = munb.p)
rgaitdnbinom(n, size.p, munb.p,
a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
max.support = Inf, pobs.mix = 0, pobs.mlm = 0,
pstr.mix = 0, pstr.mlm = 0,
pdip.mix = 0, pdip.mlm = 0, byrow.aid = FALSE,
size.a = size.p, size.i = size.p, size.d = size.p,
munb.a = munb.p, munb.i = munb.p, munb.d = munb.p)
x, q, p, n, log, lower.tail |
Same meaning as in |
size.p, munb.p |
Same meaning as in |
size.a, munb.a |
See |
size.i, munb.i |
See |
size.d, munb.d |
See |
truncate, max.support |
See |
a.mix, i.mix, d.mix |
See |
a.mlm, i.mlm, d.mlm |
See |
pobs.mlm, pstr.mlm, byrow.aid |
See |
pobs.mix, pstr.mix |
See |
pdip.mix, pdip.mlm |
See |
These functions for the NBD are analogous to the Poisson,
hence most details have been put in
Gaitdpois.
The NBD has two possible parameterizations: one
involving a probability (argument begins with prob)
and the other the mean (beginning with mu).
Only the latter is supported here.
For now, arguments such as prob.p and prob.a
are no longer supported.
That's because mu is more likely to be
used by most statisticians than prob;
see dnbinom.
dgaitdnbinom gives the density,
pgaitdnbinom gives the distribution function,
qgaitdnbinom gives the quantile function, and
rgaitdnbinom generates random deviates.
The default values of the arguments correspond to ordinary
dnbinom,
pnbinom,
qnbinom,
rnbinom
respectively.
See Gaitdpois about the dangers
of too much inflation and/or deflation on
GAITD PMFs, and the difficulties detecting such.
Four functions were moved from VGAM to VGAMdata;
they can be seen at Posnegbin.
It is preferable to use
dgaitdnbinom(x, size, munb.p = munb, truncate = 0)
instead of dposnbinom(x, size, munb = munb), etc.
T. W. Yee.
gaitdnbinomial,
Gaitdpois,
multinomial,
Gaitdbinom,
Gaitdlog,
Gaitdzeta.
size <- 10; xgrid <- 0:25
ivec <- c(5, 6, 10, 14); avec <- c(8, 11); munb <- 10
tvec <- 15; pobs.a <- 0.05; pstr.i <- 0.25
dvec <- 13; pdip.mlm <- 0.03; pobs.mlm <- 0.05
(ddd <- dgaitdnbinom(xgrid, size, munb.p = munb, munb.a = munb + 5,
truncate = tvec, pobs.mix = pobs.a,
pdip.mlm = pdip.mlm, d.mlm = dvec,
pobs.mlm = pobs.a, a.mlm = avec,
pstr.mix = pstr.i, i.mix = ivec))
## Not run: dgaitdplot(c(size, munb), fam = "nbinom",
ylab = "Probability", xlab = "x", xlim = c(0, 25),
truncate = tvec, pobs.mix = pobs.mix,
pobs.mlm = pobs.mlm, a.mlm = avec, all.lwd = 3,
pdip.mlm = pdip.mlm, d.mlm = dvec,
pstr.mix = pstr.i, i.mix = ivec, deflation = TRUE,
main = "GAITD Combo PMF---NB Parent")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.