gaitdbinomUC: Generally Altered, Inflated, Truncated and Deflated Binomial...

GaitdbinomR Documentation

Generally Altered, Inflated, Truncated and Deflated Binomial Distribution

Description

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.

Usage

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, ...)

Arguments

x, q, p, n, log, lower.tail

Same meaning as in Binomial.

size.p, prob.p

Same meaning as in Binomial. See Gaitdpois for generic information.

size.a, prob.a

See Gaitdpois for generic information.

size.i, prob.i

See Gaitdpois for generic information.

size.d, prob.d

See Gaitdpois for generic information.

truncate

See Gaitdpois for generic information.

a.mix, i.mix, d.mix

See Gaitdpois for generic information.

a.mlm, i.mlm, d.mlm

See Gaitdpois for generic information.

pstr.mix, pstr.mlm, byrow.aid

See Gaitdpois for generic information.

pobs.mix, pobs.mlm

See Gaitdpois for generic information.

pdip.mix, pdip.mlm

See Gaitdpois for generic information.

...

Arguments such as max.support that are ignored. This will occur internally within dgaitdplot.

Details

These functions for the GAITD binomial distribution are analogous to the GAITD Poisson, hence most details have been put in Gaitdpois.

Value

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.

Warning

See Gaitdpois about the dangers of too much inflation and/or deflation on GAITD PMFs, and the difficulties detecting such.

Note

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.

Author(s)

T. W. Yee.

See Also

Gaitdpois, Gaitdnbinom, multinomial, Gaitdlog, Gaitdzeta.

Examples

 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)

VGAM documentation built on Sept. 18, 2024, 9:09 a.m.