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 diff -b -B $TEMPDIR/pspp.list - << EOF
79 1.1 DATA LIST. Reading free-form data from the command file.
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 #=#==#=======#=#=======#==#=======#
98 2.2 EXAMINE. Descriptives
99 #============================================#=========#==========#
100 # #Statistic|Std. Error#
101 #============================================#=========#==========#
102 #XMean # 2.02 | .034 #
103 # 95% Confidence Interval for MeanLower Bound# 2.021 | #
104 # Upper Bound# 2.017 | #
105 # 5% Trimmed Mean # 2.00 | #
107 # Variance # .058 | #
108 # Std. Deviation # .242 | #
109 # Minimum # 1.000 | #
110 # Maximum # 3.000 | #
112 # Interquartile Range # .00 | #
113 # Skewness # 1.194 | .330 #
114 # Kurtosis # 15.732 | .650 #
115 #============================================#=========#==========#
118 if [ $? -ne 0 ] ; then fail ; fi