#include <language/stats/binomial.h>
#include <language/stats/chisquare.h>
#include <language/stats/wilcoxon.h>
+#include <language/stats/sign.h>
#include <libpspp/hash.h>
#include <libpspp/pool.h>
#include <libpspp/taint.h>
{
lex_force_num (lexer);
btp->category1 = lex_number (lexer);
- lex_get (lexer);
- if ( ! lex_force_match (lexer, ',')) return 2;
- if ( ! lex_force_num (lexer) ) return 2;
- btp->category2 = lex_number (lexer);
- lex_get (lexer);
+ lex_get (lexer);
+ if ( lex_match (lexer, ','))
+ {
+ if ( ! lex_force_num (lexer) ) return 2;
+ btp->category2 = lex_number (lexer);
+ lex_get (lexer);
+ }
+ else
+ {
+ btp->cutpoint = btp->category1;
+ }
+
lex_force_match (lexer, ')');
}
}
else
return 2;
}
- else
- {
- if ( lex_match (lexer, '(') )
- {
- lex_force_num (lexer);
- btp->cutpoint = lex_number (lexer);
- lex_get (lexer);
- lex_force_match (lexer, ')');
- }
- }
specs->n_tests++;
specs->test = pool_realloc (specs->pool,
struct npar_specs *specs = aux;
struct two_sample_test *tp = pool_alloc(specs->pool, sizeof(*tp));
- ((struct npar_test *)tp)->execute = NULL;
-
+ ((struct npar_test *) tp)->execute = sign_execute;
if (!parse_two_sample_related_test (lexer, dataset_dict (ds), cmd,
tp, specs->pool) )