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 |
xmat |
A matrix with |
method |
Character string stands for the method selected by users to
compute the cdf. The method can only be one of
the following three:
|
B |
Number of repeats used in the simulation method. It is ignored for methods other than
the |
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)