Computes Levene test statistic.
Copyright (C) 2004 Free Software Foundation, Inc.
- Written by John Darrington <john@darrington.wattle.id.au>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
struct t_test_proc **group_stats;
/* The independent variable */
- struct variable *v_indep;
+ const struct variable *v_indep;
/* Number of dependent variables */
size_t n_dep;
/* The dependent variables */
- struct variable **v_dep;
+ const struct variable **v_dep;
/* Filter for missing values */
struct casefilter *filter;
void
levene(const struct dictionary *dict,
const struct casefile *cf,
- struct variable *v_indep, size_t n_dep, struct variable **v_dep,
+ const struct variable *v_indep, size_t n_dep,
+ const struct variable **v_dep,
struct casefilter *filter)
{
struct casereader *r;
for(i = 0; i < l->n_dep ; ++i )
{
- struct variable *var = l->v_dep[i];
+ const struct variable *var = l->v_dep[i];
struct group_proc *gp = group_proc_get (var);
struct group_statistics *gs;
struct hsh_iterator hi;
{
size_t i;
bool warn = false;
- const union value *gv = case_data (c, l->v_indep->fv);
+ const union value *gv = case_data (c, l->v_indep);
struct group_statistics key;
double weight = dict_get_case_weight (dict, c, &warn);
for (i = 0; i < l->n_dep; ++i)
{
- struct variable *var = l->v_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->fv);
+ const union value *v = case_data (c, var);
struct group_statistics *gs;
gs = hsh_find(gp->group_hash,(void *) &key );
struct hsh_iterator hi;
struct group_statistics *g;
- struct variable *var = l->v_dep[v] ;
+ const struct variable *var = l->v_dep[v] ;
struct hsh_table *hash = group_proc_get (var)->group_hash;
double weight = dict_get_case_weight (dict, c, &warn);
- const union value *gv = case_data (c, l->v_indep->fv);
+ const union value *gv = case_data (c, l->v_indep);
struct group_statistics key;
key.id = *gv;
for (i = 0; i < l->n_dep; ++i)
{
double levene_z;
- struct variable *var = l->v_dep[i] ;
- const union value *v = case_data (c, var->fv);
+ const struct variable *var = l->v_dep[i] ;
+ const union value *v = case_data (c, var);
struct group_statistics *gs;
gs = hsh_find(group_proc_get (var)->group_hash,(void *) &key );
struct hsh_iterator hi;
struct group_statistics *g;
- struct variable *var = l->v_dep[v] ;
+ const struct variable *var = l->v_dep[v] ;
struct group_proc *gp = group_proc_get (var);
struct hsh_table *hash = gp->group_hash;