+2008-04-06 Jason Stover <jhs@math.gcsu.edu>
+
+ * linreg.c (pspp_linreg): For the QR method of getting the least
+ squares estimates, store intercept in cache->intercept
+ instead of coefficienc structure. Partial fix of bug 22788.
+
2008-03-10 Jason Stover <jhs@math.gcsu.edu>
* linreg.c (pspp_linreg): Remove use of coefficient 0 as intercept.
wk = gsl_multifit_linear_alloc (design->size1, design->size2);
rc = gsl_multifit_linear (design, Y, param_estimates,
cache->cov, &(cache->sse), wk);
- for (i = 0; i < cache->n_coeffs; i++)
+ for (i = 1; i < cache->n_coeffs; i++)
{
cache->coeff[i]->estimate = gsl_vector_get (param_estimates, i);
}
+ cache->intercept = gsl_vector_get (param_estimates, 0);
if (rc == GSL_SUCCESS)
{
gsl_multifit_linear_free (wk);