X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Ft-test.q;h=3d27874362050247f3ab55f534312d4bdfc217ee;hb=46dfa3ec7417bbb7452f152a6b62435006259633;hp=116f04b40403cd27dc09afd201cba76781181c22;hpb=66b8883bc3cf003d01093e23d896872e7149a669;p=pspp-builds.git diff --git a/src/language/stats/t-test.q b/src/language/stats/t-test.q index 116f04b4..3d278743 100644 --- a/src/language/stats/t-test.q +++ b/src/language/stats/t-test.q @@ -80,8 +80,8 @@ struct group_properties /* The comparison criterion */ enum comparison criterion; - /* The width of the independent variable */ - int indep_width ; + /* The independent variable */ + struct variable *indep_var; union { /* The value of the independent variable at which groups are determined to @@ -1676,7 +1676,7 @@ group_precalc (struct cmd_t_test *cmd ) /* There's always 2 groups for a T - TEST */ ttpr->n_groups = 2; - gp.indep_width = var_get_width (indep_var); + gp.indep_var = indep_var; ttpr->group_hash = hsh_create (2, (hsh_compare_func *) compare_group_binary, @@ -1888,10 +1888,6 @@ compare_group_binary (const struct group_statistics *a, if ( p->criterion == CMP_LE ) { - /* less-than comparision is not meaningfull for - alpha variables, so we shouldn't ever arrive here */ - assert (p->indep_width == 0 ) ; - flag_a = ( a->id.f < p->v.critical_value ) ; flag_b = ( b->id.f < p->v.critical_value ) ; } @@ -1918,8 +1914,6 @@ hash_group_binary (const struct group_statistics *g, if ( p->criterion == CMP_LE ) { - /* Not meaningfull to do a less than compare for alpha values ? */ - assert (p->indep_width == 0 ) ; flag = ( g->id.f < p->v.critical_value ) ; } else if ( p->criterion == CMP_EQ) @@ -1939,10 +1933,10 @@ short which_group (const struct group_statistics *g, const struct group_properties *p) { - if ( 0 == compare_values (&g->id, &p->v.g_value[0], p->indep_width)) + if ( 0 == compare_values (&g->id, &p->v.g_value[0], p->indep_var)) return 0; - if ( 0 == compare_values (&g->id, &p->v.g_value[1], p->indep_width)) + if ( 0 == compare_values (&g->id, &p->v.g_value[1], p->indep_var)) return 1; return 2;