Learn R Programming

backbone (version 1.2.2)

rna: Poisson Binomial distribution computed with Refined Normal Approximation

Description

Poisson Binomial distribution computed with Refined Normal Approximation

Usage

rna(kk, pp, wts = NULL)

Arguments

kk

values where the cdf is to be computed

pp

vector of success probabilities for indicators

wts

the weights for each probability

Value

cdf, cumulative distribution function

Details

These values are approximated using the Refined Normal Approximation (RNA method). These functions are originally described by ppoibin and used here under GPL-2 License.

References

Hong, Y. (2013). On computing the distribution function for the Poisson binomial distribution. Computational Statistics & Data Analysis, Vol. 59, pp. 41-51.

Examples

Run this code
# NOT RUN {
probs <- polytope(davis)
# }
# NOT RUN {
P <- davis %*% t(davis)
# }
# NOT RUN {
prob.mat <- matrix(probs, nrow = nrow(davis), ncol = ncol(davis))
# }
# NOT RUN {
prob.imat <- sweep(prob.mat, MARGIN = 2, prob.mat[1,], `*`)
# }
# NOT RUN {
mapply(backbone:::rna, kk= as.data.frame(t(P[1,])), pp = as.data.frame(t(prob.imat)))
# }

Run the code above in your browser using DataLab