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-$$
10 # ensure that top_srcdir is absolute
11 cd $top_srcdir; top_srcdir=`pwd`
13 export STAT_CONFIG_PATH=$top_srcdir/config
50 activity="create program"
51 cat > $TEMPDIR/out.stat <<EOF
52 DATA LIST LIST /x * c *.
63 /STATISTICS=DESCRIPTIVES
66 if [ $? -ne 0 ] ; then no_result ; fi
69 activity="run program"
70 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
71 if [ $? -ne 0 ] ; then no_result ; fi
74 activity="compare results"
75 diff $TEMPDIR/pspp.list - << EOF
76 1.1 DATA LIST. Reading free-form data from the command file.
84 2.1 EXAMINE. Case Processing Summary
85 #=#===============================#
87 # #----------+---------+----------#
88 # # Valid | Missing | Total #
89 # #--+-------+-+-------+--+-------#
90 # # N|Percent|N|Percent| N|Percent#
91 #=#==#=======#=#=======#==#=======#
92 #X#52| 100%|0| 0%|52| 100%#
93 #=#==#=======#=#=======#==#=======#
95 2.2 EXAMINE. Descriptives
96 #============================================#=========#==========#
97 # #Statistic|Std. Error#
98 #============================================#=========#==========#
99 #XMean # 2.02 | .034 #
100 # 95% Confidence Interval for MeanLower Bound# 2.021 | #
101 # Upper Bound# 2.017 | #
102 # 5% Trimmed Mean # 2.00 | #
104 # Variance # .058 | #
105 # Std. Deviation # .242 | #
106 # Minimum # 1.000 | #
107 # Maximum # 3.000 | #
109 # Interquartile Range # .00 | #
110 # Skewness # 1.194 | .330 #
111 # Kurtosis # 15.732 | .650 #
112 #============================================#=========#==========#
115 if [ $? -ne 0 ] ; then fail ; fi