I would like to calculate the somers d. I have the following input cross table in python as a data frame called crosstab:
0 | 1 | 2 | 3 | 4 |
---|---|---|---|---|
100 | 80 | 100 | 4 | 500 |
50 | 3 | 2 | 0 | 38 |
40 | 0 | 4 | 0 | 40 |
2000 | 100 | 100 | 4 | 400 |
I try to calculate the sommers d and get the following error message:
from scipy.stats import somersd
somersd(crosstab)
TypeError
: Invalid call to pythranized function `_concordant_pairs(int64[:, :] (with unsupported column-major layout))' Candidates are: - _concordant_pairs(int[:,:]) - _concordant_pairs(float[:,:])
Where is my mistake?