From f1cd7ca88d074b671844ef073b364e069672ce66 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 21 Nov 2004 02:43:46 +0000 Subject: [PATCH] Documented the EXAMINE subcommands. Fixed up the examine test. Fixed a problem with the totals. --- doc/statistics.texi | 37 +++++++- src/ChangeLog | 2 + src/examine.q | 2 +- tests/command/examine.sh | 191 ++++++++++++++++++++------------------- 4 files changed, 136 insertions(+), 96 deletions(-) diff --git a/doc/statistics.texi b/doc/statistics.texi index 08d66d79..19fe6d5a 100644 --- a/doc/statistics.texi +++ b/doc/statistics.texi @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog index 07513dc2..feddfc90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,5 @@ +Sun Nov 21 10:32:41 WST 2004 John Darrington + * 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 diff --git a/src/examine.q b/src/examine.q index 697176f3..044edaf1 100644 --- a/src/examine.q +++ b/src/examine.q @@ -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); diff --git a/tests/command/examine.sh b/tests/command/examine.sh index 53064965..13f7c888 100755 --- a/tests/command/examine.sh +++ b/tests/command/examine.sh @@ -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 -- 2.30.2