From: John Darrington Date: Mon, 23 Aug 2010 15:00:57 +0000 (+0200) Subject: Oneway: Fix problems with MISSING=ANALYSIS X-Git-Tag: v0.7.6~249 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=456454e38aae190277eabaaadc601ccf3ed97af3;p=pspp-builds.git Oneway: Fix problems with MISSING=ANALYSIS --- diff --git a/src/language/stats/oneway.c b/src/language/stats/oneway.c index 69570bbc..d08e3114 100644 --- a/src/language/stats/oneway.c +++ b/src/language/stats/oneway.c @@ -469,16 +469,21 @@ run_oneway (const struct oneway_spec *cmd, for (i = 0; i < cmd->n_vars; ++i) { + const struct variable *v = cmd->vars[i]; + const union value *val = case_data (c, v); + + if ( MISS_ANALYSIS == cmd->missing_type) + { + if ( var_is_value_missing (v, val, cmd->exclude)) + continue; + } + { struct per_var_ws *pvw = &ws.vws[i]; covariance_accumulate_pass1 (pvw->cov, c); } - const struct variable *v = cmd->vars[i]; - - const union value *val = case_data (c, v); - struct group_proc *gp = group_proc_get (cmd->vars[i]); struct hsh_table *group_hash = gp->group_hash; @@ -537,6 +542,15 @@ run_oneway (const struct oneway_spec *cmd, for (i = 0; i < cmd->n_vars; ++i) { struct per_var_ws *pvw = &ws.vws[i]; + const struct variable *v = cmd->vars[i]; + const union value *val = case_data (c, v); + + if ( MISS_ANALYSIS == cmd->missing_type) + { + if ( var_is_value_missing (v, val, cmd->exclude)) + continue; + } + covariance_accumulate_pass2 (pvw->cov, c); } }