MultBinom: Multiplicative Binomial Distribution

Description Usage Arguments Author(s) See Also Examples

Description

These functions provide information about the multiplicative binomial distribution with parameters m and s: density, cumulative distribution, quantiles, and random generation.

The multiplicative binomial distribution with total = n and prob = m has density

p(y) = c(n,m,s) Choose(n,y) m^y (1-m)^(n-y) s^(y(n-y))

for y = 0, …, n, where c(.) is a normalizing constant.

Usage

1
2
3
4
dmultbinom(y, size, m, s, log=FALSE)
pmultbinom(q, size, m, s)
qmultbinom(p, size, m, s)
rmultbinom(n, size, m, s)

Arguments

y

vector of frequencies

q

vector of quantiles

p

vector of probabilities

n

number of values to generate

size

vector of totals

m

vector of probabilities of success

s

vector of overdispersion parameters

log

if TRUE, log probabilities are supplied.

Author(s)

J.K. Lindsey

See Also

dbinom for the binomial, ddoublebinom for the double binomial, and dbetabinom for the beta binomial distribution.

Examples

1
2
3
4
5
6
# compute P(45 < y < 55) for y multiplicative binomial(100,0.5,1.1)
sum(dmultbinom(46:54, 100, 0.5, 1.1))
pmultbinom(54, 100, 0.5, 1.1)-pmultbinom(45, 100, 0.5, 1.1)
pmultbinom(2,10,0.5,1.1)
qmultbinom(0.025,10,0.5,1.1)
rmultbinom(10,10,0.5,1.1)

swihart/rmutil documentation built on May 29, 2018, 9:13 p.m.