+
+ tab_float(self->t, 2, i*2+3, TAB_CENTER,
+ cmd->v_variables[i]->p.t_t.levene, 8,3);
+
+
+ /* Now work out the significance of the Levene test */
+
+ which=1; df1 = 1; df2 = cmd->v_variables[i]->p.t_t.ugs.n - 2;
+ cdff(&which,&p,&q,&cmd->v_variables[i]->p.t_t.levene,
+ &df1,&df2,&status,&bound);
+
+ if ( 0 != status )
+ {
+ msg( SE, _("Error calculating F statistic (cdff returned %d)."),status);
+ }
+
+ tab_float(self->t, 3, i*2+3, TAB_CENTER, q, 8,3 );
+
+ df = gs0->n + gs1->n - 2.0 ;
+ tab_float (self->t, 5, i*2+3, TAB_RIGHT, df, 2, 0);
+
+ pooled_variance = ( (gs0->n )*sqr(gs0->s_std_dev)
+ +
+ (gs1->n )*sqr(gs1->s_std_dev)
+ ) / df ;
+
+ t = (gs0->mean - gs1->mean) / sqrt(pooled_variance) ;
+ t /= sqrt((gs0->n + gs1->n)/(gs0->n*gs1->n));
+
+ tab_float (self->t, 4, i*2+3, TAB_RIGHT, t, 8, 3);
+
+
+ which=1; /* get p & q from t & df */
+ cdft(&which, &p, &q, &t, &df, &status, &bound);
+ if ( 0 != status )
+ {
+ msg( SE, _("Error calculating T statistic (cdft returned %d)."),status);
+ }
+
+ tab_float(self->t, 6, i*2+3, TAB_RIGHT, 2.0*(t>0?q:p) , 8, 3);
+
+ mean_diff = gs0->mean - gs1->mean;
+ tab_float(self->t, 7, i*2+3, TAB_RIGHT, mean_diff, 8, 3);
+
+
+ std_err_diff = sqrt( sqr(gs0->se_mean) + sqr(gs1->se_mean));
+ tab_float(self->t, 8, i*2+3, TAB_RIGHT, std_err_diff, 8, 3);
+
+
+ /* Now work out the confidence interval */
+ q = (1 - cmd->criteria)/2.0; /* 2-tailed test */
+ p = 1 - q ;
+ which=2; /* Calc T from p,q and df */
+ cdft(&which, &p, &q, &t, &df, &status, &bound);
+ if ( 0 != status )
+ {
+ msg( SE, _("Error calculating T statistic (cdft returned %d)."),status);
+ }
+
+ tab_float(self->t, 9, i*2+3, TAB_RIGHT,
+ mean_diff - t * std_err_diff, 8, 3);
+
+ tab_float(self->t, 10, i*2+3, TAB_RIGHT,
+ mean_diff + t * std_err_diff, 8, 3);
+
+
+ {
+ double se2;
+ /* Now for the \sigma_1 != \sigma_2 case */