From: John Darrington Date: Thu, 22 Nov 2012 14:39:48 +0000 (+0100) Subject: Logistic Regression: Fix bug where some confidence intervals were not reported. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a279c28c24a3a025a92c6acf40c9123fab947f59;p=pspp Logistic Regression: Fix bug where some confidence intervals were not reported. --- diff --git a/src/language/stats/logistic.c b/src/language/stats/logistic.c index e3a66f4de0..8e21b175e1 100644 --- a/src/language/stats/logistic.c +++ b/src/language/stats/logistic.c @@ -1289,10 +1289,14 @@ output_variables (const struct lr_spec *cmd, if (cmd->print & PRINT_CI) { + int last_ci = nr; double wc = gsl_cdf_ugaussian_Pinv (0.5 + cmd->confidence / 200.0); wc *= sqrt (sigma2); - if (idx < cmd->n_predictor_vars) + if (cmd->constant) + last_ci--; + + if (row < last_ci) { tab_double (t, 8, row, 0, exp (b - wc), 0); tab_double (t, 9, row, 0, exp (b + wc), 0);