Mercurial > octave-nkf
diff scripts/statistics/tests/chisquare_test_homogeneity.m @ 3456:434790acb067
[project @ 2000-01-19 06:58:51 by jwe]
author | jwe |
---|---|
date | Wed, 19 Jan 2000 06:59:23 +0000 |
parents | d8b731d3f7a3 |
children | e031284eea27 |
line wrap: on
line diff
--- a/scripts/statistics/tests/chisquare_test_homogeneity.m Tue Jan 18 19:57:13 2000 +0000 +++ b/scripts/statistics/tests/chisquare_test_homogeneity.m Wed Jan 19 06:59:23 2000 +0000 @@ -31,8 +31,8 @@ ## If no output argument is given, the p-value is displayed. ## @end deftypefn -## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> -## Description: Chi-square test for homogeneity +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Description: Chi-square test for homogeneity function [pval, chisq, df] = chisquare_test_homogeneity (x, y, c) @@ -46,7 +46,7 @@ ## Now test c for strictly increasing entries df = length (c); if (any ( (c(2 : df) - c(1 : (df - 1))) <= 0)) - error ("chisquare_test_homogeneity: c must be increasing"); + error ("chisquare_test_homogeneity: c must be increasing"); endif c = [(reshape (c, 1, df)), Inf]; @@ -60,7 +60,7 @@ pval = 1 - chisquare_cdf (chisq, df); if (nargout == 0) - printf(" pval: %g\n", pval); + printf(" pval: %g\n", pval); endif endfunction