- tab_text (table, 2, 2 + v * 3, TAB_NONE,
- var_get_value_name (var, cat2[v].value));
-
- /* Observed N */
- tab_float (table, 3, 1 + v * 3, TAB_NONE,
- cat1[v].count, 8, 0);
-
- tab_float (table, 3, 2 + v * 3, TAB_NONE,
- cat2[v].count, 8, 0);
-
- n_total = cat1[v].count + cat2[v].count;
-
-
- tab_float (table, 3, 3 + v * 3, TAB_NONE,
- n_total, 8, 0);
-
- /* Observed Proportions */
-
- tab_float (table, 4, 1 + v * 3, TAB_NONE,
- cat1[v].count / n_total, 8, 3);
-
- tab_float (table, 4, 2 + v * 3, TAB_NONE,
- cat2[v].count / n_total, 8, 3);
-
- tab_float (table, 4, 3 + v * 3, TAB_NONE,
- (cat1[v].count + cat2[v].count) / n_total, 8, 2);
-
-
- /* Significance */
- sig = calculate_binomial (cat1[v].count, cat2[v].count,
- bst->p);
-
- tab_float (table, 6, 1 + v * 3, TAB_NONE,
- sig, 8, 3);
+ if ( bst->cutpoint != SYSMIS)
+ {
+ ds_put_format (&catstr[0], "<= %g", bst->cutpoint);
+ }
+ else
+ {
+ var_append_value_name (var, &cat[0][v].value, &catstr[0]);
+ var_append_value_name (var, &cat[1][v].value, &catstr[1]);
+ }
+
+ tab_hline (table, TAL_1, 0, tab_nc (table) -1, 1 + v * 3);
+
+ /* Titles */
+ tab_text (table, 0, 1 + v * 3, TAB_LEFT, var_to_string (var));
+ tab_text (table, 1, 1 + v * 3, TAB_LEFT, _("Group1"));
+ tab_text (table, 1, 2 + v * 3, TAB_LEFT, _("Group2"));
+ tab_text (table, 1, 3 + v * 3, TAB_LEFT, _("Total"));
+
+ /* Test Prop */
+ tab_double (table, 5, 1 + v * 3, TAB_NONE, bst->p, NULL);
+
+ /* Category labels */
+ tab_text (table, 2, 1 + v * 3, TAB_NONE, ds_cstr (&catstr[0]));
+ tab_text (table, 2, 2 + v * 3, TAB_NONE, ds_cstr (&catstr[1]));
+
+ /* Observed N */
+ tab_double (table, 3, 1 + v * 3, TAB_NONE, cat[0][v].count, wfmt);
+ tab_double (table, 3, 2 + v * 3, TAB_NONE, cat[1][v].count, wfmt);
+
+ n_total = cat[0][v].count + cat[1][v].count;
+ tab_double (table, 3, 3 + v * 3, TAB_NONE, n_total, wfmt);
+
+ /* Observed Proportions */
+ tab_double (table, 4, 1 + v * 3, TAB_NONE,
+ cat[0][v].count / n_total, NULL);
+ tab_double (table, 4, 2 + v * 3, TAB_NONE,
+ cat[1][v].count / n_total, NULL);
+
+ tab_double (table, 4, 3 + v * 3, TAB_NONE,
+ (cat[0][v].count + cat[1][v].count) / n_total, NULL);
+
+ /* Significance */
+ sig = calculate_binomial (cat[0][v].count, cat[1][v].count, bst->p);
+ tab_double (table, 6, 1 + v * 3, TAB_NONE, sig, NULL);
+
+ ds_destroy (&catstr[0]);
+ ds_destroy (&catstr[1]);
+ }
+
+ tab_text (table, 2, 0, TAB_CENTER, _("Category"));
+ tab_text (table, 3, 0, TAB_CENTER, _("N"));
+ tab_text (table, 4, 0, TAB_CENTER, _("Observed Prop."));
+ tab_text (table, 5, 0, TAB_CENTER, _("Test Prop."));
+
+ tab_text_format (table, 6, 0, TAB_CENTER,
+ _("Exact Sig. (%d-tailed)"),
+ bst->p == 0.5 ? 2 : 1);
+
+ tab_vline (table, TAL_2, 2, 0, tab_nr (table) -1);
+ tab_submit (table);