From fa9e38d0f6ee72724eeeb92526b23898bf582a89 Mon Sep 17 00:00:00 2001 From: Jason Stover Date: Sun, 9 Apr 2006 19:47:50 +0000 Subject: [PATCH] updated residual function; fixed bug in coefficient.c --- src/math/linreg/coefficient.c | 2 ++ src/math/linreg/linreg.c | 1 + 2 files changed, 3 insertions(+) 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 -- 2.30.2