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 : float | NDVar

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