Mercurial > hg > octave-terminal
changeset 10680:e00de2d5263c
Replace calls to obsolete chisquare_cdf with chi2cdf.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 03 Jun 2010 21:52:11 -0700 |
parents | ca6d8a38d298 |
children | 0ba9bd294421 |
files | scripts/ChangeLog scripts/signal/arch_test.m scripts/statistics/distributions/chi2pdf.m scripts/statistics/tests/bartlett_test.m scripts/statistics/tests/chisquare_test_homogeneity.m scripts/statistics/tests/chisquare_test_independence.m scripts/statistics/tests/manova.m scripts/statistics/tests/mcnemar_test.m scripts/statistics/tests/run_test.m |
diffstat | 9 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,12 @@ +2010-06-03 Alois Schlögl + + * signal/arch_test.m, statistics/tests/bartlett_test.m, + statistics/tests/chisquare_test_homogeneity.m, + statistics/tests/chisquare_test_independence.m, + statistics/tests/manova.m, statistics/tests/mcnemar_test.m, + statistics/tests/run_test.m, statistics/distributions/chi2pdf.m: + Replace calls to obsolete chisquare_cdf with chi2cdf. + 2010-06-03 Rik <octave@nomad.inbox5.com> * plot/private/__plt__.m: Add newline to usage message.
--- a/scripts/signal/arch_test.m +++ b/scripts/signal/arch_test.m @@ -92,6 +92,6 @@ f = e.^2 / v_b - ones (T, 1); f = Z' * f; lm = f' * inv (Z'*Z) * f / 2; - pval = 1 - chisquare_cdf (lm, p); + pval = 1 - chi2cdf (lm, p); endfunction
--- a/scripts/statistics/distributions/chi2pdf.m +++ b/scripts/statistics/distributions/chi2pdf.m @@ -17,7 +17,7 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} chisquare_pdf (@var{x}, @var{n}) +## @deftypefn {Function File} {} chi2pdf (@var{x}, @var{n}) ## For each element of @var{x}, compute the probability density function ## (PDF) at @var{x} of the chisquare distribution with @var{n} degrees ## of freedom.
--- a/scripts/statistics/tests/bartlett_test.m +++ b/scripts/statistics/tests/bartlett_test.m @@ -59,7 +59,7 @@ c = 1 + (sum (1 ./ f) - 1 / f_tot) / (3 * (k - 1)); chisq = (f_tot * log (v_tot) - sum (f .* log (v))) / c; df = k; - pval = 1 - chisquare_cdf (chisq, df); + pval = 1 - chi2cdf (chisq, df); if (nargout == 0) printf(" pval: %g\n", pval);
--- a/scripts/statistics/tests/chisquare_test_homogeneity.m +++ b/scripts/statistics/tests/chisquare_test_homogeneity.m @@ -60,7 +60,7 @@ y = reshape (y, l_y, 1); n_y = sum(y * ones (1, df+1) < ones (l_y, 1) * c); chisq = l_x * l_y * sum ((n_x/l_x - n_y/l_y).^2 ./ (n_x + n_y)); - pval = 1 - chisquare_cdf (chisq, df); + pval = 1 - chi2cdf (chisq, df); if (nargout == 0) printf(" pval: %g\n", pval);
--- a/scripts/statistics/tests/chisquare_test_independence.m +++ b/scripts/statistics/tests/chisquare_test_independence.m @@ -45,7 +45,7 @@ Y = sum (X')' * sum (X) / n; X = (X - Y) .^2 ./ Y; chisq = sum (sum (X)); - pval = 1 - chisquare_cdf (chisq, df); + pval = 1 - chi2cdf (chisq, df); if (nargout == 0) printf(" pval: %g\n", pval);
--- a/scripts/statistics/tests/manova.m +++ b/scripts/statistics/tests/manova.m @@ -97,7 +97,7 @@ delta = n_w + n_b - (p + n_b + 1) / 2 df_num = p * n_b - W_pval_1 = 1 - chisquare_cdf (- delta * log (Lambda), df_num); + W_pval_1 = 1 - chi2cdf (- delta * log (Lambda), df_num); if (p < 3) eta = p;