3 # This program tests the PERCENTILES subcommand of the EXAMINE command.
4 # In particular it tests that it behaves properly when there are only
7 TEMPDIR=/tmp/pspp-tst-$$
8 TESTFILE=$TEMPDIR/`basename $0`.sps
12 # ensure that top_srcdir is absolute
13 cd $top_srcdir; top_srcdir=`pwd`
15 STAT_CONFIG_PATH=$top_srcdir/config
16 export STAT_CONFIG_PATH
52 activity="create program"
62 /PERCENTILES=HAVERAGE.
65 /PERCENTILES=WAVERAGE.
71 /PERCENTILES=EMPIRICAL.
74 /PERCENTILES=AEMPIRICAL.
76 if [ $? -ne 0 ] ; then no_result ; fi
78 activity="run program"
79 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
80 if [ $? -ne 0 ] ; then no_result ; fi
83 activity="compare results"
84 diff -b -B $TEMPDIR/pspp.list - << EOF
85 1.1 DATA LIST. Reading free-form data from the command file.
92 2.1 EXAMINE. Case Processing Summary
93 #=#=============================#
95 # #---------+---------+---------#
96 # # Valid | Missing | Total #
97 # #-+-------+-+-------+-+-------#
98 # #N|Percent|N|Percent|N|Percent#
99 #=#=#=======#=#=======#=#=======#
100 #X#3| 100%|0| 0%|3| 100%#
101 #=#=#=======#=#=======#=#=======#
103 2.2 EXAMINE. Percentiles
104 #================#================================#
106 # #---+---+----+----+----+----+----#
107 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
108 #=#==============#===#===#====#====#====#====#====#
109 #X|HAverage #.40|.80|2.00|5.00|8.00|8.00|8.00#
110 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
111 #=#==============#===#===#====#====#====#====#====#
113 3.1 EXAMINE. Case Processing Summary
114 #=#=============================#
116 # #---------+---------+---------#
117 # # Valid | Missing | Total #
118 # #-+-------+-+-------+-+-------#
119 # #N|Percent|N|Percent|N|Percent#
120 #=#=#=======#=#=======#=#=======#
121 #X#3| 100%|0| 0%|3| 100%#
122 #=#=#=======#=#=======#=#=======#
124 3.2 EXAMINE. Percentiles
125 #==================#================================#
127 # #---+---+----+----+----+----+----#
128 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
129 #=#================#===#===#====#====#====#====#====#
130 #X|Weighted Average#.30|.60|1.50|3.50|5.75|7.10|7.55#
131 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
132 #=#================#===#===#====#====#====#====#====#
134 4.1 EXAMINE. Case Processing Summary
135 #=#=============================#
137 # #---------+---------+---------#
138 # # Valid | Missing | Total #
139 # #-+-------+-+-------+-+-------#
140 # #N|Percent|N|Percent|N|Percent#
141 #=#=#=======#=#=======#=#=======#
142 #X#3| 100%|0| 0%|3| 100%#
143 #=#=#=======#=#=======#=#=======#
145 4.2 EXAMINE. Percentiles
146 #================#================================#
148 # #---+---+----+----+----+----+----#
149 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
150 #=#==============#===#===#====#====#====#====#====#
151 #X|Rounded #.00|.00|2.00|5.00|5.00|8.00|8.00#
152 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
153 #=#==============#===#===#====#====#====#====#====#
155 5.1 EXAMINE. Case Processing Summary
156 #=#=============================#
158 # #---------+---------+---------#
159 # # Valid | Missing | Total #
160 # #-+-------+-+-------+-+-------#
161 # #N|Percent|N|Percent|N|Percent#
162 #=#=#=======#=#=======#=#=======#
163 #X#3| 100%|0| 0%|3| 100%#
164 #=#=#=======#=#=======#=#=======#
166 5.2 EXAMINE. Percentiles
167 #================#==================================#
169 # #----+----+----+----+----+----+----#
170 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
171 #=#==============#====#====#====#====#====#====#====#
172 #X|Empirical #2.00|2.00|2.00|5.00|8.00|8.00|8.00#
173 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
174 #=#==============#====#====#====#====#====#====#====#
176 6.1 EXAMINE. Case Processing Summary
177 #=#=============================#
179 # #---------+---------+---------#
180 # # Valid | Missing | Total #
181 # #-+-------+-+-------+-+-------#
182 # #N|Percent|N|Percent|N|Percent#
183 #=#=#=======#=#=======#=#=======#
184 #X#3| 100%|0| 0%|3| 100%#
185 #=#=#=======#=#=======#=#=======#
187 6.2 EXAMINE. Percentiles
188 #==========================#==================================#
190 # #----+----+----+----+----+----+----#
191 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
192 #=#========================#====#====#====#====#====#====#====#
193 #X|Empirical with averaging#2.00|2.00|2.00|5.00|8.00|8.00|8.00#
194 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
195 #=#========================#====#====#====#====#====#====#====#
198 if [ $? -ne 0 ] ; then fail ; fi