From 6f422d9a7e709779c5ba8d1589fe294849dd38e8 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 28 Jul 2007 00:40:52 +0000 Subject: [PATCH] Fix bug #19604. T-Test documentation now matches code; code matches spss behaviour --- doc/ChangeLog | 5 +++++ doc/statistics.texi | 4 ++-- src/language/stats/ChangeLog | 5 +++++ src/language/stats/t-test.q | 15 +++++++-------- tests/ChangeLog | 5 +++++ tests/command/t-test-1-indep-val.sh | 4 ++-- 6 files changed, 26 insertions(+), 12 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 80eec83a..4effc079 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2007-07-28 John Darrington + + * statistics.texi: Made the documentation for T-TEST match + the behaviour. + 2007-07-17 Ben Pfaff * get-commands.pl: Use strict and all warnings. Simplify diff --git a/doc/statistics.texi b/doc/statistics.texi index 7c141fa5..8db018f7 100644 --- a/doc/statistics.texi +++ b/doc/statistics.texi @@ -702,8 +702,8 @@ of 1.0 and 2.0 are assumed. If the independent variable is numeric, it is acceptable to specify only one value inside the parentheses. If you do this, cases where the independent variable is -less than or equal to this value belong to the first group, and cases -greater than this value belong to the second group. +greater than or equal to this value belong to the first group, and cases +less than this value belong to the second group. When using this form of the @cmd{GROUPS} subcommand, missing values in the independent variable are excluded on a listwise basis, regardless of whether @cmd{/MISSING=LISTWISE} was specified. diff --git a/src/language/stats/ChangeLog b/src/language/stats/ChangeLog index 574b958d..4456d8f2 100644 --- a/src/language/stats/ChangeLog +++ b/src/language/stats/ChangeLog @@ -1,3 +1,8 @@ +2007-07-28 John Darrington + + * t-test.q: Moved the order in which groups are displayed in the + independent samples case, where a cut point is given. + 2007-07-27 Ben Pfaff * regression.q (run_regression): Move casereader_destroy call so diff --git a/src/language/stats/t-test.q b/src/language/stats/t-test.q index 2e14632d..9691578e 100644 --- a/src/language/stats/t-test.q +++ b/src/language/stats/t-test.q @@ -736,8 +736,8 @@ ssbox_independent_samples_populate(struct ssbox *ssb, if (gp.criterion == CMP_LE ) { - strcpy(prefix[0],"< "); - strcpy(prefix[1],">="); + strcpy(prefix[0],">="); + strcpy(prefix[1],"<"); indep_value[0] = gp.v.critical_value; indep_value[1] = gp.v.critical_value; } @@ -785,13 +785,13 @@ ssbox_independent_samples_populate(struct ssbox *ssb, { if ( count == 0 ) { - /* less than ( < ) case */ - search_val.f = gp.v.critical_value - 1.0; + /* >= case */ + search_val.f = gp.v.critical_value + 1.0; } else { - /* >= case */ - search_val.f = gp.v.critical_value + 1.0; + /* less than ( < ) case */ + search_val.f = gp.v.critical_value - 1.0; } } else @@ -1688,7 +1688,6 @@ group_precalc (struct cmd_t_test *cmd ) } hsh_insert ( ttpr->group_hash, (void *) gs ); - } } @@ -1867,7 +1866,7 @@ compare_group_binary(const struct group_statistics *a, if ( p->criterion == CMP_LE ) { - /* less-than-or-equal comparision is not meaningfull for + /* less-than comparision is not meaningfull for alpha variables, so we shouldn't ever arrive here */ assert(p->indep_width == 0 ) ; diff --git a/tests/ChangeLog b/tests/ChangeLog index 2b9cf808..01e6ff33 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2007-07-28 John Darrington + + * command/t-test-1-indep-val.sh: Changed the order of groups in the + summary box to match new behaviour. (Fixes bug #19604). + 2007-07-25 Ben Pfaff Fix bug #17100. diff --git a/tests/command/t-test-1-indep-val.sh b/tests/command/t-test-1-indep-val.sh index d524b159..375167cc 100755 --- a/tests/command/t-test-1-indep-val.sh +++ b/tests/command/t-test-1-indep-val.sh @@ -104,8 +104,8 @@ diff -b $TEMPDIR/pspp.list - <=1.514|11|9.00| 3.821| 1.152# +#DEP >=1.514|11|9.00| 3.821| 1.152# +# <1.514 |11|8.00| 2.864| .863# #===========#==#====#==============#========# 2.2 T-TEST. Independent Samples Test #==============================#=========#===============================================================================# -- 2.30.2