+static void
+show_factor_correlation (const struct cmd_factor * factor, const gsl_matrix *fcm)
+{
+ size_t i, j;
+ const int heading_columns = 1;
+ const int heading_rows = 1;
+ const int nr = heading_rows + fcm->size2;
+ const int nc = heading_columns + fcm->size1;
+ struct tab_table *t = tab_create (nc, nr);
+
+ tab_title (t, _("Factor Correlation Matrix"));
+
+ tab_headers (t, heading_columns, 0, heading_rows, 0);
+
+ /* 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);
+
+ tab_hline (t, TAL_1, 0, nc - 1, heading_rows);
+ tab_hline (t, TAL_1, 1, nc - 1, 1);
+
+ tab_vline (t, TAL_2, heading_columns, 0, nr - 1);
+
+
+ if ( factor->extraction == EXTRACTION_PC)
+ tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Component"));
+ else
+ tab_text (t, 0, 0, TAB_LEFT | TAT_TITLE, _("Factor"));
+
+ for (i = 0 ; i < fcm->size1; ++i)
+ {
+ tab_text_format (t, heading_columns + i, 0, TAB_CENTER | TAT_TITLE, _("%zu"), i + 1);
+ }
+
+ for (i = 0 ; i < fcm->size2; ++i)
+ {
+ tab_text_format (t, 0, heading_rows + i, TAB_CENTER | TAT_TITLE, _("%zu"), i + 1);
+ }
+
+
+ for (i = 0 ; i < fcm->size1; ++i)
+ {
+ for (j = 0 ; j < fcm->size2; ++j)
+ tab_double (t, heading_columns + j, heading_rows + i, 0,
+ gsl_matrix_get (fcm, i, j), NULL, RC_OTHER);
+ }
+
+ tab_submit (t);
+}
+
+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);
+}
+