eelbrain.correlation_coefficient(x, y, dim=None, name=None)

Correlation between two NDVars along a specific dimension

  • x (NDVar) – First variable.

  • y (NDVar) – Second variable.

  • dim (str | tuple of str) – Dimension over which to compute correlation (by default all shared dimensions).

  • name (str) – Name for output variable.


Correlation coefficient over dim. Any other dimensions in x and y are retained in the output.

Return type:

float | NDVar