updated residual function; fixed bug in coefficient.c
authorJason Stover <jhs@math.gcsu.edu>
Sun, 9 Apr 2006 19:47:50 +0000 (19:47 +0000)
committerJason Stover <jhs@math.gcsu.edu>
Sun, 9 Apr 2006 19:47:50 +0000 (19:47 +0000)
src/math/linreg/coefficient.c
src/math/linreg/linreg.c

index 4010b72d308b039bac804d60fe39c7fc30f923fd..5efde99e73fd22a7bd94d25281255fc1c224b100 100644 (file)
@@ -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;
index 99d37c13ab211a86b44f1791f5d89df93eea5659..aeaa9b8dfdb4fc279430c87a51a45a483caed832 100644 (file)
@@ -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