Merge commit 'origin/stable'
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 23 Jul 2009 06:15:20 +0000 (08:15 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 23 Jul 2009 06:15:20 +0000 (08:15 +0200)
Conflicts:

src/language/stats/t-test.q

1  2 
src/data/por-file-reader.c
src/data/sys-file-reader.c
src/language/data-io/data-parser.c
src/language/stats/t-test.q
tests/automake.mk

Simple merge
Simple merge
Simple merge
index 09a96cfc194930b3cc063c77056622c91455237b,c69a6cdb5bc5adb552afedbc209030d6ada3b12b..d02cdb28d21597a087f51640762de88573c33a3b
@@@ -958,26 -1259,30 +958,26 @@@ trbox_paired_populate (struct trbox *tr
  
        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);
      }
  }
  
Simple merge