dirconn.analytic_pdc_test#

dirconn.analytic_pdc_test(estimator: PDC, data: TimeSeries, *, alpha: float = 0.05) → AsymptoticTestResult#

Test PDC at every frequency with its asymptotic distribution (Schelter et al. 2006).

In the paper’s indices (i target, j source) the squared PDC |pi_ij(f)|^2 is significant at level alpha when:

|pi_ij(f)|^2 > C_ij(f) chi2_{1, 1-alpha} / (N sum_k |Abar_kj(f)|^2),

with C_ij(f) from dirconn.methods.spectral.pdc_null_scale(). The statistic is N |Abar_ij(f)|^2 / C_ij(f); it does not depend on the scale of the channels, so the p-values are the same with and without standardize, while the threshold on the PDC values is not. For squared=False the threshold is the square root; the p-values are unchanged.

Parameters:
  • estimator (PDC) – Must have ridge=0. Its frequency grid is the tested family; give it the freqs or fmax of a band to test only that band.

  • data (TimeSeries) – Input data.

  • alpha (float) – Level of the threshold and default level for AsymptoticTestResult.significant().

Return type:

AsymptoticTestResult

Raises:
  • TypeError – If estimator is not a PDC (gPDC included).

  • ValueError – With a ridge penalty.