int y = value_compare_3way (val1, nl->cutpoint, nl->gvw);
- if ( x == 0) x = 1;
- if ( y == 0) y = 1;
+ if (x == 0) x = 1;
+ if (y == 0) y = 1;
- return ( x == y);
+ return (x == y);
}
{
if (nl->cmp (nl, &l->group, target))
break;
- l = NULL;
}
return l;
}
struct levene *
levene_create (int indep_width, const union value *cutpoint)
{
- struct levene *nl = xzalloc (sizeof *nl);
+ struct levene *nl = XZALLOC (struct levene);
hmap_init (&nl->hmap);
/* Data accumulation. First pass */
-void
+void
levene_pass_one (struct levene *nl, double value, double weight, const union value *gv)
{
struct lev *lev = find_group (nl, gv);
- if ( nl->pass == 0 )
+ if (nl->pass == 0)
{
nl->pass = 1;
}
assert (nl->pass == 1);
- if ( NULL == lev)
+ if (NULL == lev)
{
- struct lev *l = xzalloc (sizeof *l);
+ struct lev *l = XZALLOC (struct lev);
value_clone (&l->group, gv, nl->gvw);
hmap_insert (&nl->hmap, &l->node, nl->hash (nl, &l->group));
lev = l;
}
/* Data accumulation. Second pass */
-void
+void
levene_pass_two (struct levene *nl, double value, double weight, const union value *gv)
{
struct lev *lev = NULL;
- if ( nl->pass == 1 )
+ if (nl->pass == 1)
{
struct lev *next;
struct lev *l;
}
/* Data accumulation. Third pass */
-void
+void
levene_pass_three (struct levene *nl, double value, double weight, const union value *gv)
{
double z;
struct lev *lev = NULL;
- if ( nl->pass == 2 )
+ if (nl->pass == 2)
{
struct lev *next;
struct lev *l;
*/
assert (nl->pass == 0 || nl->pass == 3);
- if ( nl->pass == 0 )
+ if (nl->pass == 0)
return SYSMIS;
nl->denominator *= hmap_count (&nl->hmap) - 1;
}
numerator *= nn - hmap_count (&nl->hmap);
-
+
return numerator / nl->denominator;
}