comparison scripts/statistics/tests/anova.m @ 21634:96518f623c91

Backed out changeset dcf8922b724b
author Mike Miller <mtmiller@octave.org>
date Wed, 20 Apr 2016 11:06:03 -0700
parents dcf8922b724b
children bac0d6f07a3e
comparison
equal deleted inserted replaced
21633:dcf8922b724b 21634:96518f623c91
91 f = v_b / v_w; 91 f = v_b / v_w;
92 pval = 1 - fcdf (f, df_b, df_w); 92 pval = 1 - fcdf (f, df_b, df_w);
93 93
94 if (nargout == 0) 94 if (nargout == 0)
95 ## This eventually needs to be done more cleanly ... 95 ## This eventually needs to be done more cleanly ...
96 fprintf ("\n"); 96 printf ("\n");
97 fprintf ("One-way ANOVA Table:\n"); 97 printf ("One-way ANOVA Table:\n");
98 fprintf ("\n"); 98 printf ("\n");
99 fprintf ("Source of Variation Sum of Squares df Empirical Var\n"); 99 printf ("Source of Variation Sum of Squares df Empirical Var\n");
100 fprintf ("*********************************************************\n"); 100 printf ("*********************************************************\n");
101 fprintf ("Between Groups %15.4f %4d %13.4f\n", SSB, df_b, v_b); 101 printf ("Between Groups %15.4f %4d %13.4f\n", SSB, df_b, v_b);
102 fprintf ("Within Groups %15.4f %4d %13.4f\n", SSW, df_w, v_w); 102 printf ("Within Groups %15.4f %4d %13.4f\n", SSW, df_w, v_w);
103 fprintf ("---------------------------------------------------------\n"); 103 printf ("---------------------------------------------------------\n");
104 fprintf ("Total %15.4f %4d\n", SST, n - 1); 104 printf ("Total %15.4f %4d\n", SST, n - 1);
105 fprintf ("\n"); 105 printf ("\n");
106 fprintf ("Test Statistic f %15.4f\n", f); 106 printf ("Test Statistic f %15.4f\n", f);
107 fprintf ("p-value %15.4f\n", pval); 107 printf ("p-value %15.4f\n", pval);
108 fprintf ("\n"); 108 printf ("\n");
109 endif 109 endif
110 110
111 endfunction 111 endfunction
112 112