Skip to main content

Crate solow_tsa

Crate solow_tsa 

Source
Expand description

§solow-tsa

Time-series analysis primitives and models for the Solow statistical stack, validated against an authoritative reference.

The crate provides:

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 lag

Structs§

AdfResult
Result of the augmented Dickey-Fuller test.
ArSelectResult
Result of ar_select_order.
ArmaOrderSelectResult
Result of arma_order_select_ic.
AutoReg
An autoregressive model of fixed lag order with optional deterministic trend terms.
AutoRegResults
Fitted results of an AutoReg model.
CointResult
Result of coint.
CusumAlarm
A single CUSUM alarm.
DecomposeResult
The three components produced by seasonal_decompose.
DeterministicProcess
Builder for a matrix of deterministic time-series terms.
EwmaAlarm
A single EWMA alarm.
EwmaResult
Fitted EWMA control-chart run.
ExponentialSmoothing
Holt-Winters exponential smoothing with additive trend and optional additive or multiplicative seasonality.
Garch11
Fitted GARCH(1, 1).
GrangerLagResult
The three Granger-causality test statistics produced for a single lag.
Holt
Holt’s linear-trend method (additive trend, no seasonality).
InnovationsResult
Result of the innovations_algo recursion.
KpssResult
Result of the KPSS stationarity test.
RangeUnitRootResult
Result of the range unit-root (RUR) test.
SimpleExpSmoothing
Simple exponential smoothing (no trend, no seasonality).
SmoothingResult
A fitted exponential-smoothing model.
Stl
Seasonal-Trend decomposition using LOESS.
StlResult
The three components produced by Stl::fit.
ZivotAndrewsResult
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.
BreakvarAlternative
Alternative hypothesis for breakvar_heteroskedasticity_test.
CointTrend
Deterministic trend included in the cointegrating regression.
InfoCriterion
Information criterion to tabulate.
KpssLags
Lag-truncation rule for the long-run-variance (Newey-West) estimator.
KpssRegression
Deterministic component used to detrend the series before the KPSS test.
Original
Which original (lag-0) columns to return alongside the lagged columns.
PacfMethod
Method used to estimate the partial autocorrelation function.
Seasonal
Seasonal component type for ExponentialSmoothing.
SeasonalModel
Decomposition model.
SubsetLength
Length of the test subsets, the subset_length argument 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 lags terms (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 lags terms (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 x and y.
cffilter
Christiano-Fitzgerald asymmetric random-walk band-pass filter.
coint
Engle-Granger cointegration test between y0 and y1.
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 nobs steps 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 lagmat for 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.