Expand description
§solow-glm
Generalized linear models: exponential-dispersion Family distributions,
Link functions, and the Glm estimator (iteratively reweighted least
squares). Validated against an authoritative reference.
use ndarray::{array, Array1};
use solow_glm::{Family, Glm};
// Poisson regression with an intercept.
let x = array![[1.0, 0.0], [1.0, 1.0], [1.0, 2.0], [1.0, 3.0], [1.0, 4.0]];
let y: Array1<f64> = array![1.0, 2.0, 4.0, 7.0, 12.0];
let res = Glm::new(y, x, Family::Poisson).unwrap().fit().unwrap();
assert!(res.converged);Structs§
- Gamma
Regressor - Fitted Gamma regressor (log link).
- Glm
- A generalized linear model awaiting estimation.
- GlmResults
- The fitted result of a
Glm. - Poisson
Regressor - Fitted Poisson regressor (log link).
- Tweedie
Glm - A Tweedie GLM (log link, power variance
V(μ) = μ^p) awaiting estimation. - Tweedie
Regressor - Fitted Tweedie regressor (log link,
p ∈ (1, 2)).