+/* Directional measures. */
+static struct pivot_table *
+create_direct_table (struct crosstabulation *xt)
+{
+ struct pivot_table *direct = pivot_table_create (N_("Directional Measures"));
+ pivot_table_set_weight_format (direct, &xt->weight_format);
+ direct->omit_empty = true;
+
+ pivot_dimension_create (
+ direct, PIVOT_AXIS_COLUMN, N_("Values"),
+ N_("Value"), PIVOT_RC_OTHER,
+ N_("Asymp. Std. Error"), PIVOT_RC_OTHER,
+ N_("Approx. T"), PIVOT_RC_OTHER,
+ N_("Approx. Sig."), PIVOT_RC_SIGNIFICANCE);
+
+ struct pivot_dimension *statistics = pivot_dimension_create (
+ direct, PIVOT_AXIS_ROW, N_("Statistics"));
+ struct pivot_category *nn = pivot_category_create_group (
+ statistics->root, N_("Nominal by Nominal"));
+ create_direct_stat (nn, xt, N_("Lambda"), true);
+ create_direct_stat (nn, xt, N_("Goodman and Kruskal tau"), false);
+ create_direct_stat (nn, xt, N_("Uncertainty Coefficient"), true);
+ struct pivot_category *oo = pivot_category_create_group (
+ statistics->root, N_("Ordinal by Ordinal"));
+ create_direct_stat (oo, xt, N_("Somers' d"), true);
+ struct pivot_category *ni = pivot_category_create_group (
+ statistics->root, N_("Nominal by Interval"));
+ create_direct_stat (ni, xt, N_("Eta"), false);
+
+ for (size_t i = 2; i < xt->n_vars; i++)
+ add_var_dimension (direct, &xt->vars[i], PIVOT_AXIS_ROW, false);
+
+ return direct;