Add copyright and licence notices to files which lack them.
[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 AT_BANNER([output -- tables])
17
18 AT_SETUP([OUTPUT precision])
19
20 AT_DATA([prec.sps], [[
21 data list notable list /A * B *.
22 begin data.
23 2.0 3.0
24 1.0 2.0
25 2.0 4.5
26 2.0 4.5
27 3.0 6.0
28 end data.
29
30 OUTPUT MODIFY 
31        /SELECT TABLES 
32        /TABLECELLS  SELECT = [ SIGNIFICANCE ] 
33             FORMAT = F.3.
34
35 t-test /PAIRS a with b (PAIRED).
36
37 OUTPUT MODIFY 
38        /SELECT TABLES 
39        /TABLECELLS  SELECT = [ SIGNIFICANCE ] 
40             FORMAT = F12.5.
41
42 t-test /PAIRS a with b (PAIRED).
43
44 ]])
45
46 AT_CHECK([pspp -O format=csv prec.sps], [0], [dnl
47 Table: Paired Sample Statistics
48 ,,Mean,N,Std. Deviation,S.E. Mean
49 Pair 1,A,2.00,5,.71,.32
50 ,B,4.00,5,1.54,.69
51
52 Table: Paired Samples Correlations
53 ,,N,Correlation,Sig.
54 Pair 1,A & B,5,.92,.028
55
56 Table: Paired Samples Test
57 ,,Paired Differences,,,,,,,
58 ,,,,,95% Confidence Interval of the Difference,,,,
59 ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
60 Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.009
61
62 Table: Paired Sample Statistics
63 ,,Mean,N,Std. Deviation,S.E. Mean
64 Pair 1,A,2.00,5,.71,.32
65 ,B,4.00,5,1.54,.69
66
67 Table: Paired Samples Correlations
68 ,,N,Correlation,Sig.
69 Pair 1,A & B,5,.92,.02801
70
71 Table: Paired Samples Test
72 ,,Paired Differences,,,,,,,
73 ,,,,,95% Confidence Interval of the Difference,,,,
74 ,,Mean,Std. Deviation,Std. Error Mean,Lower,Upper,t,df,Sig. (2-tailed)
75 Pair 1,A - B,-2.00,.94,.42,-3.16,-.84,-4.78,4,.00877
76 ])
77
78 AT_CLEANUP
79
80
81
82
83 AT_SETUP([OUTPUT crash])
84
85 AT_DATA([prec.sps], [[
86 data list notable list /A * B *.
87 begin data.
88 2.0 3.0
89 1.0 2.0
90 end data.
91
92 OUTPUT MODIFY 
93        /SELECT TABLES 
94        /TABLECELLS  SELECT = [ SIGNIFICANCE ] 
95        "FORMAT = F/1.
96
97 t-test /PAIRS a with b (PAIRED).
98 ]])
99
100 AT_CHECK([pspp -O format=csv prec.sps], [1], [ignore])
101
102 AT_CLEANUP