Fixed bug reporting the significance of paired value t-test.
[pspp-builds.git] / src / math / factor-stats.c
index fd4d91d04df1a4a3267671b795d0f4ae703c850d..a97d7f09349b7fabe25c49383357f87103205ac7 100644 (file)
@@ -1,29 +1,25 @@
-/* PSPP - A program for statistical analysis . -*-c-*-
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2004 Free Software Foundation, Inc.
 
-Copyright (C) 2004 Free Software Foundation, Inc.
-Author: John Darrington 2004
+   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
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-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 the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA. */
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
 #include "factor-stats.h"
+#include <data/val-type.h>
 #include <data/value.h>
 #include <libpspp/hash.h>
 #include <libpspp/array.h>
-#include <libpspp/alloc.h>
 #include "moments.h"
 #include "percentiles.h"
 
@@ -33,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 #include <assert.h>
 #include "histogram.h"
 
+#include "xalloc.h"
 
 void
 metrics_precalc(struct metrics *m)
@@ -76,11 +73,9 @@ metrics_calc (struct metrics *fs, const union value *val,
 
   moments1_add(fs->moments, x, weight);
 
-
   if ( x < fs->min) fs->min = x;
   if ( x > fs->max) fs->max = x;
 
-
   wv = (struct weighted_value **) hsh_probe (fs->ordered_data,(void *) val );
 
   if ( *wv  )