projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CORRELATIONS: Properly deal with case weights.
[pspp-builds.git]
/
src
/
math
/
covariance.c
diff --git
a/src/math/covariance.c
b/src/math/covariance.c
index b2d43427aae60fa7ff90fb17768266adedc223d7..ba0de0b6968bcb560a4c738495c72f069899ba07 100644
(file)
--- a/
src/math/covariance.c
+++ b/
src/math/covariance.c
@@
-153,7
+153,7
@@
covariance_accumulate (struct covariance *cov, const struct ccase *c)
idx = cm_idx (cov, i, j);
if (idx >= 0)
{
idx = cm_idx (cov, i, j);
if (idx >= 0)
{
- cov->cm [idx] += val1->f * val2->f;
+ cov->cm [idx] += val1->f * val2->f
* weight
;
}
for (m = 0 ; m < n_MOMENTS; ++m)
}
for (m = 0 ; m < n_MOMENTS; ++m)