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
//! **Survival / time-to-event** diagnostics — a framework apart from the
//! regression models elsewhere in the crate, because the response is a
//! (possibly right-censored) time and the likelihood is built around risk sets
//! rather than residual variance.
//!
//! * [`CoxFit`] — the **Cox proportional-hazards** model
//!   `h(t) = h₀(t)·exp(xᵀβ)`, fit by maximizing the partial likelihood (Efron or
//!   [`Breslow`](Ties::Breslow) ties). Gives log hazard ratios with Wald
//!   `z`-statistics, the Breslow baseline cumulative hazard, and Harrell's
//!   concordance index.
//! * [`KaplanMeier`] — the non-parametric **product-limit** survivor-function
//!   estimator with Greenwood standard errors and median survival.
//! * Residuals — [`martingale_residuals`], [`deviance_residuals`] (outlier
//!   detection) and [`schoenfeld_residuals`] (the proportional-hazards
//!   assumption check).
//!
//! # Data convention
//!
//! Each observation is a `(time, event)` pair — `time > 0` and `event` is `1.0`
//! for an observed event or `0.0` for right-censoring — plus a covariate row.
//! The Cox design **must not** include an intercept column: the baseline hazard
//! absorbs it, and a constant column is rejected.
//!
//! # Anchors
//!
//! At the MLE the Cox score vanishes, so martingale residuals and each
//! covariate's Schoenfeld residuals sum to zero; the concordance index lies in
//! `[0, 1]`; and the Kaplan–Meier steps reproduce the product-limit values by
//! hand (see `tests/survival.rs`).

mod aft;
mod cox;
mod kaplan_meier;
mod residuals;

pub use aft::{AftDistribution, AftFit};
pub use cox::{CoxFit, Ties};
pub use kaplan_meier::{KaplanMeier, KmStep};
pub use residuals::{deviance_residuals, martingale_residuals, schoenfeld_residuals};