comparison scripts/statistics/tests/cor_test.m @ 10606:ec34c7acd057

Replace deprecated function calls in statistics tests Patch provided by Alois Schlögl.
author Rik <octave@nomad.inbox5.com>
date Wed, 05 May 2010 21:14:18 -0700
parents 1bf0ce0930be
children 693e22af08ae
comparison
equal deleted inserted replaced
10605:1834132fb50b 10606:ec34c7acd057
91 df = n - 2; 91 df = n - 2;
92 t.method = "Pearson's product moment correlation"; 92 t.method = "Pearson's product moment correlation";
93 t.params = df; 93 t.params = df;
94 t.stat = sqrt (df) .* r / sqrt (1 - r.^2); 94 t.stat = sqrt (df) .* r / sqrt (1 - r.^2);
95 t.dist = "t"; 95 t.dist = "t";
96 cdf = t_cdf (t.stat, df); 96 cdf = tcdf (t.stat, df);
97 elseif (m == "k") 97 elseif (m == "k")
98 tau = kendall (X, Y); 98 tau = kendall (X, Y);
99 t.method = "Kendall's rank correlation tau"; 99 t.method = "Kendall's rank correlation tau";
100 t.params = []; 100 t.params = [];
101 t.stat = tau / sqrt ((2 * (2*n+5)) / (9*n*(n-1))); 101 t.stat = tau / sqrt ((2 * (2*n+5)) / (9*n*(n-1)));