From: John Darrington Date: Wed, 23 Nov 2011 13:23:17 +0000 (+0100) Subject: GLM: Update logic for choosing types of sums of squares X-Git-Tag: v0.7.9~80 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cab34a28a09856c4aff9ce432c2c53350d1a501;p=pspp-builds.git GLM: Update logic for choosing types of sums of squares --- diff --git a/src/language/stats/glm.c b/src/language/stats/glm.c index 4b1b1a8b..28f61bc6 100644 --- a/src/language/stats/glm.c +++ b/src/language/stats/glm.c @@ -33,6 +33,7 @@ #include "language/lexer/lexer.h" #include "language/lexer/value-parser.h" #include "language/lexer/variable-parser.h" +#include "libpspp/assertion.h" #include "libpspp/ll.h" #include "libpspp/message.h" #include "libpspp/misc.h" @@ -537,7 +538,18 @@ run_glm (struct glm_spec *cmd, struct casereader *input, */ ws.ssq = gsl_vector_alloc (cm->size1); gsl_vector_set (ws.ssq, 0, gsl_matrix_get (cm, 0, 0)); - get_ssq (cov, ws.ssq, cmd); + switch (cmd->ss_type) + { + case 1: + break; + case 2: + case 3: + get_ssq (cov, ws.ssq, cmd); + break; + default: + NOT_REACHED (); + break; + } // dump_matrix (cm); gsl_matrix_free (cm); diff --git a/tests/language/stats/glm.at b/tests/language/stats/glm.at index 8209bc72..394f4a2d 100644 --- a/tests/language/stats/glm.at +++ b/tests/language/stats/glm.at @@ -49,7 +49,6 @@ end data. variable labels a 'Factor A' b 'Factor B' c 'Factor C' y 'Criterion'. glm y by b a c - /method=sstype(3) /intercept=include /criteria=alpha(.05) /design = a b c @@ -103,7 +102,6 @@ begin data. end data. glm points by Factor0 Factor1 - /method=sstype(3) /intercept=include /criteria=alpha(.05) .