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