- tab_double (t, 3, 1, 0, std_err, NULL);
- tab_double (t, 4, 1, 0, 0.0, NULL);
- t_stat = linreg_intercept (c) / std_err;
- tab_double (t, 5, 1, 0, t_stat, NULL);
- pval = 2 * gsl_cdf_tdist_Q (fabs (t_stat), (double) (linreg_n_obs (c) - linreg_n_coeffs (c)));
- tab_double (t, 6, 1, 0, pval, NULL);
- for (j = 0; j < linreg_n_coeffs (c); j++)
+
+ if (cmd->stats & STATS_CI)
+ {
+ double lower = linreg_intercept (c) - tval * std_err ;
+ double upper = linreg_intercept (c) + tval * std_err ;
+ tab_double (t, 7, heading_rows, 0, lower, NULL, RC_OTHER);
+ tab_double (t, 8, heading_rows, 0, upper, NULL, RC_OTHER);
+
+ tab_joint_text_format (t, 7, 0, 8, 0, TAB_CENTER | TAT_TITLE, _("%g%% Confidence Interval for B"), cmd->ci * 100);
+ tab_hline (t, TAL_1, 7, 8, 1);
+ tab_text (t, 7, 1, TAB_CENTER | TAT_TITLE, _("Lower Bound"));
+ tab_text (t, 8, 1, TAB_CENTER | TAT_TITLE, _("Upper Bound"));
+ }
+
+ if (!cmd->origin)
+ {
+ tab_text (t, 1, this_row, TAB_LEFT | TAT_TITLE, _("(Constant)"));
+ tab_double (t, 2, this_row, 0, linreg_intercept (c), NULL, RC_OTHER);
+ tab_double (t, 3, this_row, 0, std_err, NULL, RC_OTHER);
+ tab_double (t, 4, this_row, 0, 0.0, NULL, RC_OTHER);
+ double t_stat = linreg_intercept (c) / std_err;
+ tab_double (t, 5, this_row, 0, t_stat, NULL, RC_OTHER);
+
+ double pval =
+ 2 * gsl_cdf_tdist_Q (fabs (t_stat),
+ (double) (linreg_n_obs (c) - linreg_n_coeffs (c)));
+ tab_double (t, 6, this_row, 0, pval, NULL, RC_PVALUE);
+ this_row++;
+ }
+
+ for (j = 0; j < linreg_n_coeffs (c); j++, this_row++)