Skip to main content

models.quantile_residuals()

Randomized quantile residuals (Dunn and Smyth, 1996): the normal scores

Usage

models.quantile_residuals(
    family,
    y,
    mu,
    dispersion=1.0,
    weights=None,
    seed=0,
    theta=None,
    power=None
)

Phi^-1 of pit() at the same seed, standard normal when the model is right. Exact for a continuous family; drawn between Phi^-1(F(y-)) and Phi^-1(F(y)) for a count and a Tweedie’s zero, as R’s statmod::qresiduals.

Parameters

family: str
y: list of float
mu: list of float
dispersion: float = 1.0
weights: list of float = None
seed: int = 0

Seeds the randomization.

theta: float = None
power: float = None

Returns

list of float