CheckDataResult

Structured diagnostic data underlying check() plots.

Usage

Source

CheckDataResult(
    deviance_residuals,
    pearson_residuals,
    fitted_values,
    response,
    qq_theoretical,
    qq_observed,
)

Provides the same four diagnostic datasets that check() renders as Altair charts, but as raw arrays for custom plotting with matplotlib or other libraries.

Attributes

deviance_residuals: NDArray

Deviance residuals, shape (n,).

pearson_residuals: NDArray

Pearson residuals, shape (n,).

fitted_values: NDArray

Fitted values on the response scale, shape (n,).

response: NDArray

Observed response values, shape (n,).

qq_theoretical: NDArray

Theoretical normal quantiles for the QQ plot, shape (n,).

qq_observed: NDArray
Sorted deviance residuals for the QQ plot, shape (n,).

Attributes

Name Description
n_obs Number of observations.

n_obs

Number of observations.

n_obs: int