Skip to main content

solow_mixed/
lib.rs

1//! # solow-mixed
2//!
3//! Linear mixed-effects models (`MixedLM`) estimated by restricted maximum
4//! likelihood (REML) or maximum likelihood (ML).
5//!
6//! The model is
7//!
8//! ```text
9//! y = X·β + Z·b + ε,    b ~ N(0, Ψ),    ε ~ N(0, σ²·I)
10//! ```
11//!
12//! where observations are partitioned into independent groups and the random
13//! effects `b` are shared within a group. This crate implements the
14//! **random-intercept** model: a single grouping factor with one random effect
15//! per group (`Z` is a column of ones within each group), so `Ψ = ψ·σ²` is a
16//! scalar variance.
17//!
18//! Estimation profiles out the fixed effects `β` (by generalized least squares)
19//! and the residual scale `σ²` (closed form), leaving a one-dimensional profile
20//! objective over the covariance ratio `ψ` that is maximized numerically. The
21//! formulation follows the canonical `MixedLM` REML/ML profile log-likelihood.
22
23mod model;
24
25pub use model::{MixedLm, MixedLmResults, RemlMethod};