Parameter estimate matched with appropriate variable during estimation
authorJason Stover <jhs@math.gcsu.edu>
Sun, 30 Oct 2005 15:06:18 +0000 (15:06 +0000)
committerJason Stover <jhs@math.gcsu.edu>
Sun, 30 Oct 2005 15:06:18 +0000 (15:06 +0000)
lib/linreg/linreg.c

index 85b302d188e2f01b215a805ddd3d6659c4dd2a7d..2a8aff3f40262ed441499988a6866f87b4aecc24 100644 (file)
@@ -172,6 +172,9 @@ pspp_linreg (const gsl_vector * Y, const gsl_matrix * X,
   cache->dft = cache->n_obs - 1;
   cache->dfm = cache->n_indeps;
   cache->dfe = cache->dft - cache->dfm;
+  cache->n_coeffs = X->size2 + 1; /* Adjust this later to allow for regression
+                                    through the origin.
+                                 */
   if (cache->method == PSPP_LINREG_SWEEP)
     {
       gsl_matrix *sw;