pyhctsa.operations.correlation.nonlinear_autocorr_excess

pyhctsa.operations.correlation.nonlinear_autocorr_excess(y, taus, gaussian_rank=True, tau=1)

Nonlinear autocorrelation in excess of its Gaussian value.

A variant of nonlinear_autocorr() [2] (with absval=False) that subtracts the value the same product would have for a Gaussian process with the series’ own autocovariance, and (by default) works on Gaussian ranks. It then responds to nonlinear temporal dependence rather than to the linear autocorrelation, which sets the original’s value for Gaussian data through Isserlis’ theorem [1], or to the marginal distribution. It returns

\[E = \left\langle g_t \prod_{k=1}^{m} g_{t-\tau_k} \right\rangle - \sum_{\text{pairings } P} \prod_{(i, j) \in P} \hat{c}(|\tau_i - \tau_j|),\]

with \(\tau_0 = 0\), the sum running over all ways of splitting the \(m + 1\) factors into pairs (zero for an odd number of factors), and \(\hat{c}(k) = \frac{1}{N} \sum_t g_t g_{t-k}\) the sample autocovariance of \(g\). Here \(g\) is the series mapped onto Gaussian ranks (each value replaced by \(\Phi^{-1}((r - 1/2)/N)\), \(r\) its rank, then z-scored), or the (z-scored) input itself if gaussian_rank=False. For three or four factors \(E\) is the joint cumulant of the factors, e.g. for taus = [1, 1, 2], \(E = \langle g_t g_{t-1}^2 g_{t-2} \rangle - (2 \hat{c}(1)^2 + \hat{c}(0)\hat{c}(2))\); for more factors it is the moment minus its Gaussian value. Its expectation is zero for any Gaussian process and, with the rank transform, for any strictly increasing transform of one. Joint cumulants, which vanish for Gaussian processes, are the basis of higher-order spectral analysis and of tests of Gaussianity and linearity [3] [4]. With an odd number of factors the Gaussian value is zero and \(E\) measures asymmetry in time, as trev() does. Estimates with many factors need long series and, on non-stationary data, vary along the series. Configurations with an even number of factors also vary with the timescale of the series.

Parameters:
y : array-like

The input time series (z-scored, as for nonlinear_autocorr(), when gaussian_rank=False).

taus : array-like of int

The non-negative lags \(\tau_1, ..., \tau_m\) of the factors other than \(x_t\), as in nonlinear_autocorr() (repeats allowed: [1, 1, 2] is \(\langle x_t x_{t-1}^2 x_{t-2} \rangle\)). With a single lag the excess is zero by construction.

gaussian_rank : bool, optional

Compute the statistic on the Gaussian ranks of the series (default True), so that it depends on the data only through their ranks (unchanged by strictly increasing transformations).

tau : int or str, optional

The unit of the lags, in samples: an integer, or a rule for get_tau() (e.g. 'ac1e') applied to the analysed series (the Gaussian ranks, with gaussian_rank), so that the result stays rank-invariant. The lags are tau * taus, over every time point (all tau phases of the series sampled every tau samples). Default 1. NaN when a rule cannot set the delay.

Returns:

The excess nonlinear autocorrelation (NaN if the series is not longer than the largest lag, or, with gaussian_rank, if all its values are tied).

Return type:

float

References