including lib/gslextras and the linear regression features. Jason
is also an important contributor to GSL, which is used by PSPP.
-* Rob van Son wrote the routine for calculation of the significance
-of the Wilcoxon matched pairs signed rank statistic used by the
- NPAR TEST command.
-
We also thank past contributors:
* Michael Kiefte contributed bug fixes and other enhancements.
* Patrick Kobly contributed bug fixes and other enhancements.
+
+* Rob van Son wrote the original version of the routine for
+ calculation of the significance of the Wilcoxon matched pairs signed
+ rank statistic used by the NPAR TEST command.
+
#include <signal.h>
#include <libpspp/assertion.h>
-static double timed_wilcoxon_significance (double w, long int n, double timer);
-
-
static double
append_difference (const struct ccase *c, casenumber n UNUSED, void *aux)
{
show_tests_box (const struct wilcoxon_state *ws,
const struct two_sample_test *t2s,
bool exact,
- double timer
+ double timer UNUSED
)
{
size_t i;
if (exact)
{
- double p =
- timed_wilcoxon_significance (ws[i].positives.sum,
- n,
- timer );
-
- if ( p == SYSMIS)
+ double p = LevelOfSignificanceWXMPSR (ws[i].positives.sum, n);
+ if (p < 0)
{
- msg (MW, _("Exact significance was not calculated after %.2f minutes. Skipping test."), timer);
+ msg (MW, ("Too many pairs to calculate exact significance."));
}
else
{
tab_submit (table);
}
-
-\f
-
-#include <setjmp.h>
-
-static sigjmp_buf env;
-
-static void
-give_up_callback (int signal UNUSED)
-{
- siglongjmp (env, 1);
-}
-
-static double
-timed_wilcoxon_significance (double w, long int n, double timer)
-{
- double p = SYSMIS;
-
- sigset_t set;
-
- struct sigaction timeout_action;
- struct sigaction old_action;
-
- if (timer <= 0 )
- return LevelOfSignificanceWXMPSR (w, n);
-
- sigemptyset (&set);
-
- timeout_action.sa_mask = set;
- timeout_action.sa_flags = 0;
-
- timeout_action.sa_handler = give_up_callback;
-
- if ( 0 == sigsetjmp (env, 1))
- {
- sigaction (SIGALRM, &timeout_action, &old_action);
- alarm (timer * 60.0);
-
- p = LevelOfSignificanceWXMPSR (w, n);
- }
-
- sigaction (SIGALRM, &old_action, NULL);
-
- return p;
-}
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2004, 2005, 2006 Free Software Foundation
+ Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <assert.h>
#include <libintl.h>
#include <gsl/gsl_errno.h>
-#include <signal.h>
#include <argp.h>
#include <ui/command-line.h>
journal_enable ();
textdomain (PACKAGE);
- /* Ignore alarm clock signals */
- signal (SIGALRM, SIG_IGN);
-
command_line_processor_replace_aux (clp, &post_init_argp, the_source_stream);
command_line_processor_replace_aux (clp, &non_option_argp, the_source_stream);
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2007, 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
signal (SIGABRT, bug_handler);
signal (SIGSEGV, bug_handler);
signal (SIGFPE, bug_handler);
- signal (SIGALRM, SIG_IGN);
at_fatal_signal (clean_up);
i18n_init ();