-
- gs = hsh_find (group_hash, indep_val );
-
- if ( ! gs )
- {
- gs = xmalloc (sizeof *gs);
- gs->id = *indep_val;
- gs->sum = 0;
- gs->n = 0;
- gs->ssq = 0;
- gs->sum_diff = 0;
- gs->minimum = DBL_MAX;
- gs->maximum = -DBL_MAX;
-
- hsh_insert ( group_hash, gs );
- }
-
- if (!var_is_value_missing (v, val, cmd->exclude))
- {
- struct group_statistics *totals = &gp->ugs;
-
- totals->n += weight;
- totals->sum += weight * val->f;
- totals->ssq += weight * pow2 (val->f);
-
- if ( val->f * weight < totals->minimum )
- totals->minimum = val->f * weight;
-
- if ( val->f * weight > totals->maximum )
- totals->maximum = val->f * weight;
-
- gs->n += weight;
- gs->sum += weight * val->f;
- gs->ssq += weight * pow2 (val->f);
-
- if ( val->f * weight < gs->minimum )
- gs->minimum = val->f * weight;
-
- if ( val->f * weight > gs->maximum )
- gs->maximum = val->f * weight;
- }
-
- gp->n_groups = hsh_count (group_hash );