-}
-
-static int
-levene_calc (const struct dictionary *dict, const struct ccase *c,
- const struct levene_info *l)
-{
- size_t i;
- bool warn = false;
- const union value *gv = case_data (c, l->v_indep);
- struct group_statistics key;
- double weight = dict_get_case_weight (dict, c, &warn);
-
- key.id = *gv;
-
- for (i = 0; i < l->n_dep; ++i)
- {
- const struct variable *var = l->v_dep[i];
- struct group_proc *gp = group_proc_get (var);
- double levene_z;
- const union value *v = case_data (c, var);
- struct group_statistics *gs;
-
- gs = hsh_find(gp->group_hash,(void *) &key );
-
- if ( 0 == gs )
- continue ;
-
- if ( !var_is_value_missing (var, v, l->exclude))
- {
- levene_z= fabs(v->f - gs->mean);
- l->lz[i].grand_total += levene_z * weight;
- l->lz[i].total_n += weight;
-
- gs->lz_total += levene_z * weight;
- }
- }
- return 0;