Fixed incorrect behaviour of REGRESSION when multiple dependent variables are entered 20130708030519/pspp 20130709030513/pspp
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 2 Jul 2013 17:41:16 +0000 (19:41 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 3 Jul 2013 16:53:43 +0000 (18:53 +0200)
commit4443108e98b43b196f3f07217c6ec8bd96581367
tree992af3224e938756b9394976360e267feea70057
parent3acf6da8d49333d9cc037dfe92a80c1615224a27
Fixed incorrect behaviour of REGRESSION when multiple dependent variables are entered

The REGRESSION command behaved badly when more than one dependent variable was entered.
The cause was that the unnormalised covariance matrix returned from the covariance
module was mutated for each variable.  Consequently, each variable after the first
was wrong.  This change fixes that by changing the ownership semantics of the returned
matrix (and thereby its constness).

This change also adds some comments, attends to constness and fixes the remaining
memory leaks associated with regression.
src/language/stats/glm.c
src/language/stats/oneway.c
src/language/stats/regression.c
src/math/covariance.c
src/math/covariance.h
src/math/linreg.c
src/math/linreg.h