3 # This program tests the Trimmed Mean calculation, in the case
4 # where the data is weighted towards the centre
6 TEMPDIR=/tmp/pspp-tst-$$
7 TESTFILE=$TEMPDIR/`basename $0`.sps
11 # ensure that top_srcdir is absolute
12 cd $top_srcdir; top_srcdir=`pwd`
14 STAT_CONFIG_PATH=$top_srcdir/config
15 export STAT_CONFIG_PATH
53 activity="create program"
55 DATA LIST LIST /X * C *.
66 /STATISTICS=DESCRIPTIVES
69 if [ $? -ne 0 ] ; then no_result ; fi
72 activity="run program"
73 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
74 if [ $? -ne 0 ] ; then no_result ; fi
77 activity="compare results"
78 perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list
79 diff -b $TEMPDIR/pspp.list - << EOF
80 1.1 DATA LIST. Reading free-form data from INLINE.
87 2.1 EXAMINE. Case Processing Summary
88 #=#===============================#
90 # #----------+---------+----------#
91 # # Valid | Missing | Total #
92 # #--+-------+-+-------+--+-------#
93 # # N|Percent|N|Percent| N|Percent#
94 #=#==#=======#=#=======#==#=======#
95 #X#52| 100%|0| 0%|52| 100%#
96 #=#==#=======#=#=======#==#=======#
97 2.2 EXAMINE. Descriptives
98 #============================================#=========#==========#
99 # #Statistic|Std. Error#
100 #============================================#=========#==========#
101 #XMean # 2.02 | .034 #
102 # 95% Confidence Interval for MeanLower Bound# 2.021 | #
103 # Upper Bound# 2.017 | #
104 # 5% Trimmed Mean # 2.00 | #
106 # Variance # .058 | #
107 # Std. Deviation # .242 | #
108 # Minimum # 1.000 | #
109 # Maximum # 3.000 | #
111 # Interquartile Range # .00 | #
112 # Skewness # 1.194 | .330 #
113 # Kurtosis # 15.732 | .650 #
114 #============================================#=========#==========#
116 if [ $? -ne 0 ] ; then fail ; fi