- for (r = 0 ; r < corr->n_vars1 ; ++r)
- {
- const int row = r * rows_per_variable + heading_rows;
- for (c = 0 ; c < matrix_cols ; ++c)
- {
- unsigned char flags = 0;
- const int col_index = corr->n_vars_total > corr->n_vars1 ?
- corr->n_vars1 + c :
- c;
- double pearson = gsl_matrix_get (cm, r, col_index);
- double w = gsl_matrix_get (samples, r, col_index);
- double sig = opts->tails * significance_of_correlation (pearson, w);
-
- if ( opts->missing_type != CORR_LISTWISE )
- tab_double (t, c + heading_columns, row + rows_per_variable - 1, 0, w, NULL, RC_WEIGHT);
-
- if ( col_index != r)
- tab_double (t, c + heading_columns, row + 1, 0, sig, NULL, RC_PVALUE);
-
- if ( opts->sig && col_index != r && sig < 0.05)
- flags = TAB_EMPH;
-
- tab_double (t, c + heading_columns, row, flags, pearson, NULL, RC_OTHER);
-
- if (opts->statistics & STATS_XPROD)
- {
- double cov = gsl_matrix_get (cv, r, col_index);
- const double xprod_dev = cov * w;
- cov *= w / (w - 1.0);