regression-diagnostics 0.2.0

Statistical diagnostics for OLS regression in Rust: VIF, condition number, adjusted R2, F/AIC/BIC, residual tests (Durbin-Watson, Breusch-Pagan, White, Jarque-Bera), influence measures (leverage, Cook's distance, DFFITS), QQ-plot data, and an R/statsmodels-style summary().
Documentation
//! Diagnostics for **binary logistic regression** — a different statistical
//! framework from OLS, not an extension of it, and provided here as its own
//! self-contained set of types.
//!
//! Logistic regression models `P(y = 1) = 1/(1 + e^{−Xβ})` and is fit by maximum
//! likelihood; there is no closed-form hat matrix and residuals are not Gaussian.
//! So the diagnostics are the ones that are actually defined for this likelihood:
//!
//! * [`LogisticFit`] — the maximum-likelihood fit via **IRLS** (Fisher scoring),
//!   with coefficient standard errors, Wald `z`-statistics and p-values.
//! * [`deviance_residuals`] / [`pearson_residuals`] — the two standard residual
//!   scales for a non-Gaussian GLM.
//! * [`GoodnessOfFit`] via [`LogisticFit::goodness_of_fit`] — null/residual
//!   deviance, McFadden's pseudo-R², AIC/BIC, and the **Hosmer–Lemeshow** test.
//! * [`leverage`] and [`cooks_distance`] — the logistic (weighted-hat-matrix)
//!   analogues of the OLS influence measures.
//!
//! # Response convention
//!
//! The response must be binary, coded `0.0` / `1.0`, with both classes present.
//! As with OLS the caller owns the design matrix, including any intercept column.
//!
//! # Separation
//!
//! When the classes are perfectly (or quasi-) separable the maximum-likelihood
//! coefficients diverge to ±∞ and no finite fit exists. IRLS then fails to
//! converge and construction returns [`RegressionError::NotConverged`](crate::RegressionError::NotConverged)
//! rather than reporting enormous, meaningless coefficients.

mod fit;
mod goodness;
mod influence;
mod residuals;

pub use fit::LogisticFit;
pub use goodness::{GoodnessOfFit, HosmerLemeshow};
pub use influence::{cooks_distance, leverage};
pub use residuals::{deviance_residuals, pearson_residuals};