Functions > Statistics > Descriptive Statistics > Correlation and Contingency Tables
Correlation and Contingency Tables
Spear(v1, v2)—Returns Spearman's rank correlation coefficient, and associated statistics, for two sets of sample stored in vectors v1 and v2.
The vector returned by Spear has the following elements:
Element
Description
0
The sum squared difference of ranks, D.
1
The number of standard deviations by which D deviates from the expected value under the null hypothesis.
2
The probability that this value, or one larger in absolute value, would occur for uncorrelated samples.
3
Spearman's rank-order correlation coefficient, rs.
4
The probability that a value equal to or greater than the absolute value of rs would occur for uncorrelated samples.
kendltau(v1, v2)—Returns Kendall's tau, the number of standard deviations from 0 for this value, and the probability that a value this large or larger would occur if the samples stored in vectors v1 and v2 were uncorrelated.
kendltau2(M)—Returns Kendall's tau, the number of standard deviations from 0 for this value, and the probability that a value this large or larger would occur if contingency table M was uncorrelated.
contingtbl(M)—Returns chi-squared, the degrees of freedom, the probability that chi-squared or larger would occur if variables had no association, Cramer's V, and the contingency coefficient C for a contingency table M.
Arguments
v1, v2 are real vectors of equal length.
M is a real matrix.
Was this helpful?