Companion

Properties

Link copied to clipboard
const val DEFAULT_TAIL_DECADES: Int = 9

The default number of powers of ten of tail refinement.

Link copied to clipboard
const val DEFAULT_UNIFORM_STEP: Double = 0.001

The default uniform spacing. Measured against a dense reference over random coefficient vectors, this resolution produced no false acceptances, whereas a spacing of 0.01 did.

Link copied to clipboard

A checker built with the default grid, suitable for sharing because it holds no mutable state.

Link copied to clipboard
const val THREE_TERM_RATIO_LIMIT: Double = 1.66711

The three-term feasibility limit on the magnitude of the ratio of the third coefficient to the second, from Keelin (2016) Proposition 2. It is the minimum over the lower half of the probability interval of the function Keelin writes as C(y).

Functions

Link copied to clipboard

The exact two-term condition. A two-term metalog is a logistic distribution whose scale is the second coefficient, so it is valid exactly when that scale is positive.

Link copied to clipboard

The exact three-term condition from Keelin (2016) Proposition 2. The second coefficient must be positive and the ratio of the third to the second must be smaller in magnitude than the limiting value.

Link copied to clipboard
fun requireFeasible(coefficients: DoubleArray)

Rejects coefficients that do not define a valid quantile function, with a message naming where the quantile function failed to increase.