3 # This program tests the EXAMINE command.
5 TEMPDIR=/tmp/pspp-tst-$$
6 TESTFILE=$TEMPDIR/`basename $0`.sps
8 # ensure that top_builddir are absolute
9 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
10 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
11 top_builddir=`cd $top_builddir; pwd`
12 PSPP=$top_builddir/src/ui/terminal/pspp
14 # ensure that top_srcdir is absolute
15 top_srcdir=`cd $top_srcdir; pwd`
17 STAT_CONFIG_PATH=$top_srcdir/config
18 export STAT_CONFIG_PATH
25 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
26 echo "NOT cleaning $TEMPDIR"
61 activity="create program"
63 DATA LIST LIST /QUALITY * W * BRAND * .
85 VARIABLE LABELS brand 'Manufacturer'.
86 VARIABLE LABELS quality 'Breaking Strain'.
88 VALUE LABELS /brand 1 'Aspeger' 2 'Bloggs' 3 'Charlies'.
90 LIST /FORMAT=NUMBERED.
94 /STATISTICS descriptives extreme(3)
97 if [ $? -ne 0 ] ; then no_result ; fi
100 activity="run program"
101 $SUPERVISOR $PSPP -o pspp.csv $TESTFILE
102 if [ $? -ne 0 ] ; then no_result ; fi
104 # NOTE: In the following data: Only the extreme values have been checked
105 # The descriptives have been blindly pasted.
106 activity="compare results"
107 diff -c $TEMPDIR/pspp.csv - << EOF
108 Table: Reading free-form data from INLINE.
115 Case Number,QUALITY,W,BRAND
133 Table: Case Processing Summary
135 ,Valid,,Missing,,Total,
136 ,N,Percent,N,Percent,N,Percent
137 Breaking Strain,24.00,100%,.00,0%,24.00,100%
139 Table: Extreme Values
141 Breaking Strain,Highest,1,12,7.00
149 ,,,Statistic,Std. Error
150 Breaking Strain,Mean,,3.54,.32
151 ,95% Confidence Interval for Mean,Lower Bound,2.87,
153 ,5% Trimmed Mean,,3.50,
156 ,Std. Deviation,,1.59,
160 ,Interquartile Range,,2.75,
164 Table: Case Processing Summary
166 ,,Valid,,Missing,,Total,
167 ,Manufacturer,N,Percent,N,Percent,N,Percent
168 Breaking Strain,Aspeger,8.00,100%,.00,0%,8.00,100%
169 ,Bloggs,8.00,100%,.00,0%,8.00,100%
170 ,Charlies,8.00,100%,.00,0%,8.00,100%
172 Table: Extreme Values
173 ,Manufacturer,,,Case Number,Value
174 Breaking Strain,Aspeger,Highest,1,5,4.00
180 ,Bloggs,Highest,1,7,5.00
186 ,Charlies,Highest,1,12,7.00
194 ,Manufacturer,,,Statistic,Std. Error
195 Breaking Strain,Aspeger,Mean,,2.25,.45
196 ,,95% Confidence Interval for Mean,Lower Bound,1.18,
198 ,,5% Trimmed Mean,,2.22,
201 ,,Std. Deviation,,1.28,
205 ,,Interquartile Range,,2.75,
207 ,,Kurtosis,,-1.55,1.48
208 ,Bloggs,Mean,,3.50,.38
209 ,,95% Confidence Interval for Mean,Lower Bound,2.61,
211 ,,5% Trimmed Mean,,3.50,
214 ,,Std. Deviation,,1.07,
218 ,,Interquartile Range,,1.75,
220 ,,Kurtosis,,-.83,1.48
221 ,Charlies,Mean,,4.88,.44
222 ,,95% Confidence Interval for Mean,Lower Bound,3.83,
224 ,,5% Trimmed Mean,,4.86,
227 ,,Std. Deviation,,1.25,
231 ,,Interquartile Range,,1.75,
235 if [ $? -ne 0 ] ; then fail ; fi