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 export STAT_CONFIG_PATH=$top_srcdir/config
51 activity="create program"
61 /PERCENTILES=HAVERAGE.
64 /PERCENTILES=WAVERAGE.
70 /PERCENTILES=EMPIRICAL.
73 /PERCENTILES=AEMPIRICAL.
75 if [ $? -ne 0 ] ; then no_result ; fi
77 activity="run program"
78 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
79 if [ $? -ne 0 ] ; then no_result ; fi
82 activity="compare results"
83 diff -b -B $TEMPDIR/pspp.list - << EOF
84 1.1 DATA LIST. Reading free-form data from the command file.
91 2.1 EXAMINE. Case Processing Summary
92 #=#=============================#
94 # #---------+---------+---------#
95 # # Valid | Missing | Total #
96 # #-+-------+-+-------+-+-------#
97 # #N|Percent|N|Percent|N|Percent#
98 #=#=#=======#=#=======#=#=======#
99 #X#3| 100%|0| 0%|3| 100%#
100 #=#=#=======#=#=======#=#=======#
102 2.2 EXAMINE. Percentiles
103 #================#================================#
105 # #---+---+----+----+----+----+----#
106 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
107 #=#==============#===#===#====#====#====#====#====#
108 #X|HAverage #.40|.80|2.00|5.00|8.00|8.00|8.00#
109 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
110 #=#==============#===#===#====#====#====#====#====#
112 3.1 EXAMINE. Case Processing Summary
113 #=#=============================#
115 # #---------+---------+---------#
116 # # Valid | Missing | Total #
117 # #-+-------+-+-------+-+-------#
118 # #N|Percent|N|Percent|N|Percent#
119 #=#=#=======#=#=======#=#=======#
120 #X#3| 100%|0| 0%|3| 100%#
121 #=#=#=======#=#=======#=#=======#
123 3.2 EXAMINE. Percentiles
124 #==================#================================#
126 # #---+---+----+----+----+----+----#
127 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
128 #=#================#===#===#====#====#====#====#====#
129 #X|Weighted Average#.30|.60|1.50|3.50|5.75|7.10|7.55#
130 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
131 #=#================#===#===#====#====#====#====#====#
133 4.1 EXAMINE. Case Processing Summary
134 #=#=============================#
136 # #---------+---------+---------#
137 # # Valid | Missing | Total #
138 # #-+-------+-+-------+-+-------#
139 # #N|Percent|N|Percent|N|Percent#
140 #=#=#=======#=#=======#=#=======#
141 #X#3| 100%|0| 0%|3| 100%#
142 #=#=#=======#=#=======#=#=======#
144 4.2 EXAMINE. Percentiles
145 #================#================================#
147 # #---+---+----+----+----+----+----#
148 # # 5 | 10| 25 | 50 | 75 | 90 | 95 #
149 #=#==============#===#===#====#====#====#====#====#
150 #X|Rounded #.00|.00|2.00|5.00|5.00|8.00|8.00#
151 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
152 #=#==============#===#===#====#====#====#====#====#
154 5.1 EXAMINE. Case Processing Summary
155 #=#=============================#
157 # #---------+---------+---------#
158 # # Valid | Missing | Total #
159 # #-+-------+-+-------+-+-------#
160 # #N|Percent|N|Percent|N|Percent#
161 #=#=#=======#=#=======#=#=======#
162 #X#3| 100%|0| 0%|3| 100%#
163 #=#=#=======#=#=======#=#=======#
165 5.2 EXAMINE. Percentiles
166 #================#==================================#
168 # #----+----+----+----+----+----+----#
169 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
170 #=#==============#====#====#====#====#====#====#====#
171 #X|Empirical #2.00|2.00|2.00|5.00|8.00|8.00|8.00#
172 # |Tukey's Hinges# | |3.50|5.00|6.50| | #
173 #=#==============#====#====#====#====#====#====#====#
175 6.1 EXAMINE. Case Processing Summary
176 #=#=============================#
178 # #---------+---------+---------#
179 # # Valid | Missing | Total #
180 # #-+-------+-+-------+-+-------#
181 # #N|Percent|N|Percent|N|Percent#
182 #=#=#=======#=#=======#=#=======#
183 #X#3| 100%|0| 0%|3| 100%#
184 #=#=#=======#=#=======#=#=======#
186 6.2 EXAMINE. Percentiles
187 #==========================#==================================#
189 # #----+----+----+----+----+----+----#
190 # # 5 | 10 | 25 | 50 | 75 | 90 | 95 #
191 #=#========================#====#====#====#====#====#====#====#
192 #X|Empirical with averaging#2.00|2.00|2.00|5.00|8.00|8.00|8.00#
193 # |Tukey's Hinges # | |3.50|5.00|6.50| | #
194 #=#========================#====#====#====#====#====#====#====#
197 if [ $? -ne 0 ] ; then fail ; fi