Documented the EXAMINE subcommands. Fixed up the examine test. Fixed a problem...
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 21 Nov 2004 02:43:46 +0000 (02:43 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 21 Nov 2004 02:43:46 +0000 (02:43 +0000)
doc/statistics.texi
src/ChangeLog
src/examine.q
tests/command/examine.sh

index 08d66d797e922554512fc209760b22a3ed182a93..19fe6d5abcab12f21db907760203f97999fda7b8 100644 (file)
@@ -222,7 +222,7 @@ For instance, @code{/NTILES=4} would cause quartiles to be reported.
 
 @display
 EXAMINE
-        VARIABLES=var_list [[BY var_list] [BY var_list]]
+        VARIABLES=var_list [BY factor_list ]
         /STATISTICS=@{DESCRIPTIVES, EXTREME[(n)], ALL, NONE@}
         /PLOT=@{STEMLEAF, BOXPLOT, NPPLOT, SPREADLEVEL(n), HISTOGRAM, 
               ALL, NONE@}
@@ -232,11 +232,46 @@ EXAMINE
         /@{TOTAL,NOTOTAL@}
         /MISSING=@{LISTWISE, PAIRWISE@} [@{EXCLUDE, INCLUDE@}] 
                [@{NOREPORT,REPORT@}]
+
 @end display
 
 The @cmd{EXAMINE} command is used to test how closely a distribution is to a 
 normal distribution.  It also shows you outliers and extreme values.
 
+The VARIABLES subcommand specifies the dependent variables and the
+independent variable to use as factors for the analysis.   Variables
+listed before the first BY keyword are the dependent variables.
+The dependent variables may optionally be followed by a list of
+factors which tell PSPP how to break down the analysis for each
+dependent variable.  The format for each factor is 
+@display
+var [BY var].
+@end display
+
+
+The STATISTICS subcommand specifies the analysis to be done.  
+DESCRIPTIVES will produce a table showing some parametric and
+non-parametrics statistics.  EXTREME produces a table showing extreme
+values of the dependent variable.  A number in parentheses determines
+how many upper and lower extremes to show.  The default number is 5.
+
+
+The PLOT subcommand specifies which plots are to be produced if any.
+
+The CINTERVAL subcommand specifies the confidence interval to use in
+calculation of the descriptives command.  The default it 95%.
+
+The TOTAL and NOTOTAL subcommands are mutually exclusive.  If NOTOTAL
+is given and factors have been specified in the VARIABLES subcommand,
+then then statistics for the unfactored dependent variables are
+produced in addition to the factored variables.  If there are no
+factors specified then TOTAL and NOTOTAL have no effect.
+
+@strong{Warning!}
+If many dependent variable are given, or factors are given for which
+there are many distinct values, then @cmd{EXAMINE} will produce a very
+large quantity of output.
+
 
 @node CROSSTABS, T-TEST, EXAMINE, Statistics
 @section CROSSTABS
index 07513dc2206d65669d43885f67d4d6b5d1331a17..feddfc900f564c56d9d4f1ed198a90d1322c17ba 100644 (file)
@@ -1,3 +1,5 @@
+Sun Nov 21 10:32:41 WST 2004 John Darrington <john@darrington.wattle.id.au>
+
        * var-labs.c (var_to_string) Now returns null if the variable is null
 
        * value-labels.c (value_to_string) Made it return null if either the 
index 697176f3269f23cb6af8c2e9b67efc023896a823..044edaf1b0c9f44d25e83d931aa07ead5b89c1f1 100644 (file)
@@ -205,7 +205,7 @@ output_examine(void)
   struct factor *fctr;
 
   /* Show totals if appropriate */
-  if ( ! cmd.sbc_nototal )
+  if ( ! cmd.sbc_nototal || factors == 0 )
     {
       show_summary(dependent_vars, n_dependent_vars, 0);
 
index 53064965e2b27b2dc58439101898ec30e77d6b6d..13f7c888106f168752789b31ba22fdc61350255a 100755 (executable)
@@ -88,7 +88,6 @@ activity="run program"
 $SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/out.stat
 if [ $? -ne 0 ] ; then no_result ; fi
 
-
 # NOTE:  In the following data: Only the extreme values have been checked
 # The descriptives have been blindly pasted.
 activity="compare results"
@@ -122,133 +121,137 @@ Case#  QUALITY        W    BRAND
    16     6.00     1.00     3.00 
 
 2.1 EXAMINE.  Case Processing Summary
-#===============#=============================#
-#               #            Cases            #
-#               #---------+---------+---------#
-#               #  Valid  | Missing |  Total  #
-#---------------#-+-------+-+-------+-+-------#
-#               #N|Percent|N|Percent|N|Percent#
-#===============#=#=======#=#=======#=#=======#
-#Breaking Strain# |       | |       | |       #
-#===============#=#=======#=#=======#=#=======#
-
-2.2 EXAMINE.  Descriptives
-#===============#===========================================#=========#==========#
-#               |                                           #Statistic|Std. Error#
-#===============#===========================================#=========#==========#
-#Breaking Strain|Mean                                       #   3.54  |   .324   #
-#               |95% Confidence Interval for MeanLower Bound#  3.562  |          #
-#               |                                Upper Bound#  3.521  |          #
-#               |5% Trimmed Mean                            #   3.50  |          #
-#               |Median                                     #         |          #
-#               |Variance                                   #  2.520  |          #
-#               |Std. Deviation                             #  1.587  |          #
-#               |Minimum                                    #  1.000  |          #
-#               |Maximum                                    #  7.000  |          #
-#               |Range                                      #  6.000  |          #
-#               |Interquartile Range                        #         |          #
-#               |Skewness                                   #         |          #
-#               |Kurtosis                                   #         |          #
-#===============#===========================================#=========#==========#
-
-2.3 EXAMINE.  Extreme Values
+#===============#===============================#
+#               #             Cases             #
+#               #----------+---------+----------#
+#               #   Valid  | Missing |   Total  #
+#               #--+-------+-+-------+--+-------#
+#               # N|Percent|N|Percent| N|Percent#
+#===============#==#=======#=#=======#==#=======#
+#Breaking Strain#24|   100%|0|     0%|24|   100%#
+#===============#==#=======#=#=======#==#=======#
+
+2.2 EXAMINE.  Extreme Values
 #=======================#===========#=====#
 #                       #Case Number|Value#
 #=======================#===========#=====#
 #Breaking StrainHighest1#         12| 7.00#
 #                      2#         16| 6.00#
 #                      3#         14| 5.00#
+#               --------#-----------+-----#
 #                Lowest1#          4| 1.00#
 #                      2#          3| 1.00#
 #                      3#          3| 1.00#
 #=======================#===========#=====#
 
+2.3 EXAMINE.  Descriptives
+#==========================================================#=========#==========#
+#                                                          #Statistic|Std. Error#
+#==========================================================#=========#==========#
+#Breaking StrainMean                                       #   3.54  |   .324   #
+#               95% Confidence Interval for MeanLower Bound#  3.562  |          #
+#                                               Upper Bound#  3.521  |          #
+#               5% Trimmed Mean                            #   3.50  |          #
+#               Median                                     #         |          #
+#               Variance                                   #  2.520  |          #
+#               Std. Deviation                             #  1.587  |          #
+#               Minimum                                    #  1.000  |          #
+#               Maximum                                    #  7.000  |          #
+#               Range                                      #  6.000  |          #
+#               Interquartile Range                        #         |          #
+#               Skewness                                   #         |          #
+#               Kurtosis                                   #         |          #
+#==========================================================#=========#==========#
+
 2.4 EXAMINE.  Case Processing Summary
-#===============#============#=============================#
-#               |            #            Cases            #
-#               |            #---------+---------+---------#
-#               |            #  Valid  | Missing |  Total  #
-#---------------+------------#-+-------+-+-------+-+-------#
-#               |Manufacturer#N|Percent|N|Percent|N|Percent#
-#===============#============#=#=======#=#=======#=#=======#
-#Breaking Strain|     Aspeger# |       | |       | |       #
-#               |      Bloggs# |       | |       | |       #
-#               |    Charlies# |       | |       | |       #
-#===============#============#=#=======#=#=======#=#=======#
-
-2.5 EXAMINE.  Descriptives
-#===========================#===========================================#=========#==========#
-#               Manufacturer|                                           #Statistic|Std. Error#
-#===========================#===========================================#=========#==========#
-#Breaking Strain     Aspeger|Mean                                       #   2.25  |   .453   #
-#                           |95% Confidence Interval for MeanLower Bound#  2.279  |          #
-#                           |                                Upper Bound#  2.221  |          #
-#                           |5% Trimmed Mean                            #   2.22  |          #
-#                           |Median                                     #         |          #
-#                           |Variance                                   #  1.643  |          #
-#                           |Std. Deviation                             #  1.282  |          #
-#                           |Minimum                                    #  1.000  |          #
-#                           |Maximum                                    #  4.000  |          #
-#                           |Range                                      #  3.000  |          #
-#                           |Interquartile Range                        #         |          #
-#                           |Skewness                                   #         |          #
-#                           |Kurtosis                                   #         |          #
-#               ------------+-------------------------------------------#---------+----------#
-#                     Bloggs|Mean                                       #   3.50  |   .378   #
-#                           |95% Confidence Interval for MeanLower Bound#  3.525  |          #
-#                           |                                Upper Bound#  3.475  |          #
-#                           |5% Trimmed Mean                            #   3.50  |          #
-#                           |Median                                     #         |          #
-#                           |Variance                                   #  1.143  |          #
-#                           |Std. Deviation                             #  1.069  |          #
-#                           |Minimum                                    #  2.000  |          #
-#                           |Maximum                                    #  5.000  |          #
-#                           |Range                                      #  3.000  |          #
-#                           |Interquartile Range                        #         |          #
-#                           |Skewness                                   #         |          #
-#                           |Kurtosis                                   #         |          #
-#               ------------+-------------------------------------------#---------+----------#
-#                   Charlies|Mean                                       #   4.88  |   .441   #
-#                           |95% Confidence Interval for MeanLower Bound#  4.904  |          #
-#                           |                                Upper Bound#  4.846  |          #
-#                           |5% Trimmed Mean                            #   4.86  |          #
-#                           |Median                                     #         |          #
-#                           |Variance                                   #  1.554  |          #
-#                           |Std. Deviation                             #  1.246  |          #
-#                           |Minimum                                    #  3.000  |          #
-#                           |Maximum                                    #  7.000  |          #
-#                           |Range                                      #  4.000  |          #
-#                           |Interquartile Range                        #         |          #
-#                           |Skewness                                   #         |          #
-#                           |Kurtosis                                   #         |          #
-#===========================#===========================================#=========#==========#
-
-2.6 EXAMINE.  Extreme Values
+#===========================#=============================#
+#                           #            Cases            #
+#                           #---------+---------+---------#
+#                           #  Valid  | Missing |  Total  #
+#                           #-+-------+-+-------+-+-------#
+#               Manufacturer#N|Percent|N|Percent|N|Percent#
+#===========================#=#=======#=#=======#=#=======#
+#Breaking StrainAspeger     #8|   100%|0|     0%|8|   100%#
+#               Bloggs      #8|   100%|0|     0%|8|   100%#
+#               Charlies    #8|   100%|0|     0%|8|   100%#
+#===========================#=#=======#=#=======#=#=======#
+
+2.5 EXAMINE.  Extreme Values
 #===================================#===========#=====#
 #               Manufacturer        #Case Number|Value#
 #===================================#===========#=====#
-#Breaking Strain     AspegerHighest1#          6| 4.00#
+#Breaking StrainAspeger     Highest1#          6| 4.00#
 #                                  2#          5| 4.00#
 #                                  3#          1| 3.00#
+#                           --------#-----------+-----#
 #                            Lowest1#          4| 1.00#
 #                                  2#          3| 1.00#
 #                                  3#          3| 1.00#
 #               --------------------#-----------+-----#
-#                     BloggsHighest1#          7| 5.00#
+#               Bloggs      Highest1#          7| 5.00#
 #                                  2#          9| 4.00#
 #                                  3#          9| 4.00#
+#                           --------#-----------+-----#
 #                            Lowest1#         10| 2.00#
 #                                  2#          8| 2.00#
 #                                  3#         11| 3.00#
 #               --------------------#-----------+-----#
-#                   CharliesHighest1#         12| 7.00#
+#               Charlies    Highest1#         12| 7.00#
 #                                  2#         16| 6.00#
 #                                  3#         14| 5.00#
+#                           --------#-----------+-----#
 #                            Lowest1#         15| 3.00#
 #                                  2#         13| 4.00#
 #                                  3#         13| 4.00#
 #===================================#===========#=====#
 
+2.6 EXAMINE.  Descriptives
+#======================================================================#=========#==========#
+#               Manufacturer                                           #Statistic|Std. Error#
+#======================================================================#=========#==========#
+#Breaking StrainAspeger     Mean                                       #   2.25  |   .453   #
+#                           95% Confidence Interval for MeanLower Bound#  2.279  |          #
+#                                                           Upper Bound#  2.221  |          #
+#                           5% Trimmed Mean                            #   2.22  |          #
+#                           Median                                     #         |          #
+#                           Variance                                   #  1.643  |          #
+#                           Std. Deviation                             #  1.282  |          #
+#                           Minimum                                    #  1.000  |          #
+#                           Maximum                                    #  4.000  |          #
+#                           Range                                      #  3.000  |          #
+#                           Interquartile Range                        #         |          #
+#                           Skewness                                   #         |          #
+#                           Kurtosis                                   #         |          #
+#               -------------------------------------------------------#---------+----------#
+#               Bloggs      Mean                                       #   3.50  |   .378   #
+#                           95% Confidence Interval for MeanLower Bound#  3.525  |          #
+#                                                           Upper Bound#  3.475  |          #
+#                           5% Trimmed Mean                            #   3.50  |          #
+#                           Median                                     #         |          #
+#                           Variance                                   #  1.143  |          #
+#                           Std. Deviation                             #  1.069  |          #
+#                           Minimum                                    #  2.000  |          #
+#                           Maximum                                    #  5.000  |          #
+#                           Range                                      #  3.000  |          #
+#                           Interquartile Range                        #         |          #
+#                           Skewness                                   #         |          #
+#                           Kurtosis                                   #         |          #
+#               -------------------------------------------------------#---------+----------#
+#               Charlies    Mean                                       #   4.88  |   .441   #
+#                           95% Confidence Interval for MeanLower Bound#  4.904  |          #
+#                                                           Upper Bound#  4.846  |          #
+#                           5% Trimmed Mean                            #   4.86  |          #
+#                           Median                                     #         |          #
+#                           Variance                                   #  1.554  |          #
+#                           Std. Deviation                             #  1.246  |          #
+#                           Minimum                                    #  3.000  |          #
+#                           Maximum                                    #  7.000  |          #
+#                           Range                                      #  4.000  |          #
+#                           Interquartile Range                        #         |          #
+#                           Skewness                                   #         |          #
+#                           Kurtosis                                   #         |          #
+#======================================================================#=========#==========#
+
 EOF
 if [ $? -ne 0 ] ; then fail ; fi