comparison scripts/statistics/tests/manova.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
134 PB = sum (l ./ (1 + l)); 134 PB = sum (l ./ (1 + l));
135 135
136 df_den = theta * (2 * v + theta + 1); 136 df_den = theta * (2 * v + theta + 1);
137 PB_pval = 1 - fcdf (PB * df_den / df_num, df_num, df_den); 137 PB_pval = 1 - fcdf (PB * df_den / df_num, df_num, df_den);
138 138
139 fprintf ("\n"); 139 printf ("\n");
140 fprintf ("One-way MANOVA Table:\n"); 140 printf ("One-way MANOVA Table:\n");
141 fprintf ("\n"); 141 printf ("\n");
142 fprintf ("Test Test Statistic Approximate p\n"); 142 printf ("Test Test Statistic Approximate p\n");
143 fprintf ("**************************************************\n"); 143 printf ("**************************************************\n");
144 fprintf ("Wilks %10.4f %10.9f \n", Lambda, W_pval_1); 144 printf ("Wilks %10.4f %10.9f \n", Lambda, W_pval_1);
145 fprintf (" %10.9f \n", W_pval_2); 145 printf (" %10.9f \n", W_pval_2);
146 fprintf ("Hotelling-Lawley %10.4f %10.9f \n", HL, HL_pval); 146 printf ("Hotelling-Lawley %10.4f %10.9f \n", HL, HL_pval);
147 fprintf ("Pillai-Bartlett %10.4f %10.9f \n", PB, PB_pval); 147 printf ("Pillai-Bartlett %10.4f %10.9f \n", PB, PB_pval);
148 fprintf ("\n"); 148 printf ("\n");
149 149
150 endif 150 endif
151 151
152 fprintf ("\n"); 152 printf ("\n");
153 fprintf ("MANOVA Results:\n"); 153 printf ("MANOVA Results:\n");
154 fprintf ("\n"); 154 printf ("\n");
155 fprintf ("# of groups: %d\n", k); 155 printf ("# of groups: %d\n", k);
156 fprintf ("# of samples: %d\n", n); 156 printf ("# of samples: %d\n", n);
157 fprintf ("# of variables: %d\n", p); 157 printf ("# of variables: %d\n", p);
158 fprintf ("\n"); 158 printf ("\n");
159 fprintf ("Wilks' Lambda: %5.4f\n", Lambda); 159 printf ("Wilks' Lambda: %5.4f\n", Lambda);
160 fprintf ("Approximate p: %10.9f (chisquare approximation)\n", W_pval_1); 160 printf ("Approximate p: %10.9f (chisquare approximation)\n", W_pval_1);
161 fprintf (" %10.9f (F approximation)\n", W_pval_2); 161 printf (" %10.9f (F approximation)\n", W_pval_2);
162 fprintf ("\n"); 162 printf ("\n");
163 163
164 endfunction 164 endfunction
165 165