The NPAR TEST /BINOMIAL subcommand was supposed
to take a default P value. But it didn't work.
This change fixes that problem.
#include <language/stats/npar.h>
#include <math.h>
#include <language/stats/npar.h>
#include <math.h>
casereader_destroy (input);
}
casereader_destroy (input);
}
int
cmd_npar_tests (struct lexer *lexer, struct dataset *ds)
{
int
cmd_npar_tests (struct lexer *lexer, struct dataset *ds)
{
btp->category1 = btp->category2 = btp->cutpoint = SYSMIS;
btp->category1 = btp->category2 = btp->cutpoint = SYSMIS;
- if ( lex_match(lexer, '(') )
+ btp->p = 0.5;
+
+ if ( lex_match (lexer, '(') )
{
if ( lex_force_num (lexer) )
{
{
if ( lex_force_num (lexer) )
{
+ else
+ /* Kludge: q2c swallows the '=' so put it back here */
+ lex_put_back (lexer, '=');
+
if ( lex_match (lexer, '=') )
{
if ( lex_match (lexer, '=') )
{