623d366c0cc1371e2a0ceb1d1ddbce5f26c44199
[pspp] / tests / output / tables.at
1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
3 dnl 
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
8 dnl 
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl GNU General Public License for more details.
13 dnl 
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 dnl
17 AT_BANNER([output -- tables])
18
19 AT_SETUP([OUTPUT precision])
20
21 AT_DATA([prec.sps], [[
22 data list notable list /A * B *.
23 begin data.
24 2.0 3.0
25 1.0 2.0
26 2.0 4.5
27 2.0 4.5
28 3.0 6.0
29 end data.
30
31 OUTPUT MODIFY 
32        /SELECT TABLES 
33        /TABLECELLS  SELECT = [ SIGNIFICANCE ] 
34             FORMAT = F.3.
35
36 t-test /PAIRS a with b (PAIRED).
37
38 OUTPUT MODIFY 
39        /SELECT TABLES 
40        /TABLECELLS  SELECT = [ SIGNIFICANCE ] 
41             FORMAT = F12.5.
42
43 t-test /PAIRS a with b (PAIRED).
44
45 ]])
46
47 AT_CHECK([pspp -O format=csv prec.sps], [0], [dnl
48 Table: Paired Sample Statistics
49 ,,Mean,N,Std. Deviation,S.E. Mean
50 Pair 1,A,2.00,5,.71,.32
51 ,B,4.00,5,1.54,.69
52
53 Table: Paired Samples Correlations
54 ,,N,Correlation,Sig.
55 Pair 1,A & B,5,.92,.028
56
57 Table: Paired Samples Test
58 ,,Paired Differences,,,,,,,
59 ,,,,,95% Confidence Interval of the Difference,,,,
60 ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
61 Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.009
62
63 Table: Paired Sample Statistics
64 ,,Mean,N,Std. Deviation,S.E. Mean
65 Pair 1,A,2.00,5,.71,.32
66 ,B,4.00,5,1.54,.69
67
68 Table: Paired Samples Correlations
69 ,,N,Correlation,Sig.
70 Pair 1,A & B,5,.92,.02801
71
72 Table: Paired Samples Test
73 ,,Paired Differences,,,,,,,
74 ,,,,,95% Confidence Interval of the Difference,,,,
75 ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
76 Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.00877
77 ])
78
79 AT_CLEANUP
80
81
82
83
84 AT_SETUP([OUTPUT crash])
85
86 AT_DATA([prec.sps], [[
87 data list notable list /A * B *.
88 begin data.
89 2.0 3.0
90 1.0 2.0
91 end data.
92
93 OUTPUT MODIFY 
94        /SELECT TABLES 
95        /TABLECELLS  SELECT = [ SIGNIFICANCE ] 
96        "FORMAT = F/1.
97
98 t-test /PAIRS a with b (PAIRED).
99 ]])
100
101 AT_CHECK([pspp -O format=csv prec.sps], [1], [ignore])
102
103 AT_CLEANUP