Companion

object Companion

Properties

Link copied to clipboard
const val DEFAULT_MAX_ITERATIONS: Int = 5000

Used in the calculation of the incomplete gamma function

Functions

Link copied to clipboard
fun canMatchMoments(vararg moments: Double): Boolean
Link copied to clipboard
fun createFromMoments(vararg moments: Double): Poisson
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun poissonCCDF(j: Int, mean: Double, recursive: Boolean = true): Double

Allows static computation of complementary cdf function assumes that distribution's range is {0,1, ...}

Link copied to clipboard
fun poissonCDF(j: Int, mean: Double, recursive: Boolean = true): Double

Allows static computation of cdf assumes that distribution's range is {0,1, ...} false indicated the use of the incomplete gamma function It yields about 7 digits of accuracy, the recursive algorithm has more accuracy

Link copied to clipboard
fun poissonInvCDF(p: Double, mean: Double, recursive: Boolean = true): Int

Returns the quantile associated with the supplied probablity, x assumes that distribution's range is {0,1, ...}

Link copied to clipboard
fun poissonLF1(x: Double, mean: Double, recursive: Boolean = true): Double

Computes the first order loss function for the distribution function for given value of x, G1(x) = Emax(X-x,0)

Link copied to clipboard
fun poissonLF2(x: Double, mean: Double, recursive: Boolean = true): Double

Computes the 2nd order loss function for the distribution function for given value of x, G2(x) = (1/2)Emax(X-x,0)*max(X-x-1,0)

Link copied to clipboard
fun poissonPMF(j: Int, mean: Double, recursive: Boolean = true): Double

Allows static computation of prob mass function assumes that distribution's range is {0,1, ...}

Link copied to clipboard
fun recursiveCDF(j: Int, mean: Double): Double

Computes the cdf at j using a recursive (iterative) algorithm using logarithms

Link copied to clipboard
fun recursivePMF(j: Int, mean: Double): Double

Computes the probability mass function at j using a recursive (iterative) algorithm using logarithms