corrcoef

typhon.math.stats.corrcoef(mat)[source]

Calculate correlation coefficient with p-values

Calculate correlation coefficients along with p-values.

Parameters:

mat (ndarray) – 2-D array [p×N] for which the correlation matrix is calculated

Returns:

(r, p) where r is a p×p matrix with the correlation coefficients, obtained with numpy.corrcoef, and p is

Attribution:

this code, or an earlier version was posted by user ‘jingchao’ on Stack Overflow at 2014-7-3 at http://stackoverflow.com/a/24547964/974555 and is licensed under CC BY-SA 3.0. This notice may not be removed.