int total_n_groups = 0.0;
- struct kw *kw = xcalloc (nst->n_vars, sizeof *kw);
+ struct kw *kw = XCALLOC (nst->n_vars, struct kw);
/* If the independent variable is missing, then we ignore the case */
input = casereader_create_filter_missing (input,
const size_t group_var_width = var_get_width (nst->indep_var);
struct rank_entry *rank = find_rank_entry (&kw[i].map, group, group_var_width);
- if ( NULL == rank)
+ if (NULL == rank)
{
rank = xzalloc (sizeof *rank);
value_clone (&rank->group, group, group_var_width);
value_hash (&rank->group, group_var_width, 0));
}
- rank->sum_of_ranks += case_data_idx (c, rank_idx)->f;
+ rank->sum_of_ranks += case_num_idx (c, rank_idx);
rank->n += dict_get_case_weight (dict, c, &warn);
/* If this assertion fires, then either the data wasn't sorted or some other
total_n_groups ++;
}
- kw[i].h *= 12 / (n * ( n + 1));
+ kw[i].h *= 12 / (n * (n + 1));
kw[i].h -= 3 * (n + 1) ;
kw[i].h /= 1 - tiebreaker/ (pow3 (n) - n);