t = gsl_cdf_tdist_Qinv (q, df);
- tab_double (trb->t, 5, i+3, TAB_RIGHT,
- pairs[i].mean_diff - t * se_mean , NULL);
+ tab_double (trb->t, 5, i + 3, TAB_RIGHT,
+ pair->mean_diff - t * se_mean, NULL);
+ tab_double (trb->t, 6, i + 3, TAB_RIGHT,
+ pair->mean_diff + t * se_mean, NULL);
- tab_double (trb->t, 6, i+3, TAB_RIGHT,
- pairs[i].mean_diff + t * se_mean , NULL);
+ t = ((pair->mean[0] - pair->mean[1])
+ / sqrt ((pow2 (pair->s_std_dev[0]) + pow2 (pair->s_std_dev[1])
+ - (2 * pair->correlation
+ * pair->s_std_dev[0] * pair->s_std_dev[1]))
+ / (n - 1)));
- t = (pairs[i].mean[0] - pairs[i].mean[1])
- / sqrt (
- ( pow2 (pairs[i].s_std_dev[0]) + pow2 (pairs[i].s_std_dev[1]) -
- 2 * pairs[i].correlation *
- pairs[i].s_std_dev[0] * pairs[i].s_std_dev[1] )
- / (n - 1)
- );
-
- tab_double (trb->t, 7, i+3, TAB_RIGHT, t, NULL);
+ tab_double (trb->t, 7, i + 3, TAB_RIGHT, t, NULL);
/* Degrees of freedom */
- tab_double (trb->t, 8, i+3, TAB_RIGHT, df, wfmt);
+ tab_double (trb->t, 8, i + 3, TAB_RIGHT, df, &proc->weight_format);
- p = gsl_cdf_tdist_P (t, df);
- q = gsl_cdf_tdist_P (t, df);
+ p = gsl_cdf_tdist_P (t,df);
+ q = gsl_cdf_tdist_Q (t,df);
- tab_double (trb->t, 9, i+3, TAB_RIGHT, 2.0* (t>0?q:p), NULL);
-
+ tab_double (trb->t, 9, i + 3, TAB_RIGHT, 2.0 * (t > 0 ? q : p), NULL);
}
}