oops
[pspp-builds.git] / src / math / linreg / linreg.c
index 217e201ce588bbbb95a3688ddb89beaebfe7e102..659d6ca48306440a22e5e99e8a355241ab1fd319 100644 (file)
@@ -399,8 +399,9 @@ pspp_linreg (const gsl_vector * Y, const gsl_matrix * X,
                                cache->cov, &(cache->sse), wk);
       for (i = 0; i < cache->n_coeffs; i++)
        {
-         cache->coeff[i]->estimate = gsl_vector_get (param_estimates, i);
+         cache->coeff[i]->estimate = gsl_vector_get (param_estimates, i + 1);
        }
+      cache->intercept = gsl_vector_get (param_estimates, 0);
       if (rc == GSL_SUCCESS)
        {
          gsl_multifit_linear_free (wk);