/[pspp]/pspp/src/regression.q
ViewVC logotype

Diff of /pspp/src/regression.q

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by blp, Mon Oct 24 02:51:31 2005 UTC revision 1.9 by jstover, Tue Oct 25 19:59:48 2005 UTC
# Line 299  reg_stats_f (pspp_linreg_cache * c) Line 299  reg_stats_f (pspp_linreg_cache * c)
299  static void  static void
300  reg_stats_bcov (pspp_linreg_cache * c)  reg_stats_bcov (pspp_linreg_cache * c)
301  {  {
302      int n_cols;
303      int n_rows;
304      int i;
305      int j;
306      int k;
307      int row;
308      int col;
309      const char *label;
310      struct tab_table *t;
311    
312    assert (c != NULL);    assert (c != NULL);
313      n_cols = c->n_indeps + 1 + 2;
314      n_rows = 2 * (c->n_indeps + 1);
315      t = tab_create (n_cols, n_rows, 0);
316      tab_headers (t, 2, 0, 1, 0);
317      tab_dim (t, tab_natural_dimensions);
318      tab_box (t, TAL_2, TAL_2, -1, TAL_1, 0, 0, n_cols - 1, n_rows - 1);
319      tab_hline (t, TAL_2, 0, n_cols - 1, 1);
320      tab_vline (t, TAL_2, 2, 0, n_rows - 1);
321      tab_vline (t, TAL_0, 1, 0, 0);
322      tab_text (t, 0, 0, TAB_CENTER | TAT_TITLE, _("Model"));
323      tab_text (t, 1, 1, TAB_CENTER | TAT_TITLE, _("Covariances"));
324      for (i = 1; i < c->n_indeps + 1; i++)
325        {
326          j = indep_vars[(i - 1)];
327          struct variable *v = cmd.v_variables[j];
328          label = var_to_string (v);
329          tab_text (t, 2, i, TAB_CENTER, label);
330          tab_text (t, i + 2, 0, TAB_CENTER, label);
331          for (k = 1; k < c->n_indeps + 1; k++)
332            {
333              col = (i <= k) ? k : i;
334              row = (i <= k) ? i : k;
335              tab_float (t, k + 2, i, TAB_CENTER,
336                         gsl_matrix_get (c->cov, row, col), 8, 3);
337            }
338        }
339      tab_title (t, 0, _("Coefficient Correlations"));
340      tab_submit (t);
341  }  }
342  static void  static void
343  reg_stats_ses (pspp_linreg_cache * c)  reg_stats_ses (pspp_linreg_cache * c)
# Line 373  subcommand_statistics (int *keywords, ps Line 411  subcommand_statistics (int *keywords, ps
411         */         */
412        for (i = 0; i < f; i++)        for (i = 0; i < f; i++)
413          {          {
414            *(keywords + i) = 1;            keywords[i] = 1;
415          }          }
416      }      }
417    else    else
# Line 392  subcommand_statistics (int *keywords, ps Line 430  subcommand_statistics (int *keywords, ps
430         */         */
431        if (keywords[defaults] | d)        if (keywords[defaults] | d)
432          {          {
433            *(keywords + anova) = 1;            keywords[anova] = 1;
434            *(keywords + outs) = 1;            keywords[outs] = 1;
435            *(keywords + coeff) = 1;            keywords[coeff] = 1;
436            *(keywords + r) = 1;            keywords[r] = 1;
437          }          }
438      }      }
439    statistics_keyword_output (reg_stats_r, keywords[r], c);    statistics_keyword_output (reg_stats_r, keywords[r], c);

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26