Learn R Programming

GPB (version 1.2)

GPB-package: Generalized Poisson Binomial Distribution

Description

This package computes the distribution functions for the Generalized Poisson Binomial distribution. It provides the cdf, pmf, quantile function, and random number generation for the distribution.

Arguments

Details

Generalized Poisson Bionomial distribution is defined as distribution of sum of independent, non-identically distributed Bernoulli variables which are associated with integer values. This package provides an computing method for Generalized Poisson Binomial distributions. The fomula that computes the cdf of Generalized Poisson Binomial distribution is based on the discrete Fourier transform of the characteristic function.

Examples

Run this code
# NOT RUN {
pgpb(kk=0:11, pp=c(.1, .2, .3), aval=c(1,0,0), bval=c(2,3,1), wts=c(1,2,2))
dgpb(kk=0:11, pp=c(.1, .2, .3), aval=c(1,0,0), bval=c(2,3,1), wts=c(1,2,2))
qgpb(qq=c(.1,.3), pp=c(.1, .2, .3), aval=c(1,0,0), bval=c(2,3,1), wts=c(1,2,2))
rgpb(m=3, pp=c(.1, .2, .3), aval=c(1,0,0), bval=c(2,3,1), wts=c(1,2,2))

# }

Run the code above in your browser using DataLab