From: John Darrington Date: Sat, 25 May 2013 10:00:12 +0000 (+0200) Subject: Corrected the Degrees of Freedom in the Regression Coefficient Significance X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88772c491a2cafef69ffe26674912f077df5f06e;p=pspp Corrected the Degrees of Freedom in the Regression Coefficient Significance Reported and Tested by: Olaf Nöhring. --- diff --git a/src/language/stats/regression.c b/src/language/stats/regression.c index 1ec00c9f33..46853b7f99 100644 --- a/src/language/stats/regression.c +++ b/src/language/stats/regression.c @@ -832,7 +832,7 @@ reg_stats_coeff (linreg * c, void *aux_, const struct variable *var) */ pval = 2 * gsl_cdf_tdist_Q (fabs (t_stat), - (double) (linreg_n_obs (c) - linreg_n_coeffs (c))); + (double) (linreg_n_obs (c) - linreg_n_coeffs (c) - 1)); tab_double (t, 6, this_row, 0, pval, NULL); ds_destroy (&tstr); } diff --git a/tests/language/stats/regression.at b/tests/language/stats/regression.at index e7d8904122..eb978f51e4 100644 --- a/tests/language/stats/regression.at +++ b/tests/language/stats/regression.at @@ -40,7 +40,7 @@ Table: ANOVA (v2) Table: Coefficients (v2) ,,B,Std. Error,Beta,t,Significance ,(Constant),2.19,2.36,.00,.93,.38 -,v0,1.81,1.05,.17,1.72,.12 +,v0,1.81,1.05,.17,1.72,.13 ,v1,-3.43,.33,-1.03,-10.33,.00 ,,,,,,