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 export STAT_CONFIG_PATH=$top_srcdir/config
51 activity="create program"
53 DATA LIST LIST /x * c *.
64 /STATISTICS=DESCRIPTIVES
67 if [ $? -ne 0 ] ; then no_result ; fi
70 activity="run program"
71 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
72 if [ $? -ne 0 ] ; then no_result ; fi
75 activity="compare results"
76 diff $TEMPDIR/pspp.list - << EOF
77 1.1 DATA LIST. Reading free-form data from the command file.
85 2.1 EXAMINE. Case Processing Summary
86 #=#===============================#
88 # #----------+---------+----------#
89 # # Valid | Missing | Total #
90 # #--+-------+-+-------+--+-------#
91 # # N|Percent|N|Percent| N|Percent#
92 #=#==#=======#=#=======#==#=======#
93 #X#52| 100%|0| 0%|52| 100%#
94 #=#==#=======#=#=======#==#=======#
96 2.2 EXAMINE. Descriptives
97 #============================================#=========#==========#
98 # #Statistic|Std. Error#
99 #============================================#=========#==========#
100 #XMean # 2.02 | .034 #
101 # 95% Confidence Interval for MeanLower Bound# 2.021 | #
102 # Upper Bound# 2.017 | #
103 # 5% Trimmed Mean # 2.00 | #
105 # Variance # .058 | #
106 # Std. Deviation # .242 | #
107 # Minimum # 1.000 | #
108 # Maximum # 3.000 | #
110 # Interquartile Range # .00 | #
111 # Skewness # 1.194 | .330 #
112 # Kurtosis # 15.732 | .650 #
113 #============================================#=========#==========#
116 if [ $? -ne 0 ] ; then fail ; fi