Gaitdbinom | R Documentation |
Density, 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, ...)
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 |
size.d , prob.d |
See |
truncate |
See |
a.mix , i.mix , d.mix |
See |
a.mlm , i.mlm , d.mlm |
See |
pstr.mix , pstr.mlm , byrow.aid |
See |
pobs.mix , pobs.mlm |
See |
pdip.mix , pdip.mlm |
See |
... |
Arguments such as |
These functions for the GAITD binomial distribution
are analogous to the GAITD Poisson,
hence most details have been put in
Gaitdpois
.
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.
See Gaitdpois
about the dangers
of too much inflation and/or deflation on
GAITD PMFs, and the difficulties detecting such.
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.
T. W. Yee.
Gaitdpois
,
Gaitdnbinom
,
multinomial
,
Gaitdlog
,
Gaitdzeta
.
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))
## Not run: 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.