IMSL C# Numerical Library

ContingencyTable.GetStatistics Method 

Returns the statistics associated with this table.

public double[,] GetStatistics();

Return Value

A double matrix of size 23 * 5 containing statistics associated with this table.

Remarks

Each row corresponds to a statistic.

Row Statistics
0 gamma
1 Kendall's \tau_b
2 Stuart's \tau_c
3 Somers' D for rows (given columns)
4 Somers' D for columns (given rows)
5 product moment correlation
6 Spearman rank correlation
7 Goodman and Kruskal \tau for rows (given columns)
8 Goodman and Kruskal \tau for columns (given rows)
9 uncertainty coefficient U (symmetric)
10 uncertainty U_{r|c} (rows)
11 uncertainty U_{c|r} (columns)
12 optimal prediction \lambda (symmetric)
13 optimal prediction \lambda_{r|c} (rows)
14 optimal prediction \lambda_{c|r} (columns)
15 optimal prediction \lambda^*_{r|c} (rows)
16 optimal prediction \lambda^*_{c|r} (columns)
17 Test for linear trend in row probabilities if table.GetLength(0) = 2. Test for linear trend in column probabilities if table.GetLength(1) = 2 and table.GetLength(0) is not 2
18 Kruskal-Wallis test for no row effect
19 Kruskal-Wallis test for no column effect
20 kappa (square tables only)
21 McNemar test of symmetry (square tables only)
22 McNemar one degree of freedom test of symmetry (square tables only)

The columns are as follows:

Column Value
0 estimated statistic
1 standard error for any parameter value
2 standard error under the null hypothesis
3 t value for testing the null hypothesis
4 p-value of the test in column 3

If a statistic cannot be computed, or if some value is not relevant for the computed statistic, the entry is NaN (Not a Number).

In the McNemar tests, column 0 contains the statistic, column 1 contains the chi-squared degrees of freedom, column 3 contains the exact p-value (1 degree of freedom only), and column 4 contains the chi-squared asymptotic p-value. The Kruskal-Wallis test is the same except no exact p-value is computed.

See Also

ContingencyTable Class | Imsl.Stat Namespace