X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Flinreg%2Fcoefficient.c;h=1f5d9ec4031e36b18ac6f4c0fe6c9cf1ffeb8af9;hb=de881ed979f2a6c382589b9d54d485ad88323821;hp=2cca9f54653327918691ab228966f32ca82d03b8;hpb=e947f08aea815968ef993d572977e271fa3ad4da;p=pspp-builds.git diff --git a/src/math/linreg/coefficient.c b/src/math/linreg/coefficient.c index 2cca9f54..1f5d9ec4 100644 --- a/src/math/linreg/coefficient.c +++ b/src/math/linreg/coefficient.c @@ -60,6 +60,7 @@ pspp_linreg_coeff_init (pspp_linreg_cache * c, struct design_matrix *X) struct pspp_linreg_coeff *coeff; c->coeff = xnmalloc (X->m->size2 + 1, sizeof (*c->coeff)); + c->coeff->v_info = NULL; /* Intercept has no associated variable. */ for (i = 0; i < X->m->size2; i++) { j = i + 1; /* The first coefficient is the intercept. */ @@ -137,7 +138,8 @@ pspp_linreg_coeff_get_n_vars (struct pspp_linreg_coeff *c) } /* - Which variable does this coefficient match? + Which variable does this coefficient match? I should be + 0 unless the coefficient refers to an interaction term. */ const struct variable * pspp_linreg_coeff_get_var (struct pspp_linreg_coeff *c, int i) @@ -164,7 +166,7 @@ pspp_linreg_coeff_get_value (struct pspp_linreg_coeff *c, { return NULL; } - if (v->type == NULL) + if (v->type == NUMERIC) { return NULL; }