solow_var/lib.rs
1//! # solow-var
2//!
3//! Vector autoregression (VAR) for the Solow statistical stack, validated
4//! against an authoritative reference.
5//!
6//! The crate fits a VAR(`p`) model by equation-by-equation ordinary least
7//! squares on the stacked lag design with an optional constant term, exposing
8//! the per-equation coefficients, both the maximum-likelihood (`/T`) and
9//! degrees-of-freedom-adjusted (`/(T-Kp-1)`) residual covariances, the Gaussian
10//! log-likelihood, the AIC/BIC/HQIC/FPE information criteria, and per-coefficient
11//! standard errors, t-statistics and p-values.
12//!
13//! ```
14//! use ndarray::array;
15//! use solow_var::Var;
16//!
17//! let y = array![
18//! [0.5, 1.0], [0.7, 0.8], [0.4, 1.2], [0.9, 0.6], [0.6, 1.1],
19//! [1.0, 0.5], [0.7, 0.9], [1.1, 0.4], [0.8, 1.0], [1.2, 0.3],
20//! [0.9, 0.8], [1.3, 0.5],
21//! ];
22//! let res = Var::new(y).unwrap().fit(1).unwrap();
23//! assert_eq!(res.neqs, 2);
24//! assert_eq!(res.coefs.len(), 1);
25//! ```
26
27mod coint_tables;
28mod svar;
29mod var_model;
30mod vecm;
31
32pub use coint_tables::{c_sja, c_sjt};
33pub use svar::{Svar, SvarResults};
34pub use var_model::{Trend, Var, VarResults};
35pub use vecm::{coint_johansen, Deterministic, JohansenResult, Vecm, VecmResults};