Skip to main content

Crate solow_var

Crate solow_var 

Source
Expand description

§solow-var

Vector autoregression (VAR) for the Solow statistical stack, validated against an authoritative reference.

The crate fits a VAR(p) model by equation-by-equation ordinary least squares on the stacked lag design with an optional constant term, exposing the per-equation coefficients, both the maximum-likelihood (/T) and degrees-of-freedom-adjusted (/(T-Kp-1)) residual covariances, the Gaussian log-likelihood, the AIC/BIC/HQIC/FPE information criteria, and per-coefficient standard errors, t-statistics and p-values.

use ndarray::array;
use solow_var::Var;

let y = array![
    [0.5, 1.0], [0.7, 0.8], [0.4, 1.2], [0.9, 0.6], [0.6, 1.1],
    [1.0, 0.5], [0.7, 0.9], [1.1, 0.4], [0.8, 1.0], [1.2, 0.3],
    [0.9, 0.8], [1.3, 0.5],
];
let res = Var::new(y).unwrap().fit(1).unwrap();
assert_eq!(res.neqs, 2);
assert_eq!(res.coefs.len(), 1);

Structs§

JohansenResult
Result of the Johansen cointegration test (see coint_johansen).
Svar
A structural VAR with recursive (Cholesky) identification.
SvarResults
Fitted results of a recursive Svar model.
Var
A vector autoregression of fixed lag order p with an optional constant.
VarResults
Fitted results of a Var model.
Vecm
A vector error-correction model estimated by Johansen’s reduced-rank ML.
VecmResults
Fitted results of a Vecm model.

Enums§

Deterministic
Deterministic-term specification for a Vecm model.
Trend
Deterministic trend term included in the VAR design.

Functions§

c_sja
Maximum-eigenvalue critical values for n common trends and deterministic order p (reference c_sja).
c_sjt
Trace critical values for n common trends and deterministic order p (reference c_sjt).
coint_johansen
Johansen cointegration test of the cointegration rank of a VECM.