work on PRINT encoding
[pspp] / doc / statistics.texi
index 632c1a3754492fb0eb5aa4c59ff31e810342e272..35c47eea2c9b1a5152678c4b4c15638c7c655d28 100644 (file)
@@ -1,17 +1,21 @@
 @node Statistics
 @chapter Statistics
 
-This chapter documents the statistical procedures that PSPP supports so
+This chapter documents the statistical procedures that @pspp{} supports so
 far.
 
 @menu
 * DESCRIPTIVES::                Descriptive statistics.
 * FREQUENCIES::                 Frequency tables.
 * EXAMINE::                     Testing data for normality.
+* CORRELATIONS::                Correlation tables.
 * CROSSTABS::                   Crosstabulation tables.
+* FACTOR::                      Factor analysis and Principal Components analysis
+* MEANS::                       Average values and other statistics.
 * NPAR TESTS::                  Nonparametric tests.
 * T-TEST::                      Test hypotheses about means.
 * ONEWAY::                      One way analysis of variance.
+* QUICK CLUSTER::               K-Means clustering.
 * RANK::                        Compute rank scores.
 * REGRESSION::                  Linear regression.
 * RELIABILITY::                 Reliability analysis.
@@ -24,7 +28,7 @@ far.
 @vindex DESCRIPTIVES
 @display
 DESCRIPTIVES
-        /VARIABLES=var_list
+        /VARIABLES=@var{var_list}
         /MISSING=@{VARIABLE,LISTWISE@} @{INCLUDE,NOINCLUDE@}
         /FORMAT=@{LABELS,NOLABELS@} @{NOINDEX,INDEX@} @{LINE,SERIAL@}
         /SAVE
@@ -36,56 +40,57 @@ DESCRIPTIVES
               @{A,D@}
 @end display
 
-The @cmd{DESCRIPTIVES} procedure reads the active file and outputs
+The @cmd{DESCRIPTIVES} procedure reads the active dataset and outputs
 descriptive
 statistics requested by the user.  In addition, it can optionally
 compute Z-scores.
 
-The VARIABLES subcommand, which is required, specifies the list of
-variables to be analyzed.  Keyword VARIABLES is optional.
+The @subcmd{VARIABLES} subcommand, which is required, specifies the list of
+variables to be analyzed.  Keyword @subcmd{VARIABLES} is optional.
 
 All other subcommands are optional:
 
-The MISSING subcommand determines the handling of missing variables.  If
-INCLUDE is set, then user-missing values are included in the
-calculations.  If NOINCLUDE is set, which is the default, user-missing
-values are excluded.  If VARIABLE is set, then missing values are
-excluded on a variable by variable basis; if LISTWISE is set, then
+The @subcmd{MISSING} subcommand determines the handling of missing variables.  If
+@subcmd{INCLUDE} is set, then user-missing values are included in the
+calculations.  If @subcmd{NOINCLUDE} is set, which is the default, user-missing
+values are excluded.  If @subcmd{VARIABLE} is set, then missing values are
+excluded on a variable by variable basis; if @subcmd{LISTWISE} is set, then
 the entire case is excluded whenever any value in that case has a
-system-missing or, if INCLUDE is set, user-missing value.
+system-missing or, if @subcmd{INCLUDE} is set, user-missing value.
 
-The FORMAT subcommand affects the output format.  Currently the
-LABELS/NOLABELS and NOINDEX/INDEX settings are not used.  When SERIAL is
+The @subcmd{FORMAT} subcommand affects the output format.  Currently the
+@subcmd{LABELS/NOLABELS} and @subcmd{NOINDEX/INDEX} settings are not used.
+When @subcmd{SERIAL} is
 set, both valid and missing number of cases are listed in the output;
-when NOSERIAL is set, only valid cases are listed.
+when @subcmd{NOSERIAL} is set, only valid cases are listed.
 
-The SAVE subcommand causes @cmd{DESCRIPTIVES} to calculate Z scores for all
+The @subcmd{SAVE} subcommand causes @cmd{DESCRIPTIVES} to calculate Z scores for all
 the specified variables.  The Z scores are saved to new variables.
 Variable names are generated by trying first the original variable name
 with Z prepended and truncated to a maximum of 8 characters, then the
 names ZSC000 through ZSC999, STDZ00 through STDZ09, ZZZZ00 through
 ZZZZ09, ZQZQ00 through ZQZQ09, in that sequence.  In addition, Z score
-variable names can be specified explicitly on VARIABLES in the variable
+variable names can be specified explicitly on @subcmd{VARIABLES} in the variable
 list by enclosing them in parentheses after each variable.
 
-The STATISTICS subcommand specifies the statistics to be displayed:
+The @subcmd{STATISTICS} subcommand specifies the statistics to be displayed:
 
 @table @code
-@item ALL
+@item @subcmd{ALL}
 All of the statistics below.
-@item MEAN
+@item @subcmd{MEAN}
 Arithmetic mean.
-@item SEMEAN
+@item @subcmd{SEMEAN}
 Standard error of the mean.
-@item STDDEV
+@item @subcmd{STDDEV}
 Standard deviation.
-@item VARIANCE
+@item @subcmd{VARIANCE}
 Variance.
-@item KURTOSIS
+@item @subcmd{KURTOSIS}
 Kurtosis and standard error of the kurtosis.
-@item SKEWNESS
+@item @subcmd{SKEWNESS}
 Skewness and standard error of the skewness.
-@item RANGE
+@item @subcmd{RANGE}
 Range.
 @item MINIMUM
 Minimum value.
@@ -101,12 +106,12 @@ Standard error of the kurtosis.
 Standard error of the skewness.
 @end table
 
-The SORT subcommand specifies how the statistics should be sorted.  Most
-of the possible values should be self-explanatory.  NAME causes the
+The @subcmd{SORT} subcommand specifies how the statistics should be sorted.  Most
+of the possible values should be self-explanatory.  @subcmd{NAME} causes the
 statistics to be sorted by name.  By default, the statistics are listed
-in the order that they are specified on the VARIABLES subcommand.  The A
-and D settings request an ascending or descending sort order,
-respectively.
+in the order that they are specified on the @subcmd{VARIABLES} subcommand.
+The @subcmd{A} and @subcmd{D} settings request an ascending or descending
+sort order, respectively.
 
 @node FREQUENCIES
 @section FREQUENCIES
@@ -114,22 +119,19 @@ respectively.
 @vindex FREQUENCIES
 @display
 FREQUENCIES
-        /VARIABLES=var_list
-        /FORMAT=@{TABLE,NOTABLE,LIMIT(limit)@}
-                @{STANDARD,CONDENSE,ONEPAGE[(onepage_limit)]@}
-                @{LABELS,NOLABELS@}
+        /VARIABLES=@var{var_list}
+        /FORMAT=@{TABLE,NOTABLE,LIMIT(@var{limit})@}
                 @{AVALUE,DVALUE,AFREQ,DFREQ@}
-                @{SINGLE,DOUBLE@}
-                @{OLDPAGE,NEWPAGE@}
         /MISSING=@{EXCLUDE,INCLUDE@}
         /STATISTICS=@{DEFAULT,MEAN,SEMEAN,MEDIAN,MODE,STDDEV,VARIANCE,
                      KURTOSIS,SKEWNESS,RANGE,MINIMUM,MAXIMUM,SUM,
                      SESKEWNESS,SEKURTOSIS,ALL,NONE@}
-        /NTILES=ntiles
+        /NTILES=@var{ntiles}
         /PERCENTILES=percent@dots{}
-        /HISTOGRAM=[MINIMUM(x_min)] [MAXIMUM(x_max)] 
-                   [@{FREQ,PCNT@}] [@{NONORMAL,NORMAL@}]
-        /PIECHART=[MINIMUM(x_min)] [MAXIMUM(x_max)] @{NOMISSING,MISSING@}
+        /HISTOGRAM=[MINIMUM(@var{x_min})] [MAXIMUM(@var{x_max})] 
+                   [@{FREQ[(@var{y_max})],PERCENT[(@var{y_max})]@}] [@{NONORMAL,NORMAL@}]
+        /PIECHART=[MINIMUM(@var{x_min})] [MAXIMUM(@var{x_max})]
+                  [@{FREQ,PERCENT@}] [@{NOMISSING,MISSING@}]
 
 (These options are not currently implemented.)
         /BARCHART=@dots{}
@@ -140,167 +142,298 @@ FREQUENCIES
 The @cmd{FREQUENCIES} procedure outputs frequency tables for specified
 variables.
 @cmd{FREQUENCIES} can also calculate and display descriptive statistics
-(including median and mode) and percentiles.
-
-@cmd{FREQUENCIES} also support graphical output in the form of
-histograms and pie charts.  In the future, it will be able to produce
-bar charts and output percentiles for grouped data.
+(including median and mode) and percentiles,
+@cmd{FREQUENCIES} can also output
+histograms and pie charts.  
 
-The VARIABLES subcommand is the only required subcommand.  Specify the
+The @subcmd{VARIABLES} subcommand is the only required subcommand.  Specify the
 variables to be analyzed.
 
-The FORMAT subcommand controls the output format.  It has several
+The @subcmd{FORMAT} subcommand controls the output format.  It has several
 possible settings:  
 
-@itemize @bullet
+@itemize @subcmd{}
 @item
-TABLE, the default, causes a frequency table to be output for every
-variable specified.  NOTABLE prevents them from being output.  LIMIT
+@subcmd{TABLE}, the default, causes a frequency table to be output for every
+variable specified.  @subcmd{NOTABLE} prevents them from being output.  @subcmd{LIMIT}
 with a numeric argument causes them to be output except when there are
 more than the specified number of values in the table.
 
-@item
-STANDARD frequency tables contain more complete information, but also to
-take up more space on the printed page.  CONDENSE frequency tables are
-less informative but take up less space.  ONEPAGE with a numeric
-argument will output standard frequency tables if there are the
-specified number of values or less, condensed tables otherwise.  ONEPAGE
-without an argument defaults to a threshold of 50 values.
-
-@item
-LABELS causes value labels to be displayed in STANDARD frequency
-tables.  NOLABLES prevents this.
-
 @item
 Normally frequency tables are sorted in ascending order by value.  This
-is AVALUE.  DVALUE tables are sorted in descending order by value.
-AFREQ and DFREQ tables are sorted in ascending and descending order,
+is @subcmd{AVALUE}.  @subcmd{DVALUE} tables are sorted in descending order by value.
+@subcmd{AFREQ} and @subcmd{DFREQ} tables are sorted in ascending and descending order,
 respectively, by frequency count.
-
-@item
-SINGLE spaced frequency tables are closely spaced.  DOUBLE spaced
-frequency tables have wider spacing.
-
-@item
-OLDPAGE and NEWPAGE are not currently used.
 @end itemize
 
-The MISSING subcommand controls the handling of user-missing values.
-When EXCLUDE, the default, is set, user-missing values are not included
-in frequency tables or statistics.  When INCLUDE is set, user-missing
+The @subcmd{MISSING} subcommand controls the handling of user-missing values.
+When @subcmd{EXCLUDE}, the default, is set, user-missing values are not included
+in frequency tables or statistics.  When @subcmd{INCLUDE} is set, user-missing
 are included.  System-missing values are never included in statistics,
 but are listed in frequency tables.
 
-The available STATISTICS are the same as available in @cmd{DESCRIPTIVES}
-(@pxref{DESCRIPTIVES}), with the addition of MEDIAN, the data's median
+The available @subcmd{STATISTICS} are the same as available 
+in @cmd{DESCRIPTIVES} (@pxref{DESCRIPTIVES}), with the addition 
+of @subcmd{MEDIAN}, the data's median
 value, and MODE, the mode.  (If there are multiple modes, the smallest
 value is reported.)  By default, the mean, standard deviation of the
 mean, minimum, and maximum are reported for each variable.
 
 @cindex percentiles
-PERCENTILES causes the specified percentiles to be reported.
+@subcmd{PERCENTILES} causes the specified percentiles to be reported.
 The percentiles should  be presented at a list of numbers between 0
 and 100 inclusive.  
-The NTILES subcommand causes the percentiles to be reported at the
+The @subcmd{NTILES} subcommand causes the percentiles to be reported at the
 boundaries of the data set divided into the specified number of ranges.
-For instance, @code{/NTILES=4} would cause quartiles to be reported.
-
-The HISTOGRAM subcommand causes the output to include a histogram for
-each specified numeric variable.  The X axis by default ranges from the
-minimum to the maximum value observed in the data, but the MINIMUM and
-MAXIMUM keywords can set an explicit range.  The Y axis by default is
-labeled in frequencies; use the PERCENT keyword to causes it to be
-labeled in percent of the total observed count.  Specify NORMAL to
-superimpose a normal curve on the histogram.
-Histograms are not created for string variables.
-
-The PIECHART adds a pie chart for each variable to the data.  Each
+For instance, @subcmd{/NTILES=4} would cause quartiles to be reported.
+
+@cindex histogram
+The @subcmd{HISTOGRAM} subcommand causes the output to include a histogram for
+each specified numeric variable.  The X axis by default ranges from
+the minimum to the maximum value observed in the data, but the @subcmd{MINIMUM}
+and @subcmd{MAXIMUM} keywords can set an explicit range.  Specify @subcmd{NORMAL} to
+superimpose a normal curve on the histogram.  Histograms are not
+created for string variables.
+
+@cindex piechart
+The @subcmd{PIECHART} subcommand adds a pie chart for each variable to the data.  Each
 slice represents one value, with the size of the slice proportional to
 the value's frequency.  By default, all non-missing values are given
-slices.  The MINIMUM and MAXIMUM keywords can be used to limit the
-displayed slices to a given range of values.  The MISSING keyword adds
+slices.  The @subcmd{MINIMUM} and @subcmd{MAXIMUM} keywords can be used to limit the
+displayed slices to a given range of values.  The @subcmd{MISSING} keyword adds
 slices for missing values.
 
+The @subcmd{FREQ} and @subcmd{PERCENT} options on @subcmd{HISTOGRAM} and @subcmd{PIECHART} are accepted
+but not currently honoured.
+
 @node EXAMINE
-@comment  node-name,  next,  previous,  up
 @section EXAMINE
-@vindex EXAMINE
 
+@vindex EXAMINE
+@cindex Exploratory data analysis
 @cindex Normality, testing for
 
 @display
 EXAMINE
-        VARIABLES=var_list [BY factor_list ]
-        /STATISTICS=@{DESCRIPTIVES, EXTREME[(n)], ALL, NONE@}
-        /PLOT=@{BOXPLOT, NPPLOT, HISTOGRAM, ALL, NONE@}
-        /CINTERVAL n
+        VARIABLES= @var{var1} [@var{var2}] @dots{} [@var{varN}]
+           [BY @var{factor1} [BY @var{subfactor1}]
+             [ @var{factor2} [BY @var{subfactor2}]]
+             @dots{}
+             [ @var{factor3} [BY @var{subfactor3}]]
+            ]
+        /STATISTICS=@{DESCRIPTIVES, EXTREME[(@var{n})], ALL, NONE@}
+        /PLOT=@{BOXPLOT, NPPLOT, HISTOGRAM, SPREADLEVEL[(@var{t})], ALL, NONE@}
+        /CINTERVAL @var{p}
         /COMPARE=@{GROUPS,VARIABLES@}
-        /ID=var_name
+        /ID=@var{identity_variable}
         /@{TOTAL,NOTOTAL@}
-        /PERCENTILE=[value_list]=@{HAVERAGE, WAVERAGE, ROUND, AEMPIRICAL, EMPIRICAL @}
+        /PERCENTILE=[@var{percentiles}]=@{HAVERAGE, WAVERAGE, ROUND, AEMPIRICAL, EMPIRICAL @}
         /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 @cmd{EXAMINE} command is used to perform exploratory data analysis.
+In particular, it is useful for testing how closely a distribution follows a
+normal distribution, and for finding 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 @subcmd{VARIABLES} subcommand is mandatory.  
+It specifies the dependent variables and optionally variables to use as
+factors for the analysis.
+Variables listed before the first @subcmd{BY} keyword (if any) 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 
+factors which tell @pspp{} how to break down the analysis for each
+dependent variable. 
+
+Following the dependent variables, factors may be specified.
+The factors (if desired) should be preceeded by a single @subcmd{BY} keyword.
+The format for each factor is 
 @display
-var [BY var].
+@var{factorvar} [BY @var{subfactorvar}].
 @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 COMPARE subcommand is only relevant if producing boxplots, and it is only 
-useful there is more than one dependent variable and at least one factor.   If 
-/COMPARE=GROUPS is specified, then one plot per dependent variable is produced,
-containing boxplots for all the factors.
-If /COMPARE=VARIABLES is specified, then one plot per factor is produced, each 
+Each unique combination of the values of  @var{factorvar} and
+@var{subfactorvar} divide the dataset into @dfn{cells}.
+Statistics will be calculated for each cell
+and for the entire dataset (unless @subcmd{NOTOTAL} is given).
+
+The @subcmd{STATISTICS} subcommand specifies which statistics to show.
+@subcmd{DESCRIPTIVES} will produce a table showing some parametric and
+non-parametrics statistics.
+@subcmd{EXTREME} produces a table showing the extremities of each cell.
+A number in parentheses, @var{n} determines
+how many upper and lower extremities to show.
+The default number is 5.
+
+The subcommands @subcmd{TOTAL} and @subcmd{NOTOTAL} are mutually exclusive.
+If @subcmd{TOTAL} appears, then statistics will be produced for the entire dataset
+as well as for each cell.
+If @subcmd{NOTOTAL} appears, then statistics will be produced only for the cells
+(unless no factor variables have been given).
+These subcommands have no effect if there have  been no factor variables
+specified.
+
+@cindex boxplot
+@cindex histogram
+@cindex npplot
+@cindex spreadlevel plot
+The @subcmd{PLOT} subcommand specifies which plots are to be produced if any.
+Available plots are @subcmd{HISTOGRAM}, @subcmd{NPPLOT},  @subcmd{BOXPLOT} and
+@subcmd{SPREADLEVEL}.
+The first three can be used to visualise how closely each cell conforms to a 
+normal distribution, whilst the spread vs.@: level plot can be useful to visualise
+how the variance of differs between factors.
+Boxplots will also show you the outliers and extreme values.
+
+The @subcmd{SPREADLEVEL} plot displays the interquartile range versus the 
+median.  It takes an optional parameter @var{t}, which specifies how the data
+should be transformed prior to plotting.
+The given value @var{t} is a power to which the data is raised.  For example, if
+@var{t} is given as 2, then the data will be squared.
+Zero, however is a special value.  If @var{t} is 0 or 
+is omitted, then data will be transformed by taking its natural logarithm instead of
+raising to the power of @var{t}.
+
+The @subcmd{COMPARE} subcommand is only relevant if producing boxplots, and it is only 
+useful there is more than one dependent variable and at least one factor.
+If 
+@subcmd{/COMPARE=GROUPS} is specified, then one plot per dependent variable is produced,
+each of which contain boxplots for all the cells.
+If @subcmd{/COMPARE=VARIABLES} is specified, then one plot per cell is produced,
 each containing one boxplot per dependent variable.
-If the /COMPARE subcommand is ommitted, then PSPP uses the default value of 
-/COMPARE=GROUPS.
+If the @subcmd{/COMPARE} subcommand is omitted, then @pspp{} behaves as if
+@subcmd{/COMPARE=GROUPS} were given.
  
-The ID subcommand also pertains to boxplots.  If given, it must
-specify a variable name.   Outliers and extreme cases plotted in
-boxplots will be labelled with the case from that variable.  Numeric or
-string variables are permissible.  If the ID subcommand is not given,
-then the casenumber will be used for labelling.
+The @subcmd{ID} subcommand is relevant only if @subcmd{/PLOT=BOXPLOT} or 
+@subcmd{/STATISTICS=EXTREME} has been given.
+If given, it shoule provide the name of a variable which is to be used
+to labels extreme values and outliers.
+Numeric or string variables are permissible.  
+If the @subcmd{ID} subcommand is not given, then the casenumber will be used for
+labelling.
 
-The CINTERVAL subcommand specifies the confidence interval to use in
-calculation of the descriptives command.  The default it 95%.
+The @subcmd{CINTERVAL} subcommand specifies the confidence interval to use in
+calculation of the descriptives command.  The default is 95%.
 
 @cindex percentiles
-The PERCENTILES subcommand specifies which percentiles are to be calculated, 
+The @subcmd{PERCENTILES} subcommand specifies which percentiles are to be calculated, 
 and which algorithm to use for calculating them.  The default is to
 calculate the 5, 10, 25, 50, 75, 90, 95 percentiles using the
-HAVERAGE algorithm.
+@subcmd{HAVERAGE} algorithm.
 
-The TOTAL and NOTOTAL subcommands are mutually exclusive.  If NOTOTAL
-is given and factors have been specified in the VARIABLES subcommand,
+The @subcmd{TOTAL} and @subcmd{NOTOTAL} subcommands are mutually exclusive.  If @subcmd{NOTOTAL}
+is given and factors have been specified in the @subcmd{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.
+factors specified then @subcmd{TOTAL} and @subcmd{NOTOTAL} have no effect.
+
+
+The following example will generate descriptive statistics and histograms for
+two variables @var{score1} and @var{score2}.
+Two factors are given, @i{viz}: @var{gender} and @var{gender} BY @var{culture}.
+Therefore, the descriptives and histograms will be generated for each
+distinct  value
+of @var{gender} @emph{and} for each distinct combination of the values
+of @var{gender} and @var{race}.
+Since the @subcmd{NOTOTAL} keyword is given, statistics and histograms for 
+@var{score1} and @var{score2} covering the  whole dataset are not produced.
+@example
+EXAMINE @var{score1} @var{score2} BY 
+        @var{gender}
+        @var{gender} BY @var{culture}
+        /STATISTICS = DESCRIPTIVES
+        /PLOT = HISTOGRAM
+        /NOTOTAL.
+@end example
+
+Here is a second example showing how the @cmd{examine} command can be used to find extremities.
+@example
+EXAMINE @var{height} @var{weight} BY 
+        @var{gender}
+        /STATISTICS = EXTREME (3)
+        /PLOT = BOXPLOT
+        /COMPARE = GROUPS
+        /ID = @var{name}.
+@end example
+In this example, we look at the height and weight of a sample of individuals and
+how they differ between male and female.
+A table showing the 3 largest and the 3 smallest values of @var{height} and 
+@var{weight} for each gender, and for the whole dataset will be shown.
+Boxplots will also be produced.
+Because @subcmd{/COMPARE = GROUPS} was given, boxplots for male and female will be
+shown in the same graphic, allowing us to easily see the difference between
+the genders.
+Since the variable @var{name} was specified on the @subcmd{ID} subcommand, this will be
+used to label the extreme values.
 
 @strong{Warning!}
-If many dependent variable are given, or factors are given for which
+If many dependent variables are specified, or if factor variables are
+specified for which
 there are many distinct values, then @cmd{EXAMINE} will produce a very
 large quantity of output.
 
+@node CORRELATIONS
+@section CORRELATIONS
+
+@vindex CORRELATIONS
+@display
+CORRELATIONS
+     /VARIABLES = @var{var_list} [ WITH @var{var_list} ]
+     [
+      .
+      .
+      .
+      /VARIABLES = @var{var_list} [ WITH @var{var_list} ]
+      /VARIABLES = @var{var_list} [ WITH @var{var_list} ]
+     ]
+
+     [ /PRINT=@{TWOTAIL, ONETAIL@} @{SIG, NOSIG@} ]
+     [ /STATISTICS=DESCRIPTIVES XPROD ALL]
+     [ /MISSING=@{PAIRWISE, LISTWISE@} @{INCLUDE, EXCLUDE@} ]
+@end display    
+
+@cindex correlation
+The @cmd{CORRELATIONS} procedure produces tables of the Pearson correlation coefficient
+for a set of variables.  The significance of the coefficients are also given.
+
+At least one @subcmd{VARIABLES} subcommand is required. If the @subcmd{WITH} 
+keyword is used, then a non-square correlation table will be produced.
+The variables preceding @subcmd{WITH}, will be used as the rows of the table,
+and the variables following will be the columns of the table.
+If no @subcmd{WITH} subcommand is given, then a square, symmetrical table using all variables is produced.
+
+
+The @cmd{MISSING} subcommand determines the handling of missing variables.  
+If @subcmd{INCLUDE} is set, then user-missing values are included in the
+calculations, but system-missing values are not.
+If @subcmd{EXCLUDE} is set, which is the default, user-missing
+values are excluded as well as system-missing values. 
+
+If @subcmd{LISTWISE} is set, then the entire case is excluded from analysis
+whenever any variable  specified in any @cmd{/VARIABLES} subcommand
+contains a missing value.   
+If @subcmd{PAIRWISE} is set, then a case is considered missing only if either of the
+values  for the particular coefficient are missing.
+The default is @subcmd{PAIRWISE}.
+
+The @subcmd{PRINT} subcommand is used to control how the reported significance values are printed.
+If the @subcmd{TWOTAIL} option is used, then a two-tailed test of significance is 
+printed.  If the @subcmd{ONETAIL} option is given, then a one-tailed test is used.
+The default is @subcmd{TWOTAIL}.
+
+If the @subcmd{NOSIG} option is specified, then correlation coefficients with significance less than
+0.05 are highlighted.
+If @subcmd{SIG} is specified, then no highlighting is performed.  This is the default.
+
+@cindex covariance
+The @subcmd{STATISTICS} subcommand requests additional statistics to be displayed.  The keyword 
+@subcmd{DESCRIPTIVES} requests that the mean, number of non-missing cases, and the non-biased
+estimator of the standard deviation are displayed.
+These statistics will be displayed in a separated table, for all the variables listed
+in any @subcmd{/VARIABLES} subcommand.
+The @subcmd{XPROD} keyword requests cross-product deviations and covariance estimators to 
+be displayed for each pair of variables.
+The keyword @subcmd{ALL} is the union of @subcmd{DESCRIPTIVES} and @subcmd{XPROD}.
 
 @node CROSSTABS
 @section CROSSTABS
@@ -308,11 +441,10 @@ large quantity of output.
 @vindex CROSSTABS
 @display
 CROSSTABS
-        /TABLES=var_list BY var_list [BY var_list]@dots{}
+        /TABLES=@var{var_list} BY @var{var_list} [BY @var{var_list}]@dots{}
         /MISSING=@{TABLE,INCLUDE,REPORT@}
         /WRITE=@{NONE,CELLS,ALL@}
         /FORMAT=@{TABLES,NOTABLES@}
-                @{LABELS,NOLABELS,NOVALLABS@}
                 @{PIVOT,NOPIVOT@}
                 @{AVALUE,DVALUE@}
                 @{NOINDEX,INDEX@}
@@ -323,7 +455,7 @@ CROSSTABS
                      KAPPA,ETA,CORR,ALL,NONE@}
         
 (Integer mode.)
-        /VARIABLES=var_list (low,high)@dots{}
+        /VARIABLES=@var{var_list} (@var{low},@var{high})@dots{}
 @end display
 
 The @cmd{CROSSTABS} procedure displays crosstabulation
@@ -331,67 +463,62 @@ tables requested by the user.  It can calculate several statistics for
 each cell in the crosstabulation tables.  In addition, a number of
 statistics can be calculated for each table itself.
 
-The TABLES subcommand is used to specify the tables to be reported.  Any
+The @subcmd{TABLES} subcommand is used to specify the tables to be reported.  Any
 number of dimensions is permitted, and any number of variables per
-dimension is allowed.  The TABLES subcommand may be repeated as many
+dimension is allowed.  The @subcmd{TABLES} subcommand may be repeated as many
 times as needed.  This is the only required subcommand in @dfn{general
 mode}.  
 
 Occasionally, one may want to invoke a special mode called @dfn{integer
-mode}.  Normally, in general mode, PSPP automatically determines
+mode}.  Normally, in general mode, @pspp{} automatically determines
 what values occur in the data.  In integer mode, the user specifies the
 range of values that the data assumes.  To invoke this mode, specify the
-VARIABLES subcommand, giving a range of data values in parentheses for
-each variable to be used on the TABLES subcommand.  Data values inside
+@subcmd{VARIABLES} subcommand, giving a range of data values in parentheses for
+each variable to be used on the @subcmd{TABLES} subcommand.  Data values inside
 the range are truncated to the nearest integer, then assigned to that
 value.  If values occur outside this range, they are discarded.  When it
-is present, the VARIABLES subcommand must precede the TABLES
+is present, the @subcmd{VARIABLES} subcommand must precede the @subcmd{TABLES}
 subcommand.
 
 In general mode, numeric and string variables may be specified on
 TABLES.  In integer mode, only numeric variables are allowed.
 
-The MISSING subcommand determines the handling of user-missing values.
-When set to TABLE, the default, missing values are dropped on a table by
-table basis.  When set to INCLUDE, user-missing values are included in
-tables and statistics.  When set to REPORT, which is allowed only in
+The @subcmd{MISSING} subcommand determines the handling of user-missing values.
+When set to @subcmd{TABLE}, the default, missing values are dropped on a table by
+table basis.  When set to @subcmd{INCLUDE}, user-missing values are included in
+tables and statistics.  When set to @subcmd{REPORT}, which is allowed only in
 integer mode, user-missing values are included in tables but marked with
 an @samp{M} (for ``missing'') and excluded from statistical
 calculations.
 
-Currently the WRITE subcommand is ignored.
+Currently the @subcmd{WRITE} subcommand is ignored.
 
-The FORMAT subcommand controls the characteristics of the
+The @subcmd{FORMAT} subcommand controls the characteristics of the
 crosstabulation tables to be displayed.  It has a number of possible
 settings:
 
-@itemize @bullet
-@item
-TABLES, the default, causes crosstabulation tables to be output.
-NOTABLES suppresses them.
-
+@itemize @asis
 @item
-LABELS, the default, allows variable labels and value labels to appear
-in the output.  NOLABELS suppresses them.  NOVALLABS displays variable
-labels but suppresses value labels.
+@subcmd{TABLES}, the default, causes crosstabulation tables to be output.
+@subcmd{NOTABLES} suppresses them.
 
 @item
-PIVOT, the default, causes each TABLES subcommand to be displayed in a
-pivot table format.  NOPIVOT causes the old-style crosstabulation format
+@subcmd{PIVOT}, the default, causes each @subcmd{TABLES} subcommand to be displayed in a
+pivot table format.  @subcmd{NOPIVOT} causes the old-style crosstabulation format
 to be used.
 
 @item
-AVALUE, the default, causes values to be sorted in ascending order.
-DVALUE asserts a descending sort order.
+@subcmd{AVALUE}, the default, causes values to be sorted in ascending order.
+@subcmd{DVALUE} asserts a descending sort order.
 
 @item
-INDEX/NOINDEX is currently ignored.
+@subcmd{INDEX} and @subcmd{NOINDEX} are currently ignored.
 
 @item
-BOX/NOBOX is currently ignored.
+@subcmd{BOX} and @subcmd{NOBOX} is currently ignored.
 @end itemize
 
-The CELLS subcommand controls the contents of each cell in the displayed
+The @subcmd{CELLS} subcommand controls the contents of each cell in the displayed
 crosstabulation table.  The possible settings are:
 
 @table @asis
@@ -417,11 +544,12 @@ All of the above.
 Suppress cells entirely.
 @end table
 
-@samp{/CELLS} without any settings specified requests COUNT, ROW,
-COLUMN, and TOTAL.  If CELLS is not specified at all then only COUNT
+@samp{/CELLS} without any settings specified requests @subcmd{COUNT}, @subcmd{ROW},
+@subcmd{COLUMN}, and @subcmd{TOTAL}.  
+If @subcmd{CELLS} is not specified at all then only @subcmd{COUNT}
 will be selected.
 
-The STATISTICS subcommand selects statistics for computation:
+The @subcmd{STATISTICS} subcommand selects statistics for computation:
 
 @table @asis
 @item CHISQ
@@ -465,9 +593,9 @@ statistic.  Certain statistics require tables of a particular size, and
 some statistics are calculated only in integer mode.
 
 @samp{/STATISTICS} without any settings selects CHISQ.  If the
-STATISTICS subcommand is not given, no statistics are calculated.
+@subcmd{STATISTICS} subcommand is not given, no statistics are calculated.
 
-@strong{Please note:} Currently the implementation of CROSSTABS has the
+@strong{Please note:} Currently the implementation of @cmd{CROSSTABS} has the
 followings bugs:
 
 @itemize @bullet
@@ -489,6 +617,251 @@ Approximate T of uncertainty coefficient is wrong.
 
 Fixes for any of these deficiencies would be welcomed.
 
+@node FACTOR
+@section FACTOR
+
+@vindex FACTOR
+@cindex factor analysis
+@cindex principal components analysis
+@cindex principal axis factoring
+@cindex data reduction
+
+@display
+FACTOR  VARIABLES=@var{var_list}
+
+        [ /METHOD = @{CORRELATION, COVARIANCE@} ]
+
+        [ /EXTRACTION=@{PC, PAF@}] 
+
+        [ /ROTATION=@{VARIMAX, EQUAMAX, QUARTIMAX, NOROTATE@}]
+
+        [ /PRINT=[INITIAL] [EXTRACTION] [ROTATION] [UNIVARIATE] [CORRELATION] [COVARIANCE] [DET] [KMO] [SIG] [ALL] [DEFAULT] ]
+
+        [ /PLOT=[EIGEN] ]
+
+        [ /FORMAT=[SORT] [BLANK(@var{n})] [DEFAULT] ]
+
+        [ /CRITERIA=[FACTORS(@var{n})] [MINEIGEN(@var{l})] [ITERATE(@var{m})] [ECONVERGE (@var{delta})] [DEFAULT] ]
+
+        [ /MISSING=[@{LISTWISE, PAIRWISE@}] [@{INCLUDE, EXCLUDE@}] ]
+@end display
+
+The @cmd{FACTOR} command performs Factor Analysis or Principal Axis Factoring on a dataset.  It may be used to find
+common factors in the data or for data reduction purposes.
+
+The @subcmd{VARIABLES} subcommand is required.  It lists the variables which are to partake in the analysis.
+
+The @subcmd{/EXTRACTION} subcommand is used to specify the way in which factors (components) are extracted from the data.
+If @subcmd{PC} is specified, then Principal Components Analysis is used.  
+If @subcmd{PAF} is specified, then Principal Axis Factoring is
+used. By default Principal Components Analysis will be used.
+
+The @subcmd{/ROTATION} subcommand is used to specify the method by which the extracted solution will be rotated.
+Three methods are available: @subcmd{VARIMAX} (which is the default), @subcmd{EQUAMAX}, and @subcmd{QUARTIMAX}.
+If don't want any rotation to be performed, the word @subcmd{NOROTATE} will prevent the command from performing any
+rotation on the data. Oblique rotations are not supported.
+
+The @subcmd{/METHOD} subcommand should be used to determine whether the covariance matrix or the correlation matrix of the data is
+to be analysed.  By default, the correlation matrix is analysed.
+
+The @subcmd{/PRINT} subcommand may be used to select which features of the analysis are reported:
+
+@itemize 
+@item @subcmd{UNIVARIATE}
+      A table of mean values, standard deviations and total weights are printed.
+@item @subcmd{INITIAL}
+      Initial communalities and eigenvalues are printed.
+@item @subcmd{EXTRACTION}
+      Extracted communalities and eigenvalues are printed.
+@item @subcmd{ROTATION}
+      Rotated communalities and eigenvalues are printed.
+@item @subcmd{CORRELATION}
+      The correlation matrix is printed.
+@item @subcmd{COVARIANCE}
+      The covariance matrix is printed.
+@item @subcmd{DET}
+      The determinant of the correlation or covariance matrix is printed.
+@item @subcmd{KMO}
+      The Kaiser-Meyer-Olkin measure of sampling adequacy and the Bartlett test of sphericity is printed.
+@item @subcmd{SIG}
+      The significance of the elements of correlation matrix is printed.
+@item @subcmd{ALL}
+      All of the above are printed.
+@item @subcmd{DEFAULT}
+      Identical to @subcmd{INITIAL} and @subcmd{EXTRACTION}.
+@end itemize
+
+If @subcmd{/PLOT=EIGEN} is given, then a ``Scree'' plot of the eigenvalues will be printed.  This can be useful for visualizing
+which factors (components) should be retained.
+
+The @subcmd{/FORMAT} subcommand determined how data are to be displayed in loading matrices.  If @subcmd{SORT} is specified, then the variables
+are sorted in descending order of significance.  If @subcmd{BLANK(@var{n})} is specified, then coefficients whose absolute value is less
+than @var{n} will not be printed.  If the keyword @subcmd{DEFAULT} is given, or if no @subcmd{/FORMAT} subcommand is given, then no sorting is 
+performed, and all coefficients will be printed.
+
+The @subcmd{/CRITERIA} subcommand is used to specify how the number of extracted factors (components) are chosen.
+If @subcmd{FACTORS(@var{n})} is
+specified, where @var{n} is an integer, then @var{n} factors will be extracted.  Otherwise, the @subcmd{MINEIGEN} setting will
+be used.  @subcmd{MINEIGEN(@var{l})} requests that all factors whose eigenvalues are greater than or equal to @var{l} are extracted.
+The default value of @var{l} is 1.    The @subcmd{ECONVERGE} and @subcmd{ITERATE} settings have effect only when iterative algorithms for factor
+extraction (such as Principal Axis Factoring) are used.   @subcmd{ECONVERGE(@var{delta})} specifies that
+iteration should cease when
+the maximum absolute value of the communality estimate between one iteration and the previous is less than @var{delta}. The
+default value of @var{delta} is 0.001.
+The @subcmd{ITERATE(@var{m})} setting sets the maximum number of iterations to @var{m}.  The default value of @var{m} is 25.
+
+The @cmd{MISSING} subcommand determines the handling of missing variables.  
+If @subcmd{INCLUDE} is set, then user-missing values are included in the
+calculations, but system-missing values are not.
+If @subcmd{EXCLUDE} is set, which is the default, user-missing
+values are excluded as well as system-missing values. 
+This is the default.
+If @subcmd{LISTWISE} is set, then the entire case is excluded from analysis
+whenever any variable  specified in the @cmd{VARIABLES} subcommand
+contains a missing value.   
+If @subcmd{PAIRWISE} is set, then a case is considered missing only if either of the
+values  for the particular coefficient are missing.
+The default is @subcmd{LISTWISE}.
+
+@node MEANS
+@section MEANS
+
+@vindex MEANS
+@cindex means
+
+@display 
+MEANS [TABLES =] 
+      @{@var{var_list}@} 
+        [ BY @{@var{var_list}@} [BY @{@var{var_list}@} [BY @{@var{var_list}@} @dots{} ]]]
+
+      [ /@{@var{var_list}@} 
+         [ BY @{@var{var_list}@} [BY @{@var{var_list}@} [BY @{@var{var_list}@} @dots{} ]]] ]
+
+      [/CELLS = [MEAN] [COUNT] [STDDEV] [SEMEAN] [SUM] [MIN] [MAX] [RANGE]
+        [VARIANCE] [KURT] [SEKURT] 
+        [SKEW] [SESKEW] [FIRST] [LAST] 
+        [HARMONIC] [GEOMETRIC] 
+        [DEFAULT]
+        [ALL]
+        [NONE] ]
+
+      [/MISSING = [TABLE] [INCLUDE] [DEPENDENT]]
+@end display 
+
+You can use the @cmd{MEANS} command to calculate the arithmetic mean and similar
+statistics, either for the dataset as a whole or for categories of data.
+
+The simplest form of the command is
+@example
+MEANS @var{v}.
+@end example
+@noindent which calculates the mean, count and standard deviation for @var{v}.
+If you specify a grouping variable, for example
+@example
+MEANS @var{v} BY @var{g}.
+@end example
+@noindent then the means, counts and standard deviations for @var{v} after having
+been grouped by @var{g} will be calculated.
+Instead of the mean, count and standard deviation, you could specify the statistics
+in which you are interested:
+@example
+MEANS @var{x} @var{y} BY @var{g}
+      /CELLS = HARMONIC SUM MIN.
+@end example
+This example calculates the harmonic mean, the sum and the minimum values of @var{x} and @var{y}
+grouped by @var{g}.
+
+The @subcmd{CELLS} subcommand specifies which statistics to calculate.  The available statistics
+are:
+@itemize
+@item @subcmd{MEAN}
+@cindex arithmetic mean
+      The arithmetic mean.
+@item @subcmd{COUNT}
+      The count of the values.
+@item @subcmd{STDDEV}
+      The standard deviation.
+@item @subcmd{SEMEAN}
+      The standard error of the mean.
+@item @subcmd{SUM}
+      The sum of the values.
+@item @subcmd{MIN}
+      The minimum value.
+@item @subcmd{MAX}
+      The maximum value.
+@item @subcmd{RANGE}
+      The difference between the maximum and minimum values.
+@item @subcmd{VARIANCE}
+      The variance.
+@item @subcmd{FIRST}
+      The first value in the category.
+@item @subcmd{LAST}
+      The last value in the category.
+@item @subcmd{SKEW}
+      The skewness.
+@item @subcmd{SESKEW}
+      The standard error of the skewness.
+@item @subcmd{KURT}
+      The kurtosis
+@item @subcmd{SEKURT}
+      The standard error of the kurtosis.
+@item @subcmd{HARMONIC}
+@cindex harmonic mean
+      The harmonic mean.
+@item @subcmd{GEOMETRIC}
+@cindex geometric mean
+      The geometric mean.
+@end itemize
+
+In addition, three special keywords are recognized:
+@itemize
+@item @subcmd{DEFAULT}
+      This is the same as @subcmd{MEAN} @subcmd{COUNT} @subcmd{STDDEV}.
+@item @subcmd{ALL}
+      All of the above statistics will be calculated.
+@item @subcmd{NONE}
+      No statistics will be calculated (only a summary will be shown).
+@end itemize
+
+
+More than one @dfn{table} can be specified in a single command. 
+Each table is separated by a @samp{/}. For
+example
+@example
+MEANS TABLES =
+      @var{c} @var{d} @var{e} BY @var{x}
+      /@var{a} @var{b} BY @var{x} @var{y}
+      /@var{f} BY @var{y} BY @var{z}.
+@end example
+has three tables (the @samp{TABLE =} is optional).
+The first table has three dependent variables @var{c}, @var{d} and @var{e}
+and a single categorical variable @var{x}.
+The second table has two dependent variables @var{a} and @var{b}, 
+and two categorical variables @var{x} and @var{y}.
+The third table has a single dependent variables @var{f}
+and a categorical variable formed by the combination of @var{y} and @var{z}.
+
+
+By default values are omitted from the analysis only if missing values
+(either system missing or user missing)
+for any of the variables directly involved in their calculation are 
+encountered.
+This behaviour can be modified with the  @subcmd{/MISSING} subcommand.
+Three options are possible: @subcmd{TABLE}, @subcmd{INCLUDE} and @subcmd{DEPENDENT}.
+
+@subcmd{/MISSING = TABLE} causes cases to be dropped if any variable is missing 
+in the table specification currently being processed, regardless of 
+whether it is needed to calculate the statistic.
+
+@subcmd{/MISSING = INCLUDE} says that user missing values, either in the dependent
+variables or in the categorical variables should be taken at their face
+value, and not excluded.
+
+@subcmd{/MISSING = DEPENDENT} says that user missing values, in the dependent
+variables should be taken at their face value, however cases which 
+have user missing values for the categorical variables should be omitted 
+from the calculation.
+
 @node NPAR TESTS
 @section NPAR TESTS
 
@@ -507,32 +880,41 @@ NPAR TESTS
 
      [ /MISSING=@{ANALYSIS, LISTWISE@} @{INCLUDE, EXCLUDE@} ]
 
-     [ /METHOD=EXACT [ TIMER [(n)] ] ]
+     [ /METHOD=EXACT [ TIMER [(@var{n})] ] ]
 @end display
 
-NPAR TESTS performs nonparametric tests. 
+@cmd{NPAR TESTS} performs nonparametric tests. 
 Non parametric tests make very few assumptions about the distribution of the 
 data.
 One or more tests may be specified by using the corresponding subcommand.
-If the /STATISTICS subcommand is also specified, then summary statistics are 
+If the @subcmd{/STATISTICS} subcommand is also specified, then summary statistics are 
 produces for each variable that is the subject of any test.
 
 Certain tests may take a long time to execute, if an exact figure is required.
 Therefore, by default asymptotic approximations are used unless the
-subcommand /METHOD=EXACT is specified.  
+subcommand @subcmd{/METHOD=EXACT} is specified.  
 Exact tests give more accurate results, but may take an unacceptably long 
-time to perform.  If the TIMER keyword is used, it sets a maximum time,
+time to perform.  If the @subcmd{TIMER} keyword is used, it sets a maximum time,
 after which the test will be abandoned, and a warning message printed.
-The time, in minutes, should be specified in parentheses after the TIMER keyword.
-If the TIMER keyword is given without this figure, then a default value of 5 minutes 
+The time, in minutes, should be specified in parentheses after the @subcmd{TIMER} keyword.
+If the @subcmd{TIMER} keyword is given without this figure, then a default value of 5 minutes 
 is used.
 
 
 @menu
 * BINOMIAL::                Binomial Test
 * CHISQUARE::               Chisquare Test
-* WILCOXON::                Wilcoxon Signed Ranks Test
+* COCHRAN::                 Cochran Q Test
+* FRIEDMAN::                Friedman Test
+* KENDALL::                 Kendall's W Test
+* KOLMOGOROV-SMIRNOV::      Kolmogorov Smirnov Test
+* KRUSKAL-WALLIS::          Kruskal-Wallis Test
+* MANN-WHITNEY::            Mann Whitney U Test
+* MCNEMAR::                 McNemar Test
+* MEDIAN::                  Median Test
+* RUNS::                    Runs Test
 * SIGN::                    The Sign Test
+* WILCOXON::                Wilcoxon Signed Ranks Test
 @end menu
 
 
@@ -542,10 +924,10 @@ is used.
 @cindex binomial test
 
 @display 
-     [ /BINOMIAL[(p)]=var_list[(value1[, value2)] ] ]
+     [ /BINOMIAL[(@var{p})]=@var{var_list}[(@var{value1}[, @var{value2})] ] ]
 @end display 
 
-The /BINOMIAL subcommand compares the observed distribution of a dichotomous 
+The @subcmd{/BINOMIAL} subcommand compares the observed distribution of a dichotomous 
 variable with that of a binomial distribution.
 The variable @var{p} specifies the test proportion of the binomial 
 distribution.  
@@ -578,7 +960,7 @@ significance of observing the observed proportion or less is reported.
 That is to say, the test is always performed in the observed
 direction. 
 
-PSPP uses a very precise approximation to the gamma function to
+@pspp{} uses a very precise approximation to the gamma function to
 compute the binomial significance.  Thus, exact results are reported
 even for very large sample sizes.
 
@@ -591,41 +973,170 @@ even for very large sample sizes.
 
 
 @display
-     [ /CHISQUARE=var_list[(lo,hi)] [/EXPECTED=@{EQUAL|f1, f2 @dots{} fn@}] ]
+     [ /CHISQUARE=@var{var_list}[(@var{lo},@var{hi})] [/EXPECTED=@{EQUAL|@var{f1}, @var{f2} @dots{} @var{fn}@}] ]
 @end display 
 
 
-The /CHISQUARE subcommand produces a chi-square statistic for the differences 
+The @subcmd{/CHISQUARE} subcommand produces a chi-square statistic for the differences 
 between the expected and observed frequencies of the categories of a variable. 
 Optionally, a range of values may appear after the variable list.  
 If a range is given, then non integer values are truncated, and values
 outside the  specified range are excluded from the analysis.
 
-The /EXPECTED subcommand specifies the expected values of each
+The @subcmd{/EXPECTED} subcommand specifies the expected values of each
 category.  
 There must be exactly one non-zero expected value, for each observed
-category, or the EQUAL keywork must be specified.
-You may use the notation @var{n}*@var{f} to specify @var{n}
+category, or the @subcmd{EQUAL} keywork must be specified.
+You may use the notation @subcmd{@var{n}*@var{f}} to specify @var{n}
 consecutive expected categories all taking a frequency of @var{f}.
 The frequencies given are proportions, not absolute frequencies.  The
 sum of the frequencies need not be 1.
-If no /EXPECTED subcommand is given, then then equal frequencies 
+If no @subcmd{/EXPECTED} subcommand is given, then then equal frequencies 
 are expected.
 
-@node WILCOXON
-@subsection Wilcoxon Matched Pairs Signed Ranks Test
-@comment  node-name,  next,  previous,  up
-@vindex WILCOXON
-@cindex wilcoxon matched pairs signed ranks test
+
+@node COCHRAN
+@subsection Cochran Q Test
+@vindex Cochran
+@cindex Cochran Q test
+@cindex Q, Cochran Q
 
 @display
-     [ /WILCOXON varlist [ WITH varlist [ (PAIRED) ]]]
+     [ /COCHRAN = @var{var_list} ]
 @end display
 
-The /WILCOXON subcommand tests for differences between medians of the 
-variables listed.
-The test does not make any assumptions about the variances of the samples.
-It does however assume that the distribution is symetrical.
+The Cochran Q test is used to test for differences between three or more groups.
+The data for @var{var_list} in all cases must assume exactly two distinct values (other than missing values). 
+
+The value of Q will be displayed and its Asymptotic significance based on a chi-square distribution.
+
+@node FRIEDMAN
+@subsection Friedman Test
+@vindex FRIEDMAN
+@cindex Friedman test
+
+@display
+     [ /FRIEDMAN = @var{var_list} ]
+@end display
+
+The Friedman test is used to test for differences between repeated measures when
+there is no indication that the distributions are normally distributed.
+
+A list of variables which contain the measured data must be given.  The procedure
+prints the sum of ranks for each variable, the test statistic and its significance.
+
+@node KENDALL
+@subsection Kendall's W Test
+@vindex KENDALL
+@cindex Kendall's W test
+@cindex coefficient of concordance
+
+@display
+     [ /KENDALL = @var{var_list} ]
+@end display
+
+The Kendall test investigates whether an arbitrary number of related samples come from the 
+same population.
+It is identical to the Friedman test except that the additional statistic W, Kendall's Coefficient of Concordance is printed.
+It has the range [0,1] --- a value of zero indicates no agreement between the samples whereas a value of
+unity indicates complete agreement.
+
+
+@node KOLMOGOROV-SMIRNOV
+@subsection Kolmogorov-Smirnov Test
+@vindex KOLMOGOROV-SMIRNOV
+@vindex K-S
+@cindex Kolmogorov-Smirnov test
+
+@display
+     [ /KOLMOGOROV-SMIRNOV (@{NORMAL [@var{mu}, @var{sigma}], UNIFORM [@var{min}, @var{max}], POISSON [@var{lambda}], EXPONENTIAL [@var{scale}] @}) = @var{var_list} ]
+@end display
+
+The one sample Kolmogorov-Smirnov subcommand is used to test whether or not a dataset is
+drawn from a particular distribution.  Four distributions are supported, @i{viz:}
+Normal, Uniform, Poisson and Exponential.
+
+Ideally you should provide the parameters of the distribution against which you wish to test
+the data. For example, with the normal distribution  the mean (@var{mu})and standard deviation (@var{sigma})
+should be given; with the uniform distribution, the minimum (@var{min})and maximum (@var{max}) value should
+be provided.
+However, if the parameters are omitted they will be imputed from the data. Imputing the
+parameters reduces the power of the test so should be avoided if possible.
+
+In the following example, two variables @var{score} and @var{age} are tested to see if
+they follow a normal distribution with a mean of 3.5 and a standard deviation of 2.0.
+@example
+  NPAR TESTS
+        /KOLMOGOROV-SMIRNOV (normal 3.5 2.0) = @var{score} @var{age}.
+@end example
+If the variables need to be tested against different distributions, then a separate
+subcommand must be used.  For example the following syntax tests @var{score} against
+a normal distribution with mean of 3.5 and standard deviation of 2.0 whilst @var{age}
+is tested against a normal distribution of mean 40 and standard deviation 1.5.
+@example
+  NPAR TESTS
+        /KOLMOGOROV-SMIRNOV (normal 3.5 2.0) = @var{score}
+        /KOLMOGOROV-SMIRNOV (normal 40 1.5) =  @var{age}.
+@end example
+
+The abbreviated subcommand  @subcmd{K-S} may be used in place of @subcmd{KOLMOGOROV-SMIRNOV}.
+
+@node KRUSKAL-WALLIS
+@subsection Kruskal-Wallis Test
+@vindex KRUSKAL-WALLIS
+@vindex K-W
+@cindex Kruskal-Wallis test
+
+@display
+     [ /KRUSKAL-WALLIS = @var{var_list} BY var (@var{lower}, @var{upper}) ]
+@end display
+
+The Kruskal-Wallis test is used to compare data from an 
+arbitrary number of populations.  It does not assume normality.
+The data to be compared are specified by @var{var_list}.
+The categorical variable determining the groups to which the
+data belongs is given by @var{var}. The limits @var{lower} and
+@var{upper} specify the valid range of @var{var}. Any cases for
+which @var{var} falls outside [@var{lower}, @var{upper}] will be
+ignored.
+
+The mean rank of each group as well as the chi-squared value and significance
+of the test will be printed.
+The abbreviated subcommand  @subcmd{K-W} may be used in place of @subcmd{KRUSKAL-WALLIS}.
+
+
+@node MANN-WHITNEY
+@subsection Mann-Whitney U Test
+@vindex MANN-WHITNEY
+@vindex M-W
+@cindex Mann-Whitney U test
+@cindex U, Mann-Whitney U
+
+@display
+     [ /MANN-WHITNEY = @var{var_list} BY var (@var{group1}, @var{group2}) ]
+@end display
+
+The Mann-Whitney subcommand is used to test whether two groups of data come from different populations.
+The variables to be tested should be specified in @var{var_list} and the grouping variable, that determines to which group the test variables belong, in @var{var}.
+@var{Var} may be either a string or an alpha variable.
+@var{Group1} and @var{group2} specify the
+two values of @var{var} which determine the groups of the test data.
+Cases for which the @var{var} value is neither @var{group1} or @var{group2} will be ignored.
+
+The value of the Mann-Whitney U statistic, the Wilcoxon W, and the significance will be printed.
+The abbreviated subcommand  @subcmd{M-W} may be used in place of @subcmd{MANN-WHITNEY}.
+
+@node MCNEMAR
+@subsection McNemar Test
+@vindex MCNEMAR
+@cindex McNemar test
+
+@display
+     [ /MCNEMAR @var{var_list} [ WITH @var{var_list} [ (PAIRED) ]]]
+@end display
+
+Use McNemar's test to analyse the significance of the difference between
+pairs of correlated proportions.
 
 If the @code{WITH} keyword is omitted, then tests for all
 combinations of the listed variables are performed.
@@ -639,6 +1150,54 @@ If the @code{WITH} keyword is given, but the
 of variable preceding @code{WITH} against variable following
 @code{WITH} are performed.
 
+The data in each variable must be dichotomous.  If there are more
+than two distinct variables an error will occur and the test will
+not be run.
+
+@node MEDIAN
+@subsection Median Test
+@vindex MEDIAN
+@cindex Median test
+
+@display
+     [ /MEDIAN [(@var{value})] = @var{var_list} BY @var{variable} (@var{value1}, @var{value2}) ]
+@end display
+
+The median test is used to test whether independent samples come from 
+populations with a common median.
+The median of the populations against which the samples are to be tested
+may be given in parentheses immediately after the 
+@subcmd{/MEDIAN} subcommand.  If it is not given, the median will be imputed from the 
+union of all the samples.
+
+The variables of the samples to be tested should immediately follow the @samp{=} sign. The
+keyword @code{BY} must come next, and then the grouping variable.  Two values
+in parentheses should follow.  If the first value is greater than the second,
+then a 2 sample test is performed using these two values to determine the groups.
+If however, the first variable is less than the second, then a @i{k} sample test is
+conducted and the group values used are all values encountered which lie in the
+range [@var{value1},@var{value2}].
+
+
+@node RUNS
+@subsection Runs Test
+@vindex RUNS
+@cindex runs test
+
+@display 
+     [ /RUNS (@{MEAN, MEDIAN, MODE, @var{value}@})  = @var{var_list} ]
+@end display
+
+The @subcmd{/RUNS} subcommand tests whether a data sequence is randomly ordered.
+
+It works by examining the number of times a variable's value crosses a given threshold. 
+The desired threshold must be specified within parentheses.
+It may either be specified as a number or as one of @subcmd{MEAN}, @subcmd{MEDIAN} or @subcmd{MODE}.
+Following the threshold specification comes the list of variables whose values are to be
+tested.
+
+The subcommand shows the number of runs, the asymptotic significance based on the
+length of the data.
 
 @node SIGN
 @subsection Sign Test
@@ -646,10 +1205,10 @@ of variable preceding @code{WITH} against variable following
 @cindex sign test
 
 @display
-     [ /SIGN varlist [ WITH varlist [ (PAIRED) ]]]
+     [ /SIGN @var{var_list} [ WITH @var{var_list} [ (PAIRED) ]]]
 @end display
 
-The /SIGN subcommand tests for differences between medians of the 
+The @subcmd{/SIGN} subcommand tests for differences between medians of the 
 variables listed.
 The test does not make any assumptions about the
 distribution of the data.
@@ -666,8 +1225,33 @@ If the @code{WITH} keyword is given, but the
 of variable preceding @code{WITH} against variable following
 @code{WITH} are performed.
 
+@node WILCOXON
+@subsection Wilcoxon Matched Pairs Signed Ranks Test
+@vindex WILCOXON
+@cindex wilcoxon matched pairs signed ranks test
+
+@display
+     [ /WILCOXON @var{var_list} [ WITH @var{var_list} [ (PAIRED) ]]]
+@end display
+
+The @subcmd{/WILCOXON} subcommand tests for differences between medians of the 
+variables listed.
+The test does not make any assumptions about the variances of the samples.
+It does however assume that the distribution is symetrical.
+
+If the @subcmd{WITH} keyword is omitted, then tests for all
+combinations of the listed variables are performed.
+If the @subcmd{WITH} keyword is given, and the @subcmd{(PAIRED)} keyword
+is also given, then the number of variables preceding @subcmd{WITH}
+must be the same as the number following it.
+In this case, tests for each respective pair of variables are
+performed.
+If the @subcmd{WITH} keyword is given, but the
+@subcmd{(PAIRED)} keyword is omitted, then tests for each combination
+of variable preceding @subcmd{WITH} against variable following
+@subcmd{WITH} are performed.
+
 @node T-TEST
-@comment  node-name,  next,  previous,  up
 @section T-TEST
 
 @vindex T-TEST
@@ -675,21 +1259,21 @@ of variable preceding @code{WITH} against variable following
 @display
 T-TEST
         /MISSING=@{ANALYSIS,LISTWISE@} @{EXCLUDE,INCLUDE@}
-        /CRITERIA=CIN(confidence)
+        /CRITERIA=CIN(@var{confidence})
 
 
 (One Sample mode.)
-        TESTVAL=test_value
-        /VARIABLES=var_list
+        TESTVAL=@var{test_value}
+        /VARIABLES=@var{var_list}
 
 
 (Independent Samples mode.)
-        GROUPS=var(value1 [, value2])
-        /VARIABLES=var_list
+        GROUPS=var(@var{value1} [, @var{value2}])
+        /VARIABLES=@var{var_list}
 
 
 (Paired Samples mode.)
-        PAIRS=var_list [WITH var_list [(PAIRED)] ]
+        PAIRS=@var{var_list} [WITH @var{var_list} [(PAIRED)] ]
 
 @end display
 
@@ -707,27 +1291,27 @@ It operates in one of three modes:
 Each of these modes are described in more detail below.
 There are two optional subcommands which are common to all modes.
 
-The @cmd{/CRITERIA} subcommand tells PSPP the confidence interval used
+The @cmd{/CRITERIA} subcommand tells @pspp{} the confidence interval used
 in the tests.  The default value is 0.95.
 
 
 The @cmd{MISSING} subcommand determines the handling of missing
 variables.  
-If INCLUDE is set, then user-missing values are included in the
+If @subcmd{INCLUDE} is set, then user-missing values are included in the
 calculations, but system-missing values are not.
-If EXCLUDE is set, which is the default, user-missing
+If @subcmd{EXCLUDE} is set, which is the default, user-missing
 values are excluded as well as system-missing values. 
 This is the default.
 
-If LISTWISE is set, then the entire case is excluded from analysis
-whenever any variable  specified in the @cmd{/VARIABLES}, @cmd{/PAIRS} or 
-@cmd{/GROUPS} subcommands contains a missing value.   
-If ANALYSIS is set, then missing values are excluded only in the analysis for
+If @subcmd{LISTWISE} is set, then the entire case is excluded from analysis
+whenever any variable  specified in the @subcmd{/VARIABLES}, @subcmd{/PAIRS} or 
+@subcmd{/GROUPS} subcommands contains a missing value.   
+If @subcmd{ANALYSIS} is set, then missing values are excluded only in the analysis for
 which they would be needed. This is the default.
 
 
 @menu
-* One Sample Mode::             Testing against a hypothesised mean
+* One Sample Mode::             Testing against a hypothesized mean
 * Independent Samples Mode::    Testing two independent groups for equal mean
 * Paired Samples Mode::         Testing two interdependent groups for equal mean
 @end menu
@@ -735,26 +1319,25 @@ which they would be needed. This is the default.
 @node One Sample Mode
 @subsection One Sample Mode
 
-The @cmd{TESTVAL} subcommand invokes the One Sample mode.
-This mode is used to test a population mean against a hypothesised
+The @subcmd{TESTVAL} subcommand invokes the One Sample mode.
+This mode is used to test a population mean against a hypothesized
 mean. 
-The value given to the @cmd{TESTVAL} subcommand is the value against
+The value given to the @subcmd{TESTVAL} subcommand is the value against
 which you wish to test.
-In this mode, you must also use the @cmd{/VARIABLES} subcommand to
-tell PSPP which variables you wish to test.
+In this mode, you must also use the @subcmd{/VARIABLES} subcommand to
+tell @pspp{} which variables you wish to test.
 
 @node Independent Samples Mode
-@comment  node-name,  next,  previous,  up
 @subsection Independent Samples Mode
 
-The @cmd{GROUPS} subcommand invokes Independent Samples mode or
+The @subcmd{GROUPS} subcommand invokes Independent Samples mode or
 `Groups' mode. 
 This mode is used to test whether two groups of values have the
 same population mean.
-In this mode, you must also use the @cmd{/VARIABLES} subcommand to
-tell PSPP the dependent variables you wish to test.
+In this mode, you must also use the @subcmd{/VARIABLES} subcommand to
+tell @pspp{} the dependent variables you wish to test.
 
-The variable given in the @cmd{GROUPS} subcommand is the independent
+The variable given in the @subcmd{GROUPS} subcommand is the independent
 variable which determines to which group the samples belong.
 The values in parentheses are the specific values of the independent
 variable for each group.
@@ -766,34 +1349,32 @@ it is acceptable to specify only one value inside the parentheses.
 If you do this, cases where the independent variable is
 greater than or equal to this value belong to the first group, and cases
 less than this value belong to the second group.
-When using this form of the @cmd{GROUPS} subcommand, missing values in
+When using this form of the @subcmd{GROUPS} subcommand, missing values in
 the independent variable are excluded on a listwise basis, regardless
-of whether @cmd{/MISSING=LISTWISE} was specified.
+of whether @subcmd{/MISSING=LISTWISE} was specified.
 
 
 @node Paired Samples Mode
-@comment  node-name,  next,  previous,  up
 @subsection Paired Samples Mode
 
 The @cmd{PAIRS} subcommand introduces Paired Samples mode.
 Use this mode when repeated measures have been taken from the same
 samples.
-If the @code{WITH} keyword is omitted, then tables for all
+If the @subcmd{WITH} keyword is omitted, then tables for all
 combinations of variables given in the @cmd{PAIRS} subcommand are
 generated. 
-If the @code{WITH} keyword is given, and the @code{(PAIRED)} keyword
-is also given, then the number of variables preceding @code{WITH}
+If the @subcmd{WITH} keyword is given, and the @subcmd{(PAIRED)} keyword
+is also given, then the number of variables preceding @subcmd{WITH}
 must be the same as the number following it.
 In this case, tables for each respective pair of variables are
 generated.
-In the event that the @code{WITH} keyword is given, but the
-@code{(PAIRED)} keyword is omitted, then tables for each combination
-of variable preceding @code{WITH} against variable following
-@code{WITH} are generated.
+In the event that the @subcmd{WITH} keyword is given, but the
+@subcmd{(PAIRED)} keyword is omitted, then tables for each combination
+of variable preceding @subcmd{WITH} against variable following
+@subcmd{WITH} are generated.
 
 
 @node ONEWAY
-@comment  node-name,  next,  previous,  up
 @section ONEWAY
 
 @vindex ONEWAY
@@ -802,11 +1383,11 @@ of variable preceding @code{WITH} against variable following
 
 @display
 ONEWAY
-        [/VARIABLES = ] var_list BY var
+        [/VARIABLES = ] @var{var_list} BY @var{var}
         /MISSING=@{ANALYSIS,LISTWISE@} @{EXCLUDE,INCLUDE@}
-        /CONTRAST= value1 [, value2] ... [,valueN]
+        /CONTRAST= @var{value1} [, @var{value2}] ... [,@var{valueN}]
         /STATISTICS=@{DESCRIPTIVES,HOMOGENEITY@}
-
+        /POSTHOC=@{BONFERRONI, GH, LSD, SCHEFFE, SIDAK, TUKEY, ALPHA ([@var{value}])@}
 @end display
 
 The @cmd{ONEWAY} procedure performs a one-way analysis of variance of
@@ -814,12 +1395,12 @@ variables factored by a single independent variable.
 It is used to compare the means of a population
 divided into more than two groups. 
 
-The  variables to be analysed should be given in the @code{VARIABLES}
+The dependent variables to be analysed should be given in the @subcmd{VARIABLES}
 subcommand.  
-The list of variables must be followed by the @code{BY} keyword and
+The list of variables must be followed by the @subcmd{BY} keyword and
 the name of the independent (or factor) variable.
 
-You can use the @code{STATISTICS} subcommand to tell PSPP to display
+You can use the @subcmd{STATISTICS} subcommand to tell @pspp{} to display
 ancilliary information.  The options accepted are:
 @itemize
 @item DESCRIPTIVES
@@ -830,78 +1411,150 @@ Displays the Levene test of Homogeneity of Variance for the
 variables and their groups.
 @end itemize
 
-The @code{CONTRAST} subcommand is used when you anticipate certain
+The @subcmd{CONTRAST} subcommand is used when you anticipate certain
 differences between the groups.
 The subcommand must be followed by a list of numerals which are the
 coefficients of the groups to be tested.
 The number of coefficients must correspond to the number of distinct
 groups (or values of the independent variable).
-If the total sum of the coefficients are not zero, then PSPP will
+If the total sum of the coefficients are not zero, then @pspp{} will
 display a warning, but will proceed with the analysis.
-The @code{CONTRAST} subcommand may be given up to 10 times in order
+The @subcmd{CONTRAST} subcommand may be given up to 10 times in order
 to specify different contrast tests.
+The @subcmd{MISSING} subcommand defines how missing values are handled.
+If @subcmd{LISTWISE} is specified then cases which have missing values for 
+the independent variable or any dependent variable will be ignored.
+If @subcmd{ANALYSIS} is specified, then cases will be ignored if the independent
+variable is missing or if the dependent variable currently being 
+analysed is missing.  The default is @subcmd{ANALYSIS}.
+A setting of @subcmd{EXCLUDE} means that variables whose values are
+user-missing are to be excluded from the analysis. A setting of
+@subcmd{INCLUDE} means they are to be included.  The default is @subcmd{EXCLUDE}.
+
+Using the @code{POSTHOC} subcommand you can perform multiple
+pairwise comparisons on the data. The following comparison methods
+are available:
+@itemize
+@item @subcmd{LSD}
+Least Significant Difference.
+@item @subcmd{TUKEY}
+Tukey Honestly Significant Difference.
+@item @subcmd{BONFERRONI}
+Bonferroni test.
+@item @subcmd{SCHEFFE}
+Scheff@'e's test.
+@item @subcmd{SIDAK}
+Sidak test.
+@item @subcmd{GH}
+The Games-Howell test.
+@end itemize
+
+@noindent
+The optional syntax @code{ALPHA(@var{value})} is used to indicate
+that @var{value} should be used as the
+confidence level for which the posthoc tests will be performed.
+The default is 0.05.
+
+@node QUICK CLUSTER
+@section QUICK CLUSTER
+@vindex QUICK CLUSTER
+
+@cindex K-means clustering
+@cindex clustering
+
+@display
+QUICK CLUSTER @var{var_list}
+      [/CRITERIA=CLUSTERS(@var{k}) [MXITER(@var{max_iter})]]
+      [/MISSING=@{EXCLUDE,INCLUDE@} @{LISTWISE, PAIRWISE@}]
+@end display
+
+The @cmd{QUICK CLUSTER} command performs k-means clustering on the
+dataset.  This is useful when you wish to allocate cases into clusters
+of similar values and you already know the number of clusters.
+
+The minimum specification is @samp{QUICK CLUSTER} followed by the names
+of the variables which contain the cluster data.  Normally you will also
+want to specify @subcmd{/CRITERIA=CLUSTERS(@var{k})} where @var{k} is the
+number of clusters.  If this is not given, then @var{k} defaults to 2.
+
+The command uses an iterative algorithm to determine the clusters for
+each case.  It will continue iterating until convergence, or until @var{max_iter}
+iterations have been done.  The default value of @var{max_iter} is 2.
+
+The @subcmd{MISSING} subcommand determines the handling of missing variables.  
+If @subcmd{INCLUDE} is set, then user-missing values are considered at their face
+value and not as missing values.
+If @subcmd{EXCLUDE} is set, which is the default, user-missing
+values are excluded as well as system-missing values. 
+
+If @subcmd{LISTWISE} is set, then the entire case is excluded from the analysis
+whenever any of the clustering variables contains a missing value.   
+If @subcmd{PAIRWISE} is set, then a case is considered missing only if all the
+clustering variables contain missing values.  Otherwise it is clustered
+on the basis of the non-missing values.
+The default is @subcmd{LISTWISE}.
+
 
 @node RANK
-@comment  node-name,  next,  previous,  up
 @section RANK
 
 @vindex RANK
 @display
 RANK
-        [VARIABLES=] var_list [@{A,D@}] [BY var_list]
+        [VARIABLES=] @var{var_list} [@{A,D@}] [BY @var{var_list}]
         /TIES=@{MEAN,LOW,HIGH,CONDENSE@}
         /FRACTION=@{BLOM,TUKEY,VW,RANKIT@}
         /PRINT[=@{YES,NO@}
         /MISSING=@{EXCLUDE,INCLUDE@}
 
-        /RANK [INTO var_list]
-        /NTILES(k) [INTO var_list]
-        /NORMAL [INTO var_list]
-        /PERCENT [INTO var_list]
-        /RFRACTION [INTO var_list]
-        /PROPORTION [INTO var_list]
-        /N [INTO var_list]
-        /SAVAGE [INTO var_list]
+        /RANK [INTO @var{var_list}]
+        /NTILES(k) [INTO @var{var_list}]
+        /NORMAL [INTO @var{var_list}]
+        /PERCENT [INTO @var{var_list}]
+        /RFRACTION [INTO @var{var_list}]
+        /PROPORTION [INTO @var{var_list}]
+        /N [INTO @var{var_list}]
+        /SAVAGE [INTO @var{var_list}]
 @end display
 
 The @cmd{RANK} command ranks variables and stores the results into new
 variables. 
 
-The VARIABLES subcommand, which is mandatory, specifies one or
+The @subcmd{VARIABLES} subcommand, which is mandatory, specifies one or
 more variables whose values are to be ranked.  
 After each variable, @samp{A} or @samp{D} may appear, indicating that
 the variable is to be ranked in ascending or descending order.
 Ascending is the default.
-If a BY keyword appears, it should be followed by a list of variables
+If a @subcmd{BY} keyword appears, it should be followed by a list of variables
 which are to serve as group variables.  
 In this case, the cases are gathered into groups, and ranks calculated
 for each group.
 
-The TIES subcommand specifies how tied values are to be treated.  The
+The @subcmd{TIES} subcommand specifies how tied values are to be treated.  The
 default is to take the mean value of all the tied cases.
 
-The FRACTION subcommand specifies how proportional ranks are to be
-calculated.  This only has any effect if NORMAL or PROPORTIONAL rank
+The @subcmd{FRACTION} subcommand specifies how proportional ranks are to be
+calculated.  This only has any effect if @subcmd{NORMAL} or @subcmd{PROPORTIONAL} rank
 functions are requested.
 
-The PRINT subcommand may be used to specify that a summary of the rank
+The @subcmd{PRINT} subcommand may be used to specify that a summary of the rank
 variables created should appear in the output.
 
-The function subcommands are RANK, NTILES, NORMAL, PERCENT, RFRACTION,
-PROPORTION and SAVAGE.  Any number of function subcommands may appear.
+The function subcommands are @subcmd{RANK}, @subcmd{NTILES}, @subcmd{NORMAL}, @subcmd{PERCENT}, @subcmd{RFRACTION},
+@subcmd{PROPORTION} and @subcmd{SAVAGE}.  Any number of function subcommands may appear.
 If none are given, then the default is RANK.
-The NTILES subcommand must take an integer specifying the number of
+The @subcmd{NTILES} subcommand must take an integer specifying the number of
 partitions into which values should be ranked.
-Each subcommand may be followed by the INTO keyword and a list of
+Each subcommand may be followed by the @subcmd{INTO} keyword and a list of
 variables which are the variables to be created and receive the rank
 scores.  There may be as many variables specified as there are
-variables named on the VARIABLES subcommand.  If fewer are specified,
+variables named on the @subcmd{VARIABLES} subcommand.  If fewer are specified,
 then the variable names are automatically created.
 
-The MISSING subcommand determines how user missing values are to be
-treated. A setting of EXCLUDE means that variables whose values are
+The @subcmd{MISSING} subcommand determines how user missing values are to be
+treated. A setting of @subcmd{EXCLUDE} means that variables whose values are
 user-missing are to be excluded from the rank scores. A setting of
-INCLUDE means they are to be included.  The default is EXCLUDE.
+@subcmd{INCLUDE} means they are to be included.  The default is @subcmd{EXCLUDE}.
 
 @include regression.texi
 
@@ -912,41 +1565,41 @@ INCLUDE means they are to be included.  The default is EXCLUDE.
 @vindex RELIABILITY
 @display
 RELIABILITY
-        /VARIABLES=var_list
-        /SCALE (@var{name}) = @{var_list, ALL@}
-        /MODEL=@{ALPHA, SPLIT[(N)]@}
+        /VARIABLES=@var{var_list}
+        /SCALE (@var{name}) = @{@var{var_list}, ALL@}
+        /MODEL=@{ALPHA, SPLIT[(@var{n})]@}
         /SUMMARY=@{TOTAL,ALL@}
         /MISSING=@{EXCLUDE,INCLUDE@}
 @end display
 
 @cindex Cronbach's Alpha
-The @cmd{RELIABILTY} command performs reliablity analysis on the data.
+The @cmd{RELIABILTY} command performs reliability analysis on the data.
 
-The VARIABLES subcommand is required. It determines the set of variables 
+The @subcmd{VARIABLES} subcommand is required. It determines the set of variables 
 upon which analysis is to be performed.
 
-The SCALE subcommand determines which variables reliability is to be 
+The @subcmd{SCALE} subcommand determines which variables reliability is to be 
 calculated for.  If it is omitted, then analysis for all variables named
-in the VARIABLES subcommand will be used.
+in the @subcmd{VARIABLES} subcommand will be used.
 Optionally, the @var{name} parameter may be specified to set a string name 
 for the scale.
 
-The MODEL subcommand determines the type of analysis. If ALPHA is specified, 
-then Cronbach's Alpha is calculated for the scale.  If the model is SPLIT
+The @subcmd{MODEL} subcommand determines the type of analysis. If @subcmd{ALPHA} is specified, 
+then Cronbach's Alpha is calculated for the scale.  If the model is @subcmd{SPLIT}
 then the variables  are divided into 2 subsets.  An optional parameter 
-@var{N} may be given, to specify how many variables to be in the first subset.
-If @var{N} is omitted, then it defaults to one half of the variables in the 
+@var{n} may be given, to specify how many variables to be in the first subset.
+If @var{n} is omitted, then it defaults to one half of the variables in the 
 scale, or one half minus one if there are an odd number of variables.
-The default model is ALPHA.
+The default model is @subcmd{ALPHA}.
 
 By default, any cases with user missing, or system missing values for 
 any variables given 
-in the VARIABLES subcommand will be omitted from analysis.
-The MISSING subcommand determines whether user missing values are to 
+in the @subcmd{VARIABLES} subcommand will be omitted from analysis.
+The @subcmd{MISSING} subcommand determines whether user missing values are to 
 be included or excluded in the analysis.
 
-The SUMMARY subcommand determines the type of summary analysis to be performed.
-Currently there is only one type: SUMMARY=TOTAL, which displays per-item
+The @subcmd{SUMMARY} subcommand determines the type of summary analysis to be performed.
+Currently there is only one type: @subcmd{SUMMARY=TOTAL}, which displays per-item
 analysis tested against the totals.
 
 
@@ -955,12 +1608,12 @@ analysis tested against the totals.
 @section ROC
 
 @vindex ROC
-@cindex Receiver Operating Characterstic
+@cindex Receiver Operating Characteristic
 @cindex Area under curve
 
 @display
 ROC     @var{var_list} BY @var{state_var} (@var{state_value})
-        /PLOT @{ CURVE [(REFERENCE)], NONE @}
+        /PLOT @{ CURVE [(REFERENCE)], NONE @}
         /PRINT = [ SE ] [ COORDINATES ]
         /CRITERIA = [ CUTOFF(@{INCLUDE,EXCLUDE@}) ]
           [ TESTPOS (@{LARGE,SMALL@}) ]
@@ -978,46 +1631,44 @@ The mandatory @var{var_list} is the list of predictor variables.
 The variable @var{state_var} is the variable whose values represent the actual states, 
 and @var{state_value} is the value of this variable which represents the positive state.
 
-The optional subcommand PLOT is used to determine if and how the ROC curve is drawn.
-The keyword CURVE means that the ROC curve should be drawn, and the optional keyword REFERENCE,
+The optional subcommand @subcmd{PLOT} is used to determine if and how the @subcmd{ROC} curve is drawn.
+The keyword @subcmd{CURVE} means that the @subcmd{ROC} curve should be drawn, and the optional keyword @subcmd{REFERENCE},
 which should be enclosed in parentheses, says that the diagonal reference line should be drawn.
-If the keyword NONE is given, then no ROC curve is drawn.
+If the keyword @subcmd{NONE} is given, then no @subcmd{ROC} curve is drawn.
 By default, the curve is drawn with no reference line.
 
-The optional subcommand PRINT determines which additional tables should be printed.
+The optional subcommand @subcmd{PRINT} determines which additional tables should be printed.
 Two additional tables are available. 
-The SE keyword says that standard error of the area under the curve should be printed as well as
+The @subcmd{SE} keyword says that standard error of the area under the curve should be printed as well as
 the area itself.
 In addition, a p-value under the null hypothesis that the area under the curve equals 0.5 will be
 printed.
-The COORDINATES keyword says that a table of coordinates of the ROC curve should be printed.
+The @subcmd{COORDINATES} keyword says that a table of coordinates of the @subcmd{ROC} curve should be printed.
 
-The CRITERIA subcommand has four optional parameters:
+The @subcmd{CRITERIA} subcommand has four optional parameters:
 @itemize @bullet
-@item The TESTPOS parameter may be LARGE or SMALL.
-LARGE is the default, and says that larger values in the predictor variables are to be 
-considered positive.  SMALL indicates that smaller values should be considered positive.
+@item The @subcmd{TESTPOS} parameter may be @subcmd{LARGE} or @subcmd{SMALL}.
+@subcmd{LARGE} is the default, and says that larger values in the predictor variables are to be 
+considered positive.  @subcmd{SMALL} indicates that smaller values should be considered positive.
 
-@item The CI parameter specifies the confidence interval that should be printed.
-It has no effect if the SE keyword in the PRINT subcommand has not been given.
+@item The @subcmd{CI} parameter specifies the confidence interval that should be printed.
+It has no effect if the @subcmd{SE} keyword in the @subcmd{PRINT} subcommand has not been given.
 
-@item The DISTRIBUTION parameter determines the method to be used when estimating the area
+@item The @subcmd{DISTRIBUTION} parameter determines the method to be used when estimating the area
 under the curve.  
-There are two possibilities, @i{viz}: FREE and NEGEXPO.
-The FREE method uses a non-parametric estimate, and the NEGEXPO method a bi-negative 
+There are two possibilities, @i{viz}: @subcmd{FREE} and @subcmd{NEGEXPO}.
+The @subcmd{FREE} method uses a non-parametric estimate, and the @subcmd{NEGEXPO} method a bi-negative 
 exponential distribution estimate.
-The NEGEXPO method should only be used when the number of positive actual states is
+The @subcmd{NEGEXPO} method should only be used when the number of positive actual states is
 equal to the number of negative actual states.
-The default is FREE.
+The default is @subcmd{FREE}.
 
-@item The CUTOFF parameter is for compatibility and is ignored.
+@item The @subcmd{CUTOFF} parameter is for compatibility and is ignored.
 @end itemize
 
-The MISSING subcommand determines whether user missing values are to 
+The @subcmd{MISSING} subcommand determines whether user missing values are to 
 be included or excluded in the analysis.  The default behaviour is to
 exclude them.
 Cases are excluded on a listwise basis; if any of the variables in @var{var_list} 
 or if the variable @var{state_var} is missing, then the entire case will be 
 excluded.
-
-