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
52 activity="create program"
54 DATA LIST LIST /X * C *.
65 /STATISTICS=DESCRIPTIVES
68 if [ $? -ne 0 ] ; then no_result ; fi
71 activity="run program"
72 $SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE
73 if [ $? -ne 0 ] ; then no_result ; fi
76 activity="compare results"
77 diff -b -B $TEMPDIR/pspp.list - << EOF
78 1.1 DATA LIST. Reading free-form data from the command file.
86 2.1 EXAMINE. Case Processing Summary
87 #=#===============================#
89 # #----------+---------+----------#
90 # # Valid | Missing | Total #
91 # #--+-------+-+-------+--+-------#
92 # # N|Percent|N|Percent| N|Percent#
93 #=#==#=======#=#=======#==#=======#
94 #X#52| 100%|0| 0%|52| 100%#
95 #=#==#=======#=#=======#==#=======#
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 #============================================#=========#==========#
117 if [ $? -ne 0 ] ; then fail ; fi