Expand description
§solow-tsa
Time-series analysis primitives and models for the Solow statistical stack, validated against an authoritative reference.
The crate provides:
- Sample second-moment estimators:
acovf,acf,pacf,ccf. - The Ljung-Box
q_statportmanteau statistic. - Design helpers
lagmatandadd_trend. - The augmented Dickey-Fuller unit-root test
adfuller. - The autoregressive estimator
AutoReg.
use ndarray::Array1;
use solow_tsa::{acf, AutoReg, Trend};
// A short AR(1)-like series.
let y = Array1::from_vec(vec![
0.0, 0.4, 0.1, 0.5, 0.2, 0.6, 0.3, 0.7, 0.35, 0.75, 0.4, 0.8,
]);
let a = acf(&y, 3, false).unwrap();
assert!((a[0] - 1.0).abs() < 1e-12);
let res = AutoReg::new(y, 1, Trend::C).unwrap().fit().unwrap();
assert_eq!(res.params.len(), 2); // const + 1 lagStructs§
- AdfResult
- Result of the augmented Dickey-Fuller test.
- ArSelect
Result - Result of
ar_select_order. - Arma
Order Select Result - Result of
arma_order_select_ic. - AutoReg
- An autoregressive model of fixed lag order with optional deterministic trend terms.
- Auto
RegResults - Fitted results of an
AutoRegmodel. - Coint
Result - Result of
coint. - Cusum
Alarm - A single CUSUM alarm.
- Decompose
Result - The three components produced by
seasonal_decompose. - Deterministic
Process - Builder for a matrix of deterministic time-series terms.
- Ewma
Alarm - A single EWMA alarm.
- Ewma
Result - Fitted EWMA control-chart run.
- Exponential
Smoothing - Holt-Winters exponential smoothing with additive trend and optional additive or multiplicative seasonality.
- Garch11
- Fitted GARCH(1, 1).
- Granger
LagResult - The three Granger-causality test statistics produced for a single lag.
- Holt
- Holt’s linear-trend method (additive trend, no seasonality).
- Innovations
Result - Result of the
innovations_algorecursion. - Kpss
Result - Result of the KPSS stationarity test.
- Range
Unit Root Result - Result of the range unit-root (RUR) test.
- Simple
ExpSmoothing - Simple exponential smoothing (no trend, no seasonality).
- Smoothing
Result - A fitted exponential-smoothing model.
- Stl
- Seasonal-Trend decomposition using LOESS.
- StlResult
- The three components produced by
Stl::fit. - Zivot
Andrews Result - Result of the Zivot-Andrews structural-break unit-root test.
Enums§
- AdfRegression
- Deterministic regression component included in the ADF regression.
- ArIc
- Information criterion used for
ar_select_order. - AutoLag
- Automatic lag-length selection criterion for
adfuller. - Breakvar
Alternative - Alternative hypothesis for
breakvar_heteroskedasticity_test. - Coint
Trend - Deterministic trend included in the cointegrating regression.
- Info
Criterion - Information criterion to tabulate.
- Kpss
Lags - Lag-truncation rule for the long-run-variance (Newey-West) estimator.
- Kpss
Regression - Deterministic component used to detrend the series before the KPSS test.
- Original
- Which original (lag-0) columns to return alongside the lagged columns.
- Pacf
Method - Method used to estimate the partial autocorrelation function.
- Seasonal
- Seasonal component type for
ExponentialSmoothing. - Seasonal
Model - Decomposition model.
- Subset
Length - Length of the test subsets, the
subset_lengthargument of the reference. - Trend
- Deterministic trend specification for
add_trend. - Trim
- How to trim the partially observed rows produced by lag construction.
- ZaRegression
- Deterministic specification for the Zivot-Andrews regression.
Functions§
- acf
- Autocorrelation function for lags
0..=nlags. - acf_
qstat - Autocorrelation function together with the Ljung-Box Q-statistic and its
p-values for lags
1..=nlags(lag 0 is excluded from the Q output). - acovf
- Estimate autocovariances of a 1-D series.
- add_
trend - Add deterministic trend columns to a design matrix.
- adfuller
- Augmented Dickey-Fuller unit-root test.
- ar_
select_ order - Select the AR lag order minimising an information criterion.
- arma_
acf - Theoretical autocorrelation function of an ARMA process for
lagsterms (including the unit lag-0 term). - arma_
acovf - Theoretical autocovariance function of a stationary ARMA process.
- arma_
impulse_ response - MA(infinity) / impulse-response coefficients of an ARMA process.
- arma_
order_ select_ ic - Compute the IC grid(s) for ARMA orders up to
(max_ar, max_ma). - arma_
pacf - Theoretical partial autocorrelation function of an ARMA process for
lagsterms (including the unit lag-0 term). - binary_
segmentation - Binary segmentation — top-down recursive maximum-t-statistic split
(Auger-Lawrence 1989). Halts when no split’s t-statistic exceeds
threshold. - bkfilter
- Baxter-King fixed-length symmetric band-pass filter.
- breakvar_
heteroskedasticity_ test - Break-variance heteroskedasticity test.
- ccf
- Cross-correlation function between
xandy. - cffilter
- Christiano-Fitzgerald asymmetric random-walk band-pass filter.
- coint
- Engle-Granger cointegration test between
y0andy1. - cusum
- Two-sided CUSUM chart.
- ewma
- Run an EWMA control chart.
- grangercausalitytests
- Granger causality tests for lags
1..=maxlag. - hpfilter
- Hodrick-Prescott filter.
- innovations_
algo - Run the innovations algorithm for
nobssteps from an autocovariance sequence. - kpss
- Kwiatkowski-Phillips-Schmidt-Shin test for stationarity.
- lagmat
- Construct a matrix of lags of a (possibly multivariate) series.
- lagmat1d
- Convenience wrapper over
lagmatfor a 1-D series. - pacf
- Partial autocorrelation function for lags
0..=nlags. - pelt
- PELT (Killick-Fearnhead-Eckley 2012) exact segmentation under a
Gaussian change-in-mean cost with linear penalty
β. - q_stat
- Ljung-Box Q-statistic and its chi-squared p-values.
- range_
unit_ root_ test - Range unit-root test for stationarity.
- seasonal_
decompose - Classical seasonal decomposition via centered moving averages.
- zivot_
andrews - Zivot-Andrews structural-break unit-root test.