projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5b5f08a
)
oops
author
Jason Stover
<jhs@math.gcsu.edu>
Sun, 6 Apr 2008 22:03:01 +0000
(22:03 +0000)
committer
Jason Stover
<jhs@math.gcsu.edu>
Sun, 6 Apr 2008 22:03:01 +0000
(22:03 +0000)
src/math/linreg/linreg.c
patch
|
blob
|
history
diff --git
a/src/math/linreg/linreg.c
b/src/math/linreg/linreg.c
index 0782c36fc3df82aae30d00c5f88fbd5f89aa3ad7..659d6ca48306440a22e5e99e8a355241ab1fd319 100644
(file)
--- a/
src/math/linreg/linreg.c
+++ b/
src/math/linreg/linreg.c
@@
-397,9
+397,9
@@
pspp_linreg (const gsl_vector * Y, const gsl_matrix * X,
wk = gsl_multifit_linear_alloc (design->size1, design->size2);
rc = gsl_multifit_linear (design, Y, param_estimates,
cache->cov, &(cache->sse), wk);
wk = gsl_multifit_linear_alloc (design->size1, design->size2);
rc = gsl_multifit_linear (design, Y, param_estimates,
cache->cov, &(cache->sse), wk);
- for (i =
1
; i < cache->n_coeffs; i++)
+ 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)
}
cache->intercept = gsl_vector_get (param_estimates, 0);
if (rc == GSL_SUCCESS)