Expand description
Basic Unit root tests for time series data.
Examples
use unit_root::prelude::distrib::dickeyfuller::constant_no_trend_critical_value;
use unit_root::prelude::distrib::AlphaLevel;
use unit_root::prelude::nalgebra::DVector;
use unit_root::prelude::*;
let y = DVector::from_row_slice(&[
-0.89642362f64,
0.3222552,
-1.96581989,
-1.10012936,
-1.3682928,
1.17239875,
2.19561259,
2.54295031,
2.05530587,
1.13212955,
-0.42968979,
]);
let lag = 2;
let report = tools::adf::constant_no_trend_test(&y, lag).unwrap();
let critical_value: f64 = constant_no_trend_critical_value(report.size, AlphaLevel::OnePercent);
assert_eq!(report.size, 8);
let t_stat = report.test_statistic;
println!("t-statistic: {}", t_stat);
println!("critical_value: {}", critical_value);References
Modules
The public API.
unit_root is a library for testing for unit roots in time series.
This is the public API. Enjoy!
Enums
The error type for this crate.