+static void
+show_aic (const struct cmd_factor *factor, const struct idata *idata)
+{
+ struct tab_table *t ;
+ size_t i;
+
+ const int heading_rows = 1;
+ const int heading_columns = 2;
+
+ const int nc = heading_columns + factor->n_vars;
+ const int nr = heading_rows + 2 * factor->n_vars;
+
+ if ((factor->print & PRINT_AIC) == 0)
+ return;
+
+ t = tab_create (nc, nr);
+
+ tab_title (t, _("Anti-Image Matrices"));
+
+ tab_hline (t, TAL_1, 0, nc - 1, heading_rows);
+
+ tab_headers (t, heading_columns, 0, heading_rows, 0);
+
+ tab_vline (t, TAL_2, 2, 0, nr - 1);
+
+ /* Outline the box */
+ tab_box (t,
+ TAL_2, TAL_2,
+ -1, -1,
+ 0, 0,
+ nc - 1, nr - 1);
+
+ /* Vertical lines */
+ tab_box (t,
+ -1, -1,
+ -1, TAL_1,
+ heading_columns, 0,
+ nc - 1, nr - 1);
+
+
+ for (i = 0; i < factor->n_vars; ++i)
+ tab_text (t, heading_columns + i, 0, TAT_TITLE, var_to_string (factor->vars[i]));
+
+ tab_text (t, 0, heading_rows, TAT_TITLE, _("Anti-image Covariance"));
+ tab_hline (t, TAL_1, 0, nc - 1, heading_rows + factor->n_vars);
+ tab_text (t, 0, heading_rows + factor->n_vars, TAT_TITLE, _("Anti-image Correlation"));
+
+ for (i = 0; i < factor->n_vars; ++i)
+ {
+ tab_text (t, 1, i + heading_rows, TAT_TITLE,
+ var_to_string (factor->vars[i]));
+
+ tab_text (t, 1, factor->n_vars + i + heading_rows, TAT_TITLE,
+ var_to_string (factor->vars[i]));
+ }
+
+ for (i = 0; i < factor->n_vars; ++i)
+ {
+ int j;
+ for (j = 0; j < factor->n_vars; ++j)
+ {
+ tab_double (t, heading_columns + i, heading_rows + j, 0,
+ gsl_matrix_get (idata->ai_cov, i, j), NULL, RC_OTHER);
+ }
+
+
+ for (j = 0; j < factor->n_vars; ++j)
+ {
+ tab_double (t, heading_columns + i, factor->n_vars + heading_rows + j, 0,
+ gsl_matrix_get (idata->ai_cor, i, j), NULL, RC_OTHER);
+ }
+ }
+
+ tab_submit (t);
+}