solow_othermod/lib.rs
1//! # solow-othermod
2//!
3//! Models that fall outside the core regression and GLM families. Currently this
4//! provides [`BetaModel`], a maximum-likelihood **beta regression** with separate
5//! linear predictors (and links) for the conditional mean and the precision.
6//!
7//! ```
8//! use ndarray::{array, Array2};
9//! use solow_othermod::BetaModel;
10//!
11//! let y = array![0.3, 0.55, 0.62, 0.48, 0.71, 0.4];
12//! let x = Array2::from_shape_vec((6, 2), vec![
13//! 1.0, -1.0, 1.0, -0.3, 1.0, 0.2, 1.0, 0.0, 1.0, 0.8, 1.0, -0.5,
14//! ]).unwrap();
15//! let z = Array2::from_shape_vec((6, 1), vec![1.0; 6]).unwrap();
16//! let res = BetaModel::new(y, x, z).unwrap().fit().unwrap();
17//! assert!(res.converged);
18//! ```
19
20mod betareg;
21
22pub use betareg::{BetaModel, BetaResults, Link};