Re-implemented the T-TEST command and the levene calculation.
[pspp] / src / language / stats / t-test.h
1 /* PSPP - a program for statistical analysis.
2    Copyright (C) 2011 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU 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, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef T_TEST_H
18 #define T_TEST_H 1
19
20 #include "data/missing-values.h"
21
22 struct variable;
23 typedef const struct variable *vp[2];
24
25 enum missing_type
26   {
27     MISS_LISTWISE,
28     MISS_ANALYSIS,
29   };
30
31 enum mode
32   {
33     MODE_PAIRED,
34     MODE_INDEP,
35     MODE_SINGLE,
36   };
37
38 struct tt
39 {
40   size_t n_vars;
41   const struct variable **vars;
42   enum mode mode;
43   enum missing_type missing_type;
44   enum mv_class exclude;
45   double confidence;
46   const struct variable *wv;
47   const struct dictionary *dict;
48 };
49
50 struct casereader;
51 union value;
52
53 void one_sample_run (const struct tt *tt, double testval, struct casereader *reader);
54 void paired_run (const struct tt *tt, size_t n_pairs, vp *pairs, struct casereader *reader);
55 void indep_run (struct tt *tt, const struct variable *gvar,
56                 bool cut,
57                 const union value *gval0, const union value *gval1,
58                 struct casereader *reader);
59
60
61 #endif