From: Jason Stover Date: Sun, 9 Apr 2006 19:47:50 +0000 (+0000) Subject: updated residual function; fixed bug in coefficient.c X-Git-Tag: v0.6.0~995 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa9e38d0f6ee72724eeeb92526b23898bf582a89;p=pspp-builds.git updated residual function; fixed bug in coefficient.c --- diff --git a/src/math/linreg/coefficient.c b/src/math/linreg/coefficient.c index 4010b72d..5efde99e 100644 --- a/src/math/linreg/coefficient.c +++ b/src/math/linreg/coefficient.c @@ -201,6 +201,8 @@ pspp_linreg_get_coeff (const pspp_linreg_cache * c, return NULL; } + result = c->coeff + i; + tmp = pspp_linreg_coeff_get_var (result, 0); while (tmp->index != v->index && i < c->n_coeffs) { result = c->coeff + i; diff --git a/src/math/linreg/linreg.c b/src/math/linreg/linreg.c index 99d37c13..aeaa9b8d 100644 --- a/src/math/linreg/linreg.c +++ b/src/math/linreg/linreg.c @@ -99,6 +99,7 @@ pspp_linreg_cache_alloc (size_t n, size_t p) pspp_linreg_cache *c; c = (pspp_linreg_cache *) malloc (sizeof (pspp_linreg_cache)); + c->depvar = NULL; c->indep_means = gsl_vector_alloc (p); c->indep_std = gsl_vector_alloc (p); c->ssx = gsl_vector_alloc (p); /* Sums of squares for the