Stats TimeSeries Lodestar.Stats.TimeSeries - CyrilB1531/lodestar GitHub Wiki

Home › Stats-TimeSeries

Lodestar.Stats.TimeSeries

The diagnostics around a time-series model rather than the forecast: the autocorrelation and partial autocorrelation functions with their confidence bands, the Ljung-Box test, the augmented Dickey-Fuller and KPSS stationarity tests with MacKinnon p-values, seasonal decomposition, and vector autoregression.

Install

dotnet add package Lodestar.Stats.TimeSeries

Example

using Lodestar.Stats.TimeSeries;

double[] quarterly = [10.0, 14.0, 8.0, 12.0, 11.0, 15.0, 9.0, 13.0, 12.0, 16.0, 10.0, 14.0];

SeasonalComponents parts = SeasonalDecomposition.Decompose(quarterly, period: 4);
double secondQuarter = parts.Seasonal[1];   // 3.125

Parity

Replayed against statsmodels.tsa. docs/equivalence.md maps each Python call to its C# counterpart, with every deliberate divergence.

Dependencies

A core package (decision 0003), built for net10.0 and netstandard2.0:

  • Lodestar.Stats 0.5.0 or later
  • Lodestar.Stats.Regression 0.2.0 or later
  • Lodestar.Abstractions 0.2.0 or later

Documentation