1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! # inferust
//!
//! **Statistical modeling for Rust** — a `statsmodels`-inspired library.
//!
//! ## Modules
//!
//! | Module | Contents |
//! |--------|---------|
//! | [`regression`] | OLS/WLS/GLS/FGLS plus rolling and recursive OLS with fast/stable/HAC solvers, HC0-HC3 and Newey-West SEs, confidence intervals, influence diagnostics, full summary |
//! | [`glm`] | Binary logistic and Poisson regression with Wald inference, LRT, residual diagnostics, prediction intervals, classification metrics |
//! | [`survival`] | Kaplan-Meier estimator, log-rank test, Cox proportional hazards regression |
//! | [`time_series`] | ARIMA/SARIMA/SARIMAX via CSS, VAR/VECM/VARMAX, AR, ACF/PACF, Ljung-Box, ADF unit root, KPSS stationarity |
//! | [`hypothesis`] | t-tests, chi-squared, ANOVA, Mann-Whitney U, Kruskal-Wallis, KS tests, Shapiro-Wilk |
//! | [`diagnostics`] | VIF, Breusch-Pagan, White, and RESET diagnostics |
//! | [`discrete`] | Probit, negative binomial, and multinomial logit |
//! | [`glm_family`] | Generic Gaussian/Binomial/Poisson GLM front-end |
//! | [`evaluation`] | Regression/classification metrics and bootstrap intervals |
//! | [`graphics`] | Dependency-light SVG plots for lines, scatter, residuals, and ACF bars |
//! | [`robust`] | Huber robust linear regression |
//! | [`gee`] | Independence-working-correlation GEE |
//! | [`mixed`] | Random-intercept mixed linear model |
//! | [`descriptive`] | Summary stats (mean, std, skewness, kurtosis, quartiles) |
//! | [`data`] | Named-column DataFrame with formula API: `y ~ C(g) + x1*x2 - 1 + offset(e)` |
//! | [`correlation`] | Pearson, Spearman, correlation matrices |
//!
//! ## OLS covariance options
//!
//! [`regression::Ols`] defaults to classical (homoskedastic) standard errors.
//! Switch with `.robust()` (HC1), `.with_covariance(OlsCovariance::Hc3)`, or
//! `.hac(lags)` (Newey-West) for time series regressions.
//!
//! ## Formula syntax
//!
//! [`data::DataFrame`] accepts R-style formulas:
//! - `"y ~ x1 + x2"` — main effects
//! - `"y ~ x1 + x2 - 1"` — no intercept
//! - `"y ~ C(group) + x1"` — inline one-hot encoding
//! - `"y ~ x1:x2"` — interaction term
//! - `"y ~ x1 * x2"` — main effects + interaction
//! - `"y ~ x + offset(exp)"` — Poisson offset
//!
//! ## Quick start
//!
//! ```rust
//! use inferust::regression::Ols;
//!
//! let x = vec![vec![1.0], vec![2.0], vec![3.0], vec![4.0], vec![5.0]];
//! let y = vec![2.1, 3.9, 6.2, 7.8, 10.1];
//!
//! Ols::new()
//! .with_feature_names(vec!["hours".to_string()])
//! .fit(&x, &y)
//! .unwrap()
//! .print_summary();
//! ```
pub use ;