gaitdbinomUC.RdDensity, distribution function, quantile function and random generation for the generally altered, inflated, truncated and deflated 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.
dgaitdbinom(x, size.p, prob.p,
a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
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,
prob.a = prob.p, prob.i = prob.p, prob.d = prob.p,
log = FALSE, ...)
pgaitdbinom(q, size.p, prob.p,
a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
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,
prob.a = prob.p, prob.i = prob.p, prob.d = prob.p,
lower.tail = TRUE, ...)
qgaitdbinom(p, size.p, prob.p,
a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
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,
prob.a = prob.p, prob.i = prob.p, prob.d = prob.p, ...)
rgaitdbinom(n, size.p, prob.p,
a.mix = NULL, a.mlm = NULL,
i.mix = NULL, i.mlm = NULL,
d.mix = NULL, d.mlm = NULL, truncate = NULL,
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,
prob.a = prob.p, prob.i = prob.p, prob.d = prob.p, ...)Same meaning as in Binomial.
Same meaning as in Binomial.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
See Gaitdpois for generic information.
Arguments such as max.support that are ignored.
This will occur internally within dgaitdplot.
These functions for the GAITD binomial distribution
are analogous to the GAITD Poisson,
hence most details have been put in
Gaitdpois.
See Gaitdpois about the dangers
of too much inflation and/or deflation on
GAITD PMFs, and the difficulties detecting such.
dgaitdbinom gives the density,
pgaitdbinom gives the distribution function,
qgaitdbinom gives the quantile function, and
rgaitdbinom generates random deviates.
The default values of the arguments correspond to ordinary
dbinom,
pbinom,
qbinom,
rbinom
respectively.
Functions Posbinom have been moved
to VGAMdata.
It is better to use
dgaitdbinom(x, size, prob, truncate = 0) instead of
dposbinom(x, size, prob), etc.
size <- 20
ivec <- c(6, 10); avec <- c(8, 11); prob <- 0.25; xgrid <- 0:25
tvec <- 14; pobs.a <- 0.05; pstr.i <- 0.15
dvec <- 5; pdip.mlm <- 0.05
(ddd <- dgaitdbinom(xgrid, size, prob.p = prob,
prob.a = prob + 0.05, 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))
#> [1] 2.710203e-03 1.806802e-02 5.721541e-02 1.144308e-01 1.621103e-01
#> [6] 1.229177e-01 2.827010e-01 9.606537e-02 5.000000e-02 2.312685e-02
#> [11] 1.663631e-02 5.247166e-02 1.260327e-03 2.585286e-04 2.112528e-05
#> [16] 5.745080e-06 5.984458e-07 4.693692e-08 2.607607e-09 9.149498e-11
#> [21] 1.524916e-12 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#> [26] 0.000000e+00
if (FALSE) dgaitdplot(c(size, prob), ylab = "Probability",
xlab = "x", pobs.mix = pobs.mix,
pobs.mlm = pobs.a, a.mlm = avec, all.lwd = 3,
pdip.mlm = pdip.mlm, d.mlm = dvec, fam = "binom",
pstr.mix = pstr.i, i.mix = ivec, deflation = TRUE,
main = "GAITD Combo PMF---Binomial Parent") # \dontrun{}