Learn R Programming

VGAM (version 1.1-6)

Gaitdbinom: Generally--Altered, --Inflated, --Truncated and --Deflated Binomial Distribution

Description

Density, distribution function, quantile function and random generation for the generally--altered, --inflated and --truncated 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. Altogether it can be abbreviated as GAAIITDD--Binom(size.p, prob.p)--Binom(size.a, prob.a)--MLM--Binom(size.i, prob.i)--MLM--Binom(size.d, prob.d)--MLM.

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.

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.

Details

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

See Also

Gaitdpois, Gaitdnbinom, multinomial, Gaitdlog, Gaitdzeta.

Examples

Run this code
# NOT RUN {
 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")   
# }

Run the code above in your browser using DataLab