131dce2329c15a4393c2c843e29c7e1d110012a3
[pspp-builds.git] / src / language / stats / chisquare.h
1 /* PSPP - computes sample statistics.
2    Copyright (C) 2006 Free Software Foundation, Inc.
3
4    This program is free software; you can redistribute it and/or
5    modify it under the terms of the GNU General Public License as
6    published by the Free Software Foundation; either version 2 of the
7    License, or (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17    02110-1301, USA. */
18
19 #if !chisquare_h
20 #define chisquare_h 1
21
22 #include <stddef.h>
23 #include <stdbool.h>
24 #include <language/stats/npar.h>
25
26 struct chisquare_test
27 {
28   struct one_sample_test parent;
29
30   bool ranged ;     /* True if this test has a range specified */
31
32   int lo;           /* Lower bound of range (undefined if RANGED is false) */
33   int hi;           /* Upper bound of range (undefined if RANGED is false) */
34
35   double *expected;
36   int n_expected;
37 };
38
39 struct casereader;
40 struct dictionary;
41 struct hsh_table;
42 struct dataset;
43
44 void chisquare_insert_variables (const struct npar_test *test,
45                                  struct hsh_table *variables);
46
47
48 void chisquare_execute (const struct dataset *ds,
49                         struct casereader *input,
50                         enum mv_class exclude,
51                         const struct npar_test *test);
52
53
54
55 #endif