From: Jason Stover Date: Sun, 4 Feb 2007 16:38:26 +0000 (+0000) Subject: fixed p-value computation in test of coefficients X-Git-Tag: v0.6.0~568 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b76a8aa4e808b2e6bdb792c369fda72a61304de;p=pspp-builds.git fixed p-value computation in test of coefficients --- diff --git a/src/language/stats/ChangeLog b/src/language/stats/ChangeLog index 712c8428..ef085bf7 100644 --- a/src/language/stats/ChangeLog +++ b/src/language/stats/ChangeLog @@ -1,3 +1,8 @@ +2007-02-04 Jason Stover + + * regression.q: Fixed p-value computation in the test for + individual regression coefficients. + Mon Jan 15 11:03:20 2007 Ben Pfaff Fix bugs found by valgrind when --enable-debug is used with the diff --git a/src/language/stats/regression.q b/src/language/stats/regression.q index a5851ff3..287847a8 100644 --- a/src/language/stats/regression.q +++ b/src/language/stats/regression.q @@ -269,7 +269,7 @@ reg_stats_coeff (pspp_linreg_cache * c) /* P values for the test statistic above. */ - pval = 2 * gsl_cdf_tdist_Q (fabs (t_stat), 1.0); + pval = 2 * gsl_cdf_tdist_Q (fabs (t_stat), (double) (c->n_obs - c->n_coeffs)); tab_float (t, 6, j + 1, 0, pval, 10, 2); } tab_title (t, _("Coefficients"));