ppmd {PoissonMultinomial}R Documentation

Cumulative Distribution Function of Poisson-Multinomial Distribution

Description

Computes the cdf of Poisson-Multinomial distribution that is specified by the success probability matrix, using various methods.

Usage

ppmd(pmat, xmat, method = "DFT-CF", B = 1000)

Arguments

pmat

An \rm n \times m success probability matrix. Here, \rm n is the number of independent trials, and \rm m is the number of categories. Each row of pmat describes the success probability for the corresponding trial and it should add up to 1.

xmat

A matrix with \rm m columns. Each row has the form \rm x = (x_{1},\ldots,x_{m}) for computing the cdf at \rm x, \rm P(X_{1} \leq x_{1},\ldots, X_{m} \leq x_{m}). It can also be a vector with length \rm m.

method

Character string stands for the method selected by users to compute the cdf. The method can only be one of the following three: "DFT-CF", "NA", "SIM".

B

Number of repeats used in the simulation method. It is ignored for methods other than the "SIM" method.

Details

See Details in dpmd for the definition of the PMD, the introduction of notation, and the description of the three methods ("DFT-CF", "NA", and "SIM"). ppmd computes the cdf by adding all probability mass points within hyper-dimensional space bounded by x as in the cdf.

Value

The value of cdf \rm P(X_{1} \leq x_{1},\ldots, X_{m} \leq x_{m}) at \rm x = (x_{1},\ldots, x_{m}).

Examples

pp <- matrix(c(.1, .1, .1, .7, .1, .3, .3, .3, .5, .2, .1, .2), nrow = 3, byrow = TRUE)
x <- c(3,2,1,3)
x1 <- matrix(c(0,0,1,2,2,1,0,0),nrow=2,byrow=TRUE)

ppmd(pmat = pp, xmat = x)
ppmd(pmat = pp, xmat = x1)

ppmd(pmat = pp, xmat = x, method = "NA")
ppmd(pmat = pp, xmat = x1, method = "NA")

ppmd(pmat = pp, xmat = x, method = "SIM", B = 1e3)
ppmd(pmat = pp, xmat = x1, method = "SIM", B = 1e3)


[Package PoissonMultinomial version 1.1 Index]