Remove integer mode from FREQUENCIES and incidentally fix bug
[pspp-builds.git] / doc / statistics.texi
1 @node Statistics
2 @chapter Statistics
3
4 This chapter documents the statistical procedures that PSPP supports so
5 far.
6
7 @menu
8 * DESCRIPTIVES::                Descriptive statistics.
9 * FREQUENCIES::                 Frequency tables.
10 * EXAMINE::                     Testing data for normality.
11 * CROSSTABS::                   Crosstabulation tables.
12 * NPAR TESTS::                  Nonparametric tests.
13 * T-TEST::                      Test hypotheses about means.
14 * ONEWAY::                      One way analysis of variance.
15 * RANK::                        Compute rank scores.
16 * REGRESSION::                  Linear regression.
17 @end menu
18
19 @node DESCRIPTIVES
20 @section DESCRIPTIVES
21
22 @vindex DESCRIPTIVES
23 @display
24 DESCRIPTIVES
25         /VARIABLES=var_list
26         /MISSING=@{VARIABLE,LISTWISE@} @{INCLUDE,NOINCLUDE@}
27         /FORMAT=@{LABELS,NOLABELS@} @{NOINDEX,INDEX@} @{LINE,SERIAL@}
28         /SAVE
29         /STATISTICS=@{ALL,MEAN,SEMEAN,STDDEV,VARIANCE,KURTOSIS,
30                      SKEWNESS,RANGE,MINIMUM,MAXIMUM,SUM,DEFAULT,
31                      SESKEWNESS,SEKURTOSIS@}
32         /SORT=@{NONE,MEAN,SEMEAN,STDDEV,VARIANCE,KURTOSIS,SKEWNESS,
33                RANGE,MINIMUM,MAXIMUM,SUM,SESKEWNESS,SEKURTOSIS,NAME@}
34               @{A,D@}
35 @end display
36
37 The @cmd{DESCRIPTIVES} procedure reads the active file and outputs
38 descriptive
39 statistics requested by the user.  In addition, it can optionally
40 compute Z-scores.
41
42 The VARIABLES subcommand, which is required, specifies the list of
43 variables to be analyzed.  Keyword VARIABLES is optional.
44
45 All other subcommands are optional:
46
47 The MISSING subcommand determines the handling of missing variables.  If
48 INCLUDE is set, then user-missing values are included in the
49 calculations.  If NOINCLUDE is set, which is the default, user-missing
50 values are excluded.  If VARIABLE is set, then missing values are
51 excluded on a variable by variable basis; if LISTWISE is set, then
52 the entire case is excluded whenever any value in that case has a
53 system-missing or, if INCLUDE is set, user-missing value.
54
55 The FORMAT subcommand affects the output format.  Currently the
56 LABELS/NOLABELS and NOINDEX/INDEX settings are not used.  When SERIAL is
57 set, both valid and missing number of cases are listed in the output;
58 when NOSERIAL is set, only valid cases are listed.
59
60 The SAVE subcommand causes @cmd{DESCRIPTIVES} to calculate Z scores for all
61 the specified variables.  The Z scores are saved to new variables.
62 Variable names are generated by trying first the original variable name
63 with Z prepended and truncated to a maximum of 8 characters, then the
64 names ZSC000 through ZSC999, STDZ00 through STDZ09, ZZZZ00 through
65 ZZZZ09, ZQZQ00 through ZQZQ09, in that sequence.  In addition, Z score
66 variable names can be specified explicitly on VARIABLES in the variable
67 list by enclosing them in parentheses after each variable.
68
69 The STATISTICS subcommand specifies the statistics to be displayed:
70
71 @table @code
72 @item ALL
73 All of the statistics below.
74 @item MEAN
75 Arithmetic mean.
76 @item SEMEAN
77 Standard error of the mean.
78 @item STDDEV
79 Standard deviation.
80 @item VARIANCE
81 Variance.
82 @item KURTOSIS
83 Kurtosis and standard error of the kurtosis.
84 @item SKEWNESS
85 Skewness and standard error of the skewness.
86 @item RANGE
87 Range.
88 @item MINIMUM
89 Minimum value.
90 @item MAXIMUM
91 Maximum value.
92 @item SUM
93 Sum.
94 @item DEFAULT
95 Mean, standard deviation of the mean, minimum, maximum.
96 @item SEKURTOSIS
97 Standard error of the kurtosis.
98 @item SESKEWNESS
99 Standard error of the skewness.
100 @end table
101
102 The SORT subcommand specifies how the statistics should be sorted.  Most
103 of the possible values should be self-explanatory.  NAME causes the
104 statistics to be sorted by name.  By default, the statistics are listed
105 in the order that they are specified on the VARIABLES subcommand.  The A
106 and D settings request an ascending or descending sort order,
107 respectively.
108
109 @node FREQUENCIES
110 @section FREQUENCIES
111
112 @vindex FREQUENCIES
113 @display
114 FREQUENCIES
115         /VARIABLES=var_list
116         /FORMAT=@{TABLE,NOTABLE,LIMIT(limit)@}
117                 @{STANDARD,CONDENSE,ONEPAGE[(onepage_limit)]@}
118                 @{LABELS,NOLABELS@}
119                 @{AVALUE,DVALUE,AFREQ,DFREQ@}
120                 @{SINGLE,DOUBLE@}
121                 @{OLDPAGE,NEWPAGE@}
122         /MISSING=@{EXCLUDE,INCLUDE@}
123         /STATISTICS=@{DEFAULT,MEAN,SEMEAN,MEDIAN,MODE,STDDEV,VARIANCE,
124                      KURTOSIS,SKEWNESS,RANGE,MINIMUM,MAXIMUM,SUM,
125                      SESKEWNESS,SEKURTOSIS,ALL,NONE@}
126         /NTILES=ntiles
127         /PERCENTILES=percent@dots{}
128         /HISTOGRAM=[MINIMUM(x_min)] [MAXIMUM(x_max)] 
129                    [@{FREQ,PCNT@}] [@{NONORMAL,NORMAL@}]
130         /PIECHART=[MINIMUM(x_min)] [MAXIMUM(x_max)] @{NOMISSING,MISSING@}
131
132 (These options are not currently implemented.)
133         /BARCHART=@dots{}
134         /HBAR=@dots{}
135         /GROUPED=@dots{}
136 @end display
137
138 The @cmd{FREQUENCIES} procedure outputs frequency tables for specified
139 variables.
140 @cmd{FREQUENCIES} can also calculate and display descriptive statistics
141 (including median and mode) and percentiles.
142
143 @cmd{FREQUENCIES} also support graphical output in the form of
144 histograms and pie charts.  In the future, it will be able to produce
145 bar charts and output percentiles for grouped data.
146
147 The VARIABLES subcommand is the only required subcommand.  Specify the
148 variables to be analyzed.
149
150 The FORMAT subcommand controls the output format.  It has several
151 possible settings:  
152
153 @itemize @bullet
154 @item
155 TABLE, the default, causes a frequency table to be output for every
156 variable specified.  NOTABLE prevents them from being output.  LIMIT
157 with a numeric argument causes them to be output except when there are
158 more than the specified number of values in the table.
159
160 @item
161 STANDARD frequency tables contain more complete information, but also to
162 take up more space on the printed page.  CONDENSE frequency tables are
163 less informative but take up less space.  ONEPAGE with a numeric
164 argument will output standard frequency tables if there are the
165 specified number of values or less, condensed tables otherwise.  ONEPAGE
166 without an argument defaults to a threshold of 50 values.
167
168 @item
169 LABELS causes value labels to be displayed in STANDARD frequency
170 tables.  NOLABLES prevents this.
171
172 @item
173 Normally frequency tables are sorted in ascending order by value.  This
174 is AVALUE.  DVALUE tables are sorted in descending order by value.
175 AFREQ and DFREQ tables are sorted in ascending and descending order,
176 respectively, by frequency count.
177
178 @item
179 SINGLE spaced frequency tables are closely spaced.  DOUBLE spaced
180 frequency tables have wider spacing.
181
182 @item
183 OLDPAGE and NEWPAGE are not currently used.
184 @end itemize
185
186 The MISSING subcommand controls the handling of user-missing values.
187 When EXCLUDE, the default, is set, user-missing values are not included
188 in frequency tables or statistics.  When INCLUDE is set, user-missing
189 are included.  System-missing values are never included in statistics,
190 but are listed in frequency tables.
191
192 The available STATISTICS are the same as available in @cmd{DESCRIPTIVES}
193 (@pxref{DESCRIPTIVES}), with the addition of MEDIAN, the data's median
194 value, and MODE, the mode.  (If there are multiple modes, the smallest
195 value is reported.)  By default, the mean, standard deviation of the
196 mean, minimum, and maximum are reported for each variable.
197
198 @cindex percentiles
199 PERCENTILES causes the specified percentiles to be reported.
200 The percentiles should  be presented at a list of numbers between 0
201 and 100 inclusive.  
202 The NTILES subcommand causes the percentiles to be reported at the
203 boundaries of the data set divided into the specified number of ranges.
204 For instance, @code{/NTILES=4} would cause quartiles to be reported.
205
206 The HISTOGRAM subcommand causes the output to include a histogram for
207 each specified variable.  The X axis by default ranges from the
208 minimum to the maximum value observed in the data, but the MINIMUM and
209 MAXIMUM keywords can set an explicit range.  The Y axis by default is
210 labeled in frequencies; use the PERCENT keyword to causes it to be
211 labeled in percent of the total observed count.  Specify NORMAL to
212 superimpose a normal curve on the histogram.
213
214 The PIECHART adds a pie chart for each variable to the data.  Each
215 slice represents one value, with the size of the slice proportional to
216 the value's frequency.  By default, all non-missing values are given
217 slices.  The MINIMUM and MAXIMUM keywords can be used to limit the
218 displayed slices to a given range of values.  The MISSING keyword adds
219 slices for missing values.
220
221 @node EXAMINE
222 @comment  node-name,  next,  previous,  up
223 @section EXAMINE
224 @vindex EXAMINE
225
226 @cindex Normality, testing for
227
228 @display
229 EXAMINE
230         VARIABLES=var_list [BY factor_list ]
231         /STATISTICS=@{DESCRIPTIVES, EXTREME[(n)], ALL, NONE@}
232         /PLOT=@{BOXPLOT, NPPLOT, HISTOGRAM, ALL, NONE@}
233         /CINTERVAL n
234         /COMPARE=@{GROUPS,VARIABLES@}
235         /ID=@{case_number, var_name@}
236         /@{TOTAL,NOTOTAL@}
237         /PERCENTILE=[value_list]=@{HAVERAGE, WAVERAGE, ROUND, AEMPIRICAL, EMPIRICAL @}
238         /MISSING=@{LISTWISE, PAIRWISE@} [@{EXCLUDE, INCLUDE@}] 
239                 [@{NOREPORT,REPORT@}]
240
241 @end display
242
243 The @cmd{EXAMINE} command is used to test how closely a distribution is to a 
244 normal distribution.  It also shows you outliers and extreme values.
245
246 The VARIABLES subcommand specifies the dependent variables and the
247 independent variable to use as factors for the analysis.   Variables
248 listed before the first BY keyword are the dependent variables.
249 The dependent variables may optionally be followed by a list of
250 factors which tell PSPP how to break down the analysis for each
251 dependent variable.  The format for each factor is 
252 @display
253 var [BY var].
254 @end display
255
256
257 The STATISTICS subcommand specifies the analysis to be done.  
258 DESCRIPTIVES will produce a table showing some parametric and
259 non-parametrics statistics.  EXTREME produces a table showing extreme
260 values of the dependent variable.  A number in parentheses determines
261 how many upper and lower extremes to show.  The default number is 5.
262
263
264 The PLOT subcommand specifies which plots are to be produced if any.
265
266 The COMPARE subcommand is only relevant if producing boxplots, and it is only 
267 useful there is more than one dependent variable and at least one factor.   If 
268 /COMPARE=GROUPS is specified, then one plot per dependent variable is produced,
269 containing boxplots for all the factors.
270 If /COMPARE=VARIABLES is specified, then one plot per factor is produced, each 
271 each containing one boxplot per dependent variable.
272 If the /COMPARE subcommand is ommitted, then PSPP uses the default value of 
273 /COMPARE=GROUPS.
274
275 The CINTERVAL subcommand specifies the confidence interval to use in
276 calculation of the descriptives command.  The default it 95%.
277
278 @cindex percentiles
279 The PERCENTILES subcommand specifies which percentiles are to be calculated, 
280 and which algorithm to use for calculating them.  The default is to
281 calculate the 5, 10, 25, 50, 75, 90, 95 percentiles using the
282 HAVERAGE algorithm.
283
284 The TOTAL and NOTOTAL subcommands are mutually exclusive.  If NOTOTAL
285 is given and factors have been specified in the VARIABLES subcommand,
286 then then statistics for the unfactored dependent variables are
287 produced in addition to the factored variables.  If there are no
288 factors specified then TOTAL and NOTOTAL have no effect.
289
290 @strong{Warning!}
291 If many dependent variable are given, or factors are given for which
292 there are many distinct values, then @cmd{EXAMINE} will produce a very
293 large quantity of output.
294
295
296 @node CROSSTABS
297 @section CROSSTABS
298
299 @vindex CROSSTABS
300 @display
301 CROSSTABS
302         /TABLES=var_list BY var_list [BY var_list]@dots{}
303         /MISSING=@{TABLE,INCLUDE,REPORT@}
304         /WRITE=@{NONE,CELLS,ALL@}
305         /FORMAT=@{TABLES,NOTABLES@}
306                 @{LABELS,NOLABELS,NOVALLABS@}
307                 @{PIVOT,NOPIVOT@}
308                 @{AVALUE,DVALUE@}
309                 @{NOINDEX,INDEX@}
310                 @{BOX,NOBOX@}
311         /CELLS=@{COUNT,ROW,COLUMN,TOTAL,EXPECTED,RESIDUAL,SRESIDUAL,
312                 ASRESIDUAL,ALL,NONE@}
313         /STATISTICS=@{CHISQ,PHI,CC,LAMBDA,UC,BTAU,CTAU,RISK,GAMMA,D,
314                      KAPPA,ETA,CORR,ALL,NONE@}
315         
316 (Integer mode.)
317         /VARIABLES=var_list (low,high)@dots{}
318 @end display
319
320 The @cmd{CROSSTABS} procedure displays crosstabulation
321 tables requested by the user.  It can calculate several statistics for
322 each cell in the crosstabulation tables.  In addition, a number of
323 statistics can be calculated for each table itself.
324
325 The TABLES subcommand is used to specify the tables to be reported.  Any
326 number of dimensions is permitted, and any number of variables per
327 dimension is allowed.  The TABLES subcommand may be repeated as many
328 times as needed.  This is the only required subcommand in @dfn{general
329 mode}.  
330
331 Occasionally, one may want to invoke a special mode called @dfn{integer
332 mode}.  Normally, in general mode, PSPP automatically determines
333 what values occur in the data.  In integer mode, the user specifies the
334 range of values that the data assumes.  To invoke this mode, specify the
335 VARIABLES subcommand, giving a range of data values in parentheses for
336 each variable to be used on the TABLES subcommand.  Data values inside
337 the range are truncated to the nearest integer, then assigned to that
338 value.  If values occur outside this range, they are discarded.  When it
339 is present, the VARIABLES subcommand must precede the TABLES
340 subcommand.
341
342 In general mode, numeric and string variables may be specified on
343 TABLES.  Although long string variables are allowed, only their
344 initial short-string parts are used.  In integer mode, only numeric
345 variables are allowed.
346
347 The MISSING subcommand determines the handling of user-missing values.
348 When set to TABLE, the default, missing values are dropped on a table by
349 table basis.  When set to INCLUDE, user-missing values are included in
350 tables and statistics.  When set to REPORT, which is allowed only in
351 integer mode, user-missing values are included in tables but marked with
352 an @samp{M} (for ``missing'') and excluded from statistical
353 calculations.
354
355 Currently the WRITE subcommand is ignored.
356
357 The FORMAT subcommand controls the characteristics of the
358 crosstabulation tables to be displayed.  It has a number of possible
359 settings:
360
361 @itemize @bullet
362 @item
363 TABLES, the default, causes crosstabulation tables to be output.
364 NOTABLES suppresses them.
365
366 @item
367 LABELS, the default, allows variable labels and value labels to appear
368 in the output.  NOLABELS suppresses them.  NOVALLABS displays variable
369 labels but suppresses value labels.
370
371 @item
372 PIVOT, the default, causes each TABLES subcommand to be displayed in a
373 pivot table format.  NOPIVOT causes the old-style crosstabulation format
374 to be used.
375
376 @item
377 AVALUE, the default, causes values to be sorted in ascending order.
378 DVALUE asserts a descending sort order.
379
380 @item
381 INDEX/NOINDEX is currently ignored.
382
383 @item
384 BOX/NOBOX is currently ignored.
385 @end itemize
386
387 The CELLS subcommand controls the contents of each cell in the displayed
388 crosstabulation table.  The possible settings are:
389
390 @table @asis
391 @item COUNT
392 Frequency count.
393 @item ROW
394 Row percent.
395 @item COLUMN
396 Column percent.
397 @item TOTAL
398 Table percent.
399 @item EXPECTED
400 Expected value.
401 @item RESIDUAL 
402 Residual.
403 @item SRESIDUAL
404 Standardized residual.
405 @item ASRESIDUAL
406 Adjusted standardized residual.
407 @item ALL
408 All of the above.
409 @item NONE
410 Suppress cells entirely.
411 @end table
412
413 @samp{/CELLS} without any settings specified requests COUNT, ROW,
414 COLUMN, and TOTAL.  If CELLS is not specified at all then only COUNT
415 will be selected.
416
417 The STATISTICS subcommand selects statistics for computation:
418
419 @table @asis
420 @item CHISQ
421 @cindex chisquare
422 @cindex chi-square
423
424 Pearson chi-square, likelihood ratio, Fisher's exact test, continuity
425 correction, linear-by-linear association.
426 @item PHI
427 Phi.
428 @item CC
429 Contingency coefficient.
430 @item LAMBDA
431 Lambda.
432 @item UC
433 Uncertainty coefficient.
434 @item BTAU
435 Tau-b.
436 @item CTAU
437 Tau-c.
438 @item RISK
439 Risk estimate.
440 @item GAMMA
441 Gamma.
442 @item D
443 Somers' D.
444 @item KAPPA
445 Cohen's Kappa.
446 @item ETA
447 Eta.
448 @item CORR
449 Spearman correlation, Pearson's r.
450 @item ALL
451 All of the above.
452 @item NONE
453 No statistics.
454 @end table
455
456 Selected statistics are only calculated when appropriate for the
457 statistic.  Certain statistics require tables of a particular size, and
458 some statistics are calculated only in integer mode.
459
460 @samp{/STATISTICS} without any settings selects CHISQ.  If the
461 STATISTICS subcommand is not given, no statistics are calculated.
462
463 @strong{Please note:} Currently the implementation of CROSSTABS has the
464 followings bugs:
465
466 @itemize @bullet
467 @item
468 Pearson's R (but not Spearman) is off a little.
469 @item
470 T values for Spearman's R and Pearson's R are wrong.
471 @item
472 Significance of symmetric and directional measures is not calculated.
473 @item
474 Asymmetric ASEs and T values for lambda are wrong.
475 @item
476 ASE of Goodman and Kruskal's tau is not calculated.
477 @item
478 ASE of symmetric somers' d is wrong.
479 @item
480 Approximate T of uncertainty coefficient is wrong.
481 @end itemize
482
483 Fixes for any of these deficiencies would be welcomed.
484
485 @node NPAR TESTS
486 @section NPAR TESTS
487
488 @vindex NPAR TESTS
489 @cindex nonparametric tests
490
491 @display 
492 NPAR TESTS
493      
494      nonparametric test subcommands
495      .
496      .
497      .
498      
499      [ /STATISTICS=@{DESCRIPTIVES@} ]
500
501      [ /MISSING=@{ANALYSIS, LISTWISE@} @{INCLUDE, EXCLUDE@} ]
502 @end display
503
504 NPAR TESTS performs nonparametric tests. 
505 Non parametric tests make very few assumptions about the distribution of the 
506 data.
507 One or more tests may be specified by using the corresponding subcommand.
508 If the /STATISTICS subcommand is also specified, then summary statistics are 
509 produces for each variable that is the subject of any test.
510
511
512 @menu
513 * BINOMIAL::                Binomial Test
514 * CHISQUARE::               Chisquare Test
515 @end menu
516
517
518 @node    BINOMIAL
519 @subsection Binomial test
520 @vindex BINOMIAL
521 @cindex binomial test
522
523 @display 
524      [ /BINOMIAL[(p)]=var_list[(value1[, value2)] ] ]
525 @end display 
526
527 The binomial test compares the observed distribution of a dichotomous 
528 variable with that of a binomial distribution.
529 The variable @var{p} specifies the test proportion of the binomial 
530 distribution.  
531 The default value of 0.5 is assumed if @var{p} is omitted.
532
533 If a single value appears after the variable list, then that value is
534 used as the threshold to partition the observed values. Values less
535 than or equal to the threshold value form the first category.  Values
536 greater than the threshold form the second category. 
537
538 If two values appear after the variable list, then they will be used
539 as the values which a variable must take to be in the respective
540 category. 
541 Cases for which a variable takes a value equal to neither of the specified  
542 values, take no part in the test for that variable.
543
544 If no values appear, then the variable must assume dichotomous
545 values.
546 If more than two distinct, non-missing values for a variable
547 under test are encountered then an error occurs.
548
549 If the test proportion is equal to 0.5, then a one tailed test is
550 reported.   For any other test proportion, a one tailed test is
551 reported.   
552 For one tailed tests, if the test proportion is less than
553 or equal to the observed proportion, then the significance of
554 observing the observed proportion or more is reported.
555 If the test proportion is more than the observed proportion, then the
556 significance of observing the observed proportion or less is reported.
557 That is to say, the test is always performed in the observed
558 direction. 
559
560 PSPP uses a very precise approximation to the gamma function to
561 compute the binomial significance.  Thus, exact results are reported
562 even for very large sample sizes.
563
564
565
566 @node    CHISQUARE
567 @subsection Chisquare test
568 @vindex CHISQUARE
569 @cindex chisquare test
570
571
572 @display
573      [ /CHISQUARE=var_list[(lo,hi)] [/EXPECTED=@{EQUAL|f1, f2 @dots{} fn@}] ]
574 @end display 
575
576
577 The chisquare test produces a chi-square statistic for the differences 
578 between the expected and observed frequencies of the categories of a variable. 
579 Optionally, a range of values may appear after the variable list.  
580 If a range is given, then non integer values are truncated, and values
581 outside the  specified range are excluded from the analysis.
582
583 The /EXPECTED subcommand specifies the expected values of each
584 category.  
585 There must be exactly one non-zero expected value, for each observed
586 category, or the EQUAL keywork must be specified.
587 You may use the notation @var{n}*@var{f} to specify @var{n}
588 consecutive expected categories all taking a frequency of @var{f}.
589 The frequencies given are proportions, not absolute frequencies.  The
590 sum of the frequencies need not be 1.
591 If no /EXPECTED subcommand is given, then then equal frequencies 
592 are expected.
593
594
595 @node T-TEST
596 @comment  node-name,  next,  previous,  up
597 @section T-TEST
598
599 @vindex T-TEST
600
601 @display
602 T-TEST
603         /MISSING=@{ANALYSIS,LISTWISE@} @{EXCLUDE,INCLUDE@}
604         /CRITERIA=CIN(confidence)
605
606
607 (One Sample mode.)
608         TESTVAL=test_value
609         /VARIABLES=var_list
610
611
612 (Independent Samples mode.)
613         GROUPS=var(value1 [, value2])
614         /VARIABLES=var_list
615
616
617 (Paired Samples mode.)
618         PAIRS=var_list [WITH var_list [(PAIRED)] ]
619
620 @end display
621
622
623 The @cmd{T-TEST} procedure outputs tables used in testing hypotheses about 
624 means.  
625 It operates in one of three modes:
626 @itemize
627 @item One Sample mode.
628 @item Independent Groups mode.
629 @item Paired mode.
630 @end itemize
631
632 @noindent
633 Each of these modes are described in more detail below.
634 There are two optional subcommands which are common to all modes.
635
636 The @cmd{/CRITERIA} subcommand tells PSPP the confidence interval used
637 in the tests.  The default value is 0.95.
638
639
640 The @cmd{MISSING} subcommand determines the handling of missing
641 variables.  
642 If INCLUDE is set, then user-missing values are included in the
643 calculations, but system-missing values are not.
644 If EXCLUDE is set, which is the default, user-missing
645 values are excluded as well as system-missing values. 
646 This is the default.
647
648 If LISTWISE is set, then the entire case is excluded from analysis
649 whenever any variable  specified in the @cmd{/VARIABLES}, @cmd{/PAIRS} or 
650 @cmd{/GROUPS} subcommands contains a missing value.   
651 If ANALYSIS is set, then missing values are excluded only in the analysis for
652 which they would be needed. This is the default.
653
654
655 @menu
656 * One Sample Mode::             Testing against a hypothesised mean
657 * Independent Samples Mode::    Testing two independent groups for equal mean
658 * Paired Samples Mode::         Testing two interdependent groups for equal mean
659 @end menu
660
661 @node One Sample Mode
662 @subsection One Sample Mode
663
664 The @cmd{TESTVAL} subcommand invokes the One Sample mode.
665 This mode is used to test a population mean against a hypothesised
666 mean. 
667 The value given to the @cmd{TESTVAL} subcommand is the value against
668 which you wish to test.
669 In this mode, you must also use the @cmd{/VARIABLES} subcommand to
670 tell PSPP which variables you wish to test.
671
672 @node Independent Samples Mode
673 @comment  node-name,  next,  previous,  up
674 @subsection Independent Samples Mode
675
676 The @cmd{GROUPS} subcommand invokes Independent Samples mode or
677 `Groups' mode. 
678 This mode is used to test whether two groups of values have the
679 same population mean.
680 In this mode, you must also use the @cmd{/VARIABLES} subcommand to
681 tell PSPP the dependent variables you wish to test.
682
683 The variable given in the @cmd{GROUPS} subcommand is the independent
684 variable which determines to which group the samples belong.
685 The values in parentheses are the specific values of the independent
686 variable for each group.
687 If the parentheses are omitted and no values are given, the default values 
688 of 1.0 and 2.0 are assumed.
689
690 If the independent variable is numeric, 
691 it is acceptable to specify only one value inside the parentheses.
692 If you do this, cases where the independent variable is
693 greater than or equal to this value belong to the first group, and cases
694 less than this value belong to the second group.
695 When using this form of the @cmd{GROUPS} subcommand, missing values in
696 the independent variable are excluded on a listwise basis, regardless
697 of whether @cmd{/MISSING=LISTWISE} was specified.
698
699
700 @node Paired Samples Mode
701 @comment  node-name,  next,  previous,  up
702 @subsection Paired Samples Mode
703
704 The @cmd{PAIRS} subcommand introduces Paired Samples mode.
705 Use this mode when repeated measures have been taken from the same
706 samples.
707 If the @code{WITH} keyword is omitted, then tables for all
708 combinations of variables given in the @cmd{PAIRS} subcommand are
709 generated. 
710 If the @code{WITH} keyword is given, and the @code{(PAIRED)} keyword
711 is also given, then the number of variables preceding @code{WITH}
712 must be the same as the number following it.
713 In this case, tables for each respective pair of variables are
714 generated.
715 In the event that the @code{WITH} keyword is given, but the
716 @code{(PAIRED)} keyword is omitted, then tables for each combination
717 of variable preceding @code{WITH} against variable following
718 @code{WITH} are generated.
719
720
721 @node ONEWAY
722 @comment  node-name,  next,  previous,  up
723 @section ONEWAY
724
725 @vindex ONEWAY
726 @cindex analysis of variance
727 @cindex ANOVA
728
729 @display
730 ONEWAY
731         [/VARIABLES = ] var_list BY var
732         /MISSING=@{ANALYSIS,LISTWISE@} @{EXCLUDE,INCLUDE@}
733         /CONTRASTS= value1 [, value2] ... [,valueN]
734         /STATISTICS=@{DESCRIPTIVES,HOMOGENEITY@}
735
736 @end display
737
738 The @cmd{ONEWAY} procedure performs a one-way analysis of variance of
739 variables factored by a single independent variable.
740 It is used to compare the means of a population
741 divided into more than two groups. 
742
743 The  variables to be analysed should be given in the @code{VARIABLES}
744 subcommand.  
745 The list of variables must be followed by the @code{BY} keyword and
746 the name of the independent (or factor) variable.
747
748 You can use the @code{STATISTICS} subcommand to tell PSPP to display
749 ancilliary information.  The options accepted are:
750 @itemize
751 @item DESCRIPTIVES
752 Displays descriptive statistics about the groups factored by the independent
753 variable.
754 @item HOMOGENEITY
755 Displays the Levene test of Homogeneity of Variance for the
756 variables and their groups.
757 @end itemize
758
759 The @code{CONTRASTS} subcommand is used when you anticipate certain
760 differences between the groups.
761 The subcommand must be followed by a list of numerals which are the
762 coefficients of the groups to be tested.
763 The number of coefficients must correspond to the number of distinct
764 groups (or values of the independent variable).
765 If the total sum of the coefficients are not zero, then PSPP will
766 display a warning, but will proceed with the analysis.
767 The @code{CONTRASTS} subcommand may be given up to 10 times in order
768 to specify different contrast tests.
769 @setfilename ignored
770
771 @node RANK
772 @comment  node-name,  next,  previous,  up
773 @section RANK
774
775 @vindex RANK
776 @display
777 RANK
778         [VARIABLES=] var_list [@{A,D@}] [BY var_list]
779         /TIES=@{MEAN,LOW,HIGH,CONDENSE@}
780         /FRACTION=@{BLOM,TUKEY,VW,RANKIT@}
781         /PRINT[=@{YES,NO@}
782         /MISSING=@{EXCLUDE,INCLUDE@}
783
784         /RANK [INTO var_list]
785         /NTILES(k) [INTO var_list]
786         /NORMAL [INTO var_list]
787         /PERCENT [INTO var_list]
788         /RFRACTION [INTO var_list]
789         /PROPORTION [INTO var_list]
790         /N [INTO var_list]
791         /SAVAGE [INTO var_list]
792 @end display
793
794 The @cmd{RANK} command ranks variables and stores the results into new
795 variables. 
796
797 The VARIABLES subcommand, which is mandatory, specifies one or
798 more variables whose values are to be ranked.  
799 After each variable, @samp{A} or @samp{D} may appear, indicating that
800 the variable is to be ranked in ascending or descending order.
801 Ascending is the default.
802 If a BY keyword appears, it should be followed by a list of variables
803 which are to serve as group variables.  
804 In this case, the cases are gathered into groups, and ranks calculated
805 for each group.
806
807 The TIES subcommand specifies how tied values are to be treated.  The
808 default is to take the mean value of all the tied cases.
809
810 The FRACTION subcommand specifies how proportional ranks are to be
811 calculated.  This only has any effect if NORMAL or PROPORTIONAL rank
812 functions are requested.
813
814 The PRINT subcommand may be used to specify that a summary of the rank
815 variables created should appear in the output.
816
817 The function subcommands are RANK, NTILES, NORMAL, PERCENT, RFRACTION,
818 PROPORTION and SAVAGE.  Any number of function subcommands may appear.
819 If none are given, then the default is RANK.
820 The NTILES subcommand must take an integer specifying the number of
821 partitions into which values should be ranked.
822 Each subcommand may be followed by the INTO keyword and a list of
823 variables which are the variables to be created and receive the rank
824 scores.  There may be as many variables specified as there are
825 variables named on the VARIABLES subcommand.  If fewer are specified,
826 then the variable names are automatically created.
827
828 The MISSING subcommand determines how user missing values are to be
829 treated. A setting of EXCLUDE means that variables whose values are
830 user-missing are to be excluded from the rank scores. A setting of
831 INCLUDE means they are to be included.  The default is EXCLUDE.
832
833 @include regression.texi