* statistics.texi: Document charts supported by FREQUENCIES.
[pspp-builds.git] / doc / statistics.texi
index 56c3794929cea18cc723138ec1160f6321af3b4a..0774d526d70653fbac37c0dbf2c416c763d76972 100644 (file)
@@ -4,9 +4,6 @@
 This chapter documents the statistical procedures that PSPP supports so
 far.
 
-@c If you add any new commands, then don't forget to remove the entry in 
-@c not-implemented.texi
-
 @menu
 * DESCRIPTIVES::                Descriptive statistics.
 * FREQUENCIES::                 Frequency tables.
@@ -14,6 +11,8 @@ far.
 * CROSSTABS::                   Crosstabulation tables.
 * T-TEST::                      Test hypotheses about means.
 * ONEWAY::                      One way analysis of variance.
+* RANK::                        Compute rank scores.
+* REGRESSION::                  Linear regression.
 @end menu
 
 @node DESCRIPTIVES, FREQUENCIES, Statistics, Statistics
@@ -125,10 +124,12 @@ FREQUENCIES
                      SESKEWNESS,SEKURTOSIS,ALL,NONE@}
         /NTILES=ntiles
         /PERCENTILES=percent@dots{}
+        /HISTOGRAM=[MINIMUM(x_min)] [MAXIMUM(x_max)] 
+                   [@{FREQ,PCNT@}] [@{NONORMAL,NORMAL@}]
+        /PIECHART=[MINIMUM(x_min)] [MAXIMUM(x_max)] @{NOMISSING,MISSING@}
 
 (These options are not currently implemented.)
         /BARCHART=@dots{}
-        /HISTOGRAM=@dots{}
         /HBAR=@dots{}
         /GROUPED=@dots{}
 
@@ -141,9 +142,9 @@ variables.
 @cmd{FREQUENCIES} can also calculate and display descriptive statistics
 (including median and mode) and percentiles.
 
-In the future, @cmd{FREQUENCIES} will also support graphical output in the
-form of bar charts and histograms.  In addition, it will be able to
-support percentiles for grouped data.
+@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.
 
 The VARIABLES subcommand is the only required subcommand.  Specify the
 variables to be analyzed.  In most cases, this is all that is required.
@@ -205,6 +206,7 @@ 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.
 The percentiles should  be presented at a list of numbers between 0
 and 100 inclusive.  
@@ -212,6 +214,20 @@ The 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 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.
+
+The PIECHART 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 for missing values.
 
 @node EXAMINE, CROSSTABS, FREQUENCIES, Statistics
 @comment  node-name,  next,  previous,  up
@@ -224,8 +240,7 @@ For instance, @code{/NTILES=4} would cause quartiles to be reported.
 EXAMINE
         VARIABLES=var_list [BY factor_list ]
         /STATISTICS=@{DESCRIPTIVES, EXTREME[(n)], ALL, NONE@}
-        /PLOT=@{STEMLEAF, BOXPLOT, NPPLOT, SPREADLEVEL(n), HISTOGRAM, 
-              ALL, NONE@}
+        /PLOT=@{BOXPLOT, NPPLOT, HISTOGRAM, ALL, NONE@}
         /CINTERVAL n
         /COMPARE=@{GROUPS,VARIABLES@}
         /ID=@{case_number, var_name@}
@@ -259,9 +274,19 @@ 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 containing one boxplot per dependent variable.
+If the /COMPARE subcommand is ommitted, then PSPP uses the default value of 
+/COMPARE=GROUPS.
+
 The CINTERVAL subcommand specifies the confidence interval to use in
 calculation of the descriptives command.  The default it 95%.
 
+@cindex percentiles
 The 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
@@ -404,6 +429,9 @@ The STATISTICS subcommand selects statistics for computation:
 
 @table @asis
 @item CHISQ
+@cindex chisquare
+@cindex chi-square
+
 Pearson chi-square, likelihood ratio, Fisher's exact test, continuity
 correction, linear-by-linear association.
 @item PHI
@@ -590,9 +618,9 @@ of variable preceding @code{WITH} against variable following
 @code{WITH} are generated.
 
 
-@node ONEWAY, , T-TEST, Statistics
+@node ONEWAY, RANK, T-TEST, Statistics
 @comment  node-name,  next,  previous,  up
-@section Oneway
+@section ONEWAY
 
 @vindex ONEWAY
 @cindex analysis of variance
@@ -639,3 +667,67 @@ display a warning, but will proceed with the analysis.
 The @code{CONTRASTS} subcommand may be given up to 10 times in order
 to specify different contrast tests.
 @setfilename ignored
+
+@node RANK, REGRESSION, ONEWAY, Statistics
+@comment  node-name,  next,  previous,  up
+@section RANK
+
+@vindex RANK
+@display
+RANK
+        [VARIABLES=] var_list [@{A,D@}] [BY 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]
+@end display
+
+The @cmd{RANK} command ranks variables and stores the results into new
+variables. 
+
+The 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
+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
+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
+functions are requested.
+
+The 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.
+If none are given, then the default is RANK.
+The 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
+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,
+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
+user-missing are to be excluded from the rank scores. A setting of
+INCLUDE means they are to be included.  The default is EXCLUDE.
+
+@include regression.texi