/* test24.c */
#include <stdio.h>
#include "sslib.h"
int main(void)
{
int l, m, n, nua, nub, nue, nut;
static int nn[5] = { 10, 8, 9, 10, 10 };
static double x[50] =
{ 15.1, 14.8, 15.0, 14.7, 14.0, 13.8, 14.8, 15.5, 14.1, 14.4,
14.4, 14.3, 13.8, 15.9, 14.1, 14.6, 14.0, 14.4, 0.0, 0.0,
13.2, 13.8, 14.5, 13.6, 12.7, 13.4, 13.7, 14.4, 13.0, 0.0,
13.4, 14.6, 12.9, 13.7, 14.0, 13.1, 12.0, 14.1, 14.5, 13.3,
14.1, 13.9, 14.5, 13.8, 14.8, 16.0, 14.6, 14.4, 15.3, 15.1 };
static double x2[12] =
{ 39.2, 41.8, 38.6, 37.4, 40.4, 42.1, 40.5, 41.3, 43.6, 44.9, 42.2, 42.2 };
double al, sa, sb, se, st, va, vb, ve, f, fa, fb, f0, f0a, f0b;
l = 10;
m = 5;
al = 0.05;
aov1(x, nn, l, m, al, &sa, &se, &st, &nua, &nue, &nut, &va, &ve, &f0, &f);
printf("test results from aov1 !\n");
printf(" S nu V F0\n");
printf("factor(a) %7.3f %3d %7.3f %7.3f\n", sa,nua, va, f0);
printf("factor(e) %7.3f %3d %7.3f\n",se, nue, ve);
printf("total %7.3f %3d\n", st, nut);
printf(" f(%4.2f) = %7.3f\n", al, f);
l = n = 4;
m = 3;
al = 0.05;
aov2(x2, l, m, n, al, &sa, &sb, &se, &st, &nua, &nub, &nue, &nut,
&va, &vb, &ve, &f0a, &f0b, &fa, &fb);
printf("\ntest results from aov2 !\n");
printf(" S nu V F0\n");
printf("factor(a) %7.3f %3d %7.3f %7.3f\n", sa, nua, va, f0a);
printf("factor(b) %7.3f %3d %7.3f %7.3f\n", sb, nub, vb, f0b);
printf("factor(e) %7.3f %3d %7.3f\n", se, nue, ve);
printf("total %7.3f %3d\n", st, nut);
printf(" fa(%4.2f) = %7.3f\n", al, fa);
printf(" fb(%4.2f) = %7.3f\n", al, fb);
return 1;
}
|