4 This chapter documents the statistical procedures that PSPP supports so
8 * DESCRIPTIVES:: Descriptive statistics.
9 * FREQUENCIES:: Frequency tables.
10 * EXAMINE:: Testing data for normality.
11 * CORRELATIONS:: Correlation tables.
12 * CROSSTABS:: Crosstabulation tables.
13 * FACTOR:: Factor analysis and Principal Components analysis
14 * MEANS:: Average values and other statistics.
15 * NPAR TESTS:: Nonparametric tests.
16 * T-TEST:: Test hypotheses about means.
17 * ONEWAY:: One way analysis of variance.
18 * QUICK CLUSTER:: K-Means clustering.
19 * RANK:: Compute rank scores.
20 * REGRESSION:: Linear regression.
21 * RELIABILITY:: Reliability analysis.
22 * ROC:: Receiver Operating Characteristic.
32 /MISSING=@{VARIABLE,LISTWISE@} @{INCLUDE,NOINCLUDE@}
33 /FORMAT=@{LABELS,NOLABELS@} @{NOINDEX,INDEX@} @{LINE,SERIAL@}
35 /STATISTICS=@{ALL,MEAN,SEMEAN,STDDEV,VARIANCE,KURTOSIS,
36 SKEWNESS,RANGE,MINIMUM,MAXIMUM,SUM,DEFAULT,
37 SESKEWNESS,SEKURTOSIS@}
38 /SORT=@{NONE,MEAN,SEMEAN,STDDEV,VARIANCE,KURTOSIS,SKEWNESS,
39 RANGE,MINIMUM,MAXIMUM,SUM,SESKEWNESS,SEKURTOSIS,NAME@}
43 The @cmd{DESCRIPTIVES} procedure reads the active dataset and outputs
45 statistics requested by the user. In addition, it can optionally
48 The VARIABLES subcommand, which is required, specifies the list of
49 variables to be analyzed. Keyword VARIABLES is optional.
51 All other subcommands are optional:
53 The MISSING subcommand determines the handling of missing variables. If
54 INCLUDE is set, then user-missing values are included in the
55 calculations. If NOINCLUDE is set, which is the default, user-missing
56 values are excluded. If VARIABLE is set, then missing values are
57 excluded on a variable by variable basis; if LISTWISE is set, then
58 the entire case is excluded whenever any value in that case has a
59 system-missing or, if INCLUDE is set, user-missing value.
61 The FORMAT subcommand affects the output format. Currently the
62 LABELS/NOLABELS and NOINDEX/INDEX settings are not used. When SERIAL is
63 set, both valid and missing number of cases are listed in the output;
64 when NOSERIAL is set, only valid cases are listed.
66 The SAVE subcommand causes @cmd{DESCRIPTIVES} to calculate Z scores for all
67 the specified variables. The Z scores are saved to new variables.
68 Variable names are generated by trying first the original variable name
69 with Z prepended and truncated to a maximum of 8 characters, then the
70 names ZSC000 through ZSC999, STDZ00 through STDZ09, ZZZZ00 through
71 ZZZZ09, ZQZQ00 through ZQZQ09, in that sequence. In addition, Z score
72 variable names can be specified explicitly on VARIABLES in the variable
73 list by enclosing them in parentheses after each variable.
75 The STATISTICS subcommand specifies the statistics to be displayed:
79 All of the statistics below.
83 Standard error of the mean.
89 Kurtosis and standard error of the kurtosis.
91 Skewness and standard error of the skewness.
101 Mean, standard deviation of the mean, minimum, maximum.
103 Standard error of the kurtosis.
105 Standard error of the skewness.
108 The SORT subcommand specifies how the statistics should be sorted. Most
109 of the possible values should be self-explanatory. NAME causes the
110 statistics to be sorted by name. By default, the statistics are listed
111 in the order that they are specified on the VARIABLES subcommand. The A
112 and D settings request an ascending or descending sort order,
122 /FORMAT=@{TABLE,NOTABLE,LIMIT(limit)@}
123 @{AVALUE,DVALUE,AFREQ,DFREQ@}
124 /MISSING=@{EXCLUDE,INCLUDE@}
125 /STATISTICS=@{DEFAULT,MEAN,SEMEAN,MEDIAN,MODE,STDDEV,VARIANCE,
126 KURTOSIS,SKEWNESS,RANGE,MINIMUM,MAXIMUM,SUM,
127 SESKEWNESS,SEKURTOSIS,ALL,NONE@}
129 /PERCENTILES=percent@dots{}
130 /HISTOGRAM=[MINIMUM(x_min)] [MAXIMUM(x_max)]
131 [@{FREQ[(y_max)],PERCENT[(y_max)]@}] [@{NONORMAL,NORMAL@}]
132 /PIECHART=[MINIMUM(x_min)] [MAXIMUM(x_max)]
133 [@{FREQ,PERCENT@}] [@{NOMISSING,MISSING@}]
135 (These options are not currently implemented.)
141 The @cmd{FREQUENCIES} procedure outputs frequency tables for specified
143 @cmd{FREQUENCIES} can also calculate and display descriptive statistics
144 (including median and mode) and percentiles,
145 @cmd{FREQUENCIES} can also output
146 histograms and pie charts.
148 The VARIABLES subcommand is the only required subcommand. Specify the
149 variables to be analyzed.
151 The FORMAT subcommand controls the output format. It has several
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.
162 Normally frequency tables are sorted in ascending order by value. This
163 is AVALUE. DVALUE tables are sorted in descending order by value.
164 AFREQ and DFREQ tables are sorted in ascending and descending order,
165 respectively, by frequency count.
168 The MISSING subcommand controls the handling of user-missing values.
169 When EXCLUDE, the default, is set, user-missing values are not included
170 in frequency tables or statistics. When INCLUDE is set, user-missing
171 are included. System-missing values are never included in statistics,
172 but are listed in frequency tables.
174 The available STATISTICS are the same as available in @cmd{DESCRIPTIVES}
175 (@pxref{DESCRIPTIVES}), with the addition of MEDIAN, the data's median
176 value, and MODE, the mode. (If there are multiple modes, the smallest
177 value is reported.) By default, the mean, standard deviation of the
178 mean, minimum, and maximum are reported for each variable.
181 PERCENTILES causes the specified percentiles to be reported.
182 The percentiles should be presented at a list of numbers between 0
184 The NTILES subcommand causes the percentiles to be reported at the
185 boundaries of the data set divided into the specified number of ranges.
186 For instance, @code{/NTILES=4} would cause quartiles to be reported.
189 The HISTOGRAM subcommand causes the output to include a histogram for
190 each specified numeric variable. The X axis by default ranges from
191 the minimum to the maximum value observed in the data, but the MINIMUM
192 and MAXIMUM keywords can set an explicit range. Specify NORMAL to
193 superimpose a normal curve on the histogram. Histograms are not
194 created for string variables.
197 The PIECHART adds a pie chart for each variable to the data. Each
198 slice represents one value, with the size of the slice proportional to
199 the value's frequency. By default, all non-missing values are given
200 slices. The MINIMUM and MAXIMUM keywords can be used to limit the
201 displayed slices to a given range of values. The MISSING keyword adds
202 slices for missing values.
204 The FREQ and PERCENT options on HISTOGRAM and PIECHART are accepted
205 but not currently honored.
211 @cindex Exploratory data analysis
212 @cindex Normality, testing for
216 VARIABLES= @var{var1} [@var{var2}] @dots{} [@var{varN}]
217 [BY @var{factor1} [BY @var{subfactor1}]
218 [ @var{factor2} [BY @var{subfactor2}]]
220 [ @var{factor3} [BY @var{subfactor3}]]
222 /STATISTICS=@{DESCRIPTIVES, EXTREME[(@var{n})], ALL, NONE@}
223 /PLOT=@{BOXPLOT, NPPLOT, HISTOGRAM, ALL, NONE@}
225 /COMPARE=@{GROUPS,VARIABLES@}
226 /ID=@var{identity_variable}
228 /PERCENTILE=[@var{percentiles}]=@{HAVERAGE, WAVERAGE, ROUND, AEMPIRICAL, EMPIRICAL @}
229 /MISSING=@{LISTWISE, PAIRWISE@} [@{EXCLUDE, INCLUDE@}]
230 [@{NOREPORT,REPORT@}]
234 The @cmd{EXAMINE} command is used to perform exploratory data analysis.
235 In particular, it is useful for testing how closely a distribution follows a
236 normal distribution, and for finding outliers and extreme values.
238 The VARIABLES subcommand is mandatory.
239 It specifies the dependent variables and optionally variables to use as
240 factors for the analysis.
241 Variables listed before the first BY keyword (if any) are the
243 The dependent variables may optionally be followed by a list of
244 factors which tell PSPP how to break down the analysis for each
247 Following the dependent variables, factors may be specified.
248 The factors (if desired) should be preceeded by a single BY keyword.
249 The format for each factor is
251 @var{factorvar} [BY @var{subfactorvar}].
253 Each unique combination of the values of @var{factorvar} and
254 @var{subfactorvar} divide the dataset into @dfn{cells}.
255 Statistics will be calculated for each cell
256 and for the entire dataset (unless NOTOTAL is given).
258 The STATISTICS subcommand specifies which statistics to show.
259 DESCRIPTIVES will produce a table showing some parametric and
260 non-parametrics statistics.
261 EXTREME produces a table showing the extremities of each cell.
262 A number in parentheses, @var{n} determines
263 how many upper and lower extremities to show.
264 The default number is 5.
266 The subcommands TOTAL and NOTOTAL are mutually exclusive.
267 If TOTAL appears, then statistics will be produced for the entire dataset
268 as well as for each cell.
269 If NOTOTAL appears, then statistics will be produced only for the cells
270 (unless no factor variables have been given).
271 These subcommands have no effect if there have been no factor variables
277 The PLOT subcommand specifies which plots are to be produced if any.
278 Available plots are HISTOGRAM, NPPLOT and BOXPLOT.
279 They can all be used to visualise how closely each cell conforms to a
281 Boxplots will also show you the outliers and extreme values.
283 The COMPARE subcommand is only relevant if producing boxplots, and it is only
284 useful there is more than one dependent variable and at least one factor.
286 /COMPARE=GROUPS is specified, then one plot per dependent variable is produced,
287 each of which contain boxplots for all the cells.
288 If /COMPARE=VARIABLES is specified, then one plot per cell is produced,
289 each containing one boxplot per dependent variable.
290 If the /COMPARE subcommand is omitted, then PSPP behaves as if
291 /COMPARE=GROUPS were given.
293 The ID subcommand is relevant only if /PLOT=BOXPLOT or
294 /STATISTICS=EXTREME has been given.
295 If given, it shoule provide the name of a variable which is to be used
296 to labels extreme values and outliers.
297 Numeric or string variables are permissible.
298 If the ID subcommand is not given, then the casenumber will be used for
301 The CINTERVAL subcommand specifies the confidence interval to use in
302 calculation of the descriptives command. The default is 95%.
305 The PERCENTILES subcommand specifies which percentiles are to be calculated,
306 and which algorithm to use for calculating them. The default is to
307 calculate the 5, 10, 25, 50, 75, 90, 95 percentiles using the
310 The TOTAL and NOTOTAL subcommands are mutually exclusive. If NOTOTAL
311 is given and factors have been specified in the VARIABLES subcommand,
312 then then statistics for the unfactored dependent variables are
313 produced in addition to the factored variables. If there are no
314 factors specified then TOTAL and NOTOTAL have no effect.
317 The following example will generate descriptive statistics and histograms for
318 two variables @var{score1} and @var{score2}.
319 Two factors are given, @i{viz}: @var{gender} and @var{gender} BY @var{culture}.
320 Therefore, the descriptives and histograms will be generated for each
322 of @var{gender} @emph{and} for each distinct combination of the values
323 of @var{gender} and @var{race}.
324 Since the NOTOTAL keyword is given, statistics and histograms for
325 @var{score1} and @var{score2} covering the whole dataset are not produced.
327 EXAMINE @var{score1} @var{score2} BY
329 @var{gender} BY @var{culture}
330 /STATISTICS = DESCRIPTIVES
335 Here is a second example showing how the @cmd{examine} command can be used to find extremities.
337 EXAMINE @var{height} @var{weight} BY
339 /STATISTICS = EXTREME (3)
344 In this example, we look at the height and weight of a sample of individuals and
345 how they differ between male and female.
346 A table showing the 3 largest and the 3 smallest values of @var{height} and
347 @var{weight} for each gender, and for the whole dataset will be shown.
348 Boxplots will also be produced.
349 Because /COMPARE = GROUPS was given, boxplots for male and female will be
350 shown in the same graphic, allowing us to easily see the difference between
352 Since the variable @var{name} was specified on the ID subcommand, this will be
353 used to label the extreme values.
356 If many dependent variables are specified, or if factor variables are
358 there are many distinct values, then @cmd{EXAMINE} will produce a very
359 large quantity of output.
362 @section CORRELATIONS
367 /VARIABLES = varlist [ WITH varlist ]
372 /VARIABLES = varlist [ WITH varlist ]
373 /VARIABLES = varlist [ WITH varlist ]
376 [ /PRINT=@{TWOTAIL, ONETAIL@} @{SIG, NOSIG@} ]
377 [ /STATISTICS=DESCRIPTIVES XPROD ALL]
378 [ /MISSING=@{PAIRWISE, LISTWISE@} @{INCLUDE, EXCLUDE@} ]
382 The @cmd{CORRELATIONS} procedure produces tables of the Pearson correlation coefficient
383 for a set of variables. The significance of the coefficients are also given.
385 At least one VARIABLES subcommand is required. If the WITH keyword is used, then a non-square
386 correlation table will be produced.
387 The variables preceding WITH, will be used as the rows of the table, and the variables following
388 will be the columns of the table.
389 If no WITH subcommand is given, then a square, symmetrical table using all variables is produced.
392 The @cmd{MISSING} subcommand determines the handling of missing variables.
393 If INCLUDE is set, then user-missing values are included in the
394 calculations, but system-missing values are not.
395 If EXCLUDE is set, which is the default, user-missing
396 values are excluded as well as system-missing values.
399 If LISTWISE is set, then the entire case is excluded from analysis
400 whenever any variable specified in any @cmd{/VARIABLES} subcommand
401 contains a missing value.
402 If PAIRWISE is set, then a case is considered missing only if either of the
403 values for the particular coefficient are missing.
404 The default is PAIRWISE.
406 The PRINT subcommand is used to control how the reported significance values are printed.
407 If the TWOTAIL option is used, then a two-tailed test of significance is
408 printed. If the ONETAIL option is given, then a one-tailed test is used.
409 The default is TWOTAIL.
411 If the NOSIG option is specified, then correlation coefficients with significance less than
412 0.05 are highlighted.
413 If SIG is specified, then no highlighting is performed. This is the default.
416 The STATISTICS subcommand requests additional statistics to be displayed. The keyword
417 DESCRIPTIVES requests that the mean, number of non-missing cases, and the non-biased
418 estimator of the standard deviation are displayed.
419 These statistics will be displayed in a separated table, for all the variables listed
420 in any /VARIABLES subcommand.
421 The XPROD keyword requests cross-product deviations and covariance estimators to
422 be displayed for each pair of variables.
423 The keyword ALL is the union of DESCRIPTIVES and XPROD.
431 /TABLES=var_list BY var_list [BY var_list]@dots{}
432 /MISSING=@{TABLE,INCLUDE,REPORT@}
433 /WRITE=@{NONE,CELLS,ALL@}
434 /FORMAT=@{TABLES,NOTABLES@}
439 /CELLS=@{COUNT,ROW,COLUMN,TOTAL,EXPECTED,RESIDUAL,SRESIDUAL,
440 ASRESIDUAL,ALL,NONE@}
441 /STATISTICS=@{CHISQ,PHI,CC,LAMBDA,UC,BTAU,CTAU,RISK,GAMMA,D,
442 KAPPA,ETA,CORR,ALL,NONE@}
445 /VARIABLES=var_list (low,high)@dots{}
448 The @cmd{CROSSTABS} procedure displays crosstabulation
449 tables requested by the user. It can calculate several statistics for
450 each cell in the crosstabulation tables. In addition, a number of
451 statistics can be calculated for each table itself.
453 The TABLES subcommand is used to specify the tables to be reported. Any
454 number of dimensions is permitted, and any number of variables per
455 dimension is allowed. The TABLES subcommand may be repeated as many
456 times as needed. This is the only required subcommand in @dfn{general
459 Occasionally, one may want to invoke a special mode called @dfn{integer
460 mode}. Normally, in general mode, PSPP automatically determines
461 what values occur in the data. In integer mode, the user specifies the
462 range of values that the data assumes. To invoke this mode, specify the
463 VARIABLES subcommand, giving a range of data values in parentheses for
464 each variable to be used on the TABLES subcommand. Data values inside
465 the range are truncated to the nearest integer, then assigned to that
466 value. If values occur outside this range, they are discarded. When it
467 is present, the VARIABLES subcommand must precede the TABLES
470 In general mode, numeric and string variables may be specified on
471 TABLES. In integer mode, only numeric variables are allowed.
473 The MISSING subcommand determines the handling of user-missing values.
474 When set to TABLE, the default, missing values are dropped on a table by
475 table basis. When set to INCLUDE, user-missing values are included in
476 tables and statistics. When set to REPORT, which is allowed only in
477 integer mode, user-missing values are included in tables but marked with
478 an @samp{M} (for ``missing'') and excluded from statistical
481 Currently the WRITE subcommand is ignored.
483 The FORMAT subcommand controls the characteristics of the
484 crosstabulation tables to be displayed. It has a number of possible
489 TABLES, the default, causes crosstabulation tables to be output.
490 NOTABLES suppresses them.
493 PIVOT, the default, causes each TABLES subcommand to be displayed in a
494 pivot table format. NOPIVOT causes the old-style crosstabulation format
498 AVALUE, the default, causes values to be sorted in ascending order.
499 DVALUE asserts a descending sort order.
502 INDEX/NOINDEX is currently ignored.
505 BOX/NOBOX is currently ignored.
508 The CELLS subcommand controls the contents of each cell in the displayed
509 crosstabulation table. The possible settings are:
525 Standardized residual.
527 Adjusted standardized residual.
531 Suppress cells entirely.
534 @samp{/CELLS} without any settings specified requests COUNT, ROW,
535 COLUMN, and TOTAL. If CELLS is not specified at all then only COUNT
538 The STATISTICS subcommand selects statistics for computation:
545 Pearson chi-square, likelihood ratio, Fisher's exact test, continuity
546 correction, linear-by-linear association.
550 Contingency coefficient.
554 Uncertainty coefficient.
570 Spearman correlation, Pearson's r.
577 Selected statistics are only calculated when appropriate for the
578 statistic. Certain statistics require tables of a particular size, and
579 some statistics are calculated only in integer mode.
581 @samp{/STATISTICS} without any settings selects CHISQ. If the
582 STATISTICS subcommand is not given, no statistics are calculated.
584 @strong{Please note:} Currently the implementation of CROSSTABS has the
589 Pearson's R (but not Spearman) is off a little.
591 T values for Spearman's R and Pearson's R are wrong.
593 Significance of symmetric and directional measures is not calculated.
595 Asymmetric ASEs and T values for lambda are wrong.
597 ASE of Goodman and Kruskal's tau is not calculated.
599 ASE of symmetric somers' d is wrong.
601 Approximate T of uncertainty coefficient is wrong.
604 Fixes for any of these deficiencies would be welcomed.
610 @cindex factor analysis
611 @cindex principal components analysis
612 @cindex principal axis factoring
613 @cindex data reduction
616 FACTOR VARIABLES=var_list
618 [ /METHOD = @{CORRELATION, COVARIANCE@} ]
620 [ /EXTRACTION=@{PC, PAF@}]
622 [ /ROTATION=@{VARIMAX, EQUAMAX, QUARTIMAX, NOROTATE@}]
624 [ /PRINT=[INITIAL] [EXTRACTION] [ROTATION] [UNIVARIATE] [CORRELATION] [COVARIANCE] [DET] [KMO] [SIG] [ALL] [DEFAULT] ]
628 [ /FORMAT=[SORT] [BLANK(@var{n})] [DEFAULT] ]
630 [ /CRITERIA=[FACTORS(@var{n})] [MINEIGEN(@var{l})] [ITERATE(@var{m})] [ECONVERGE (@var{delta})] [DEFAULT] ]
632 [ /MISSING=[@{LISTWISE, PAIRWISE@}] [@{INCLUDE, EXCLUDE@}] ]
635 The FACTOR command performs Factor Analysis or Principal Axis Factoring on a dataset. It may be used to find
636 common factors in the data or for data reduction purposes.
638 The VARIABLES subcommand is required. It lists the variables which are to partake in the analysis.
640 The /EXTRACTION subcommand is used to specify the way in which factors (components) are extracted from the data.
641 If PC is specified, then Principal Components Analysis is used. If PAF is specified, then Principal Axis Factoring is
642 used. By default Principal Components Analysis will be used.
644 The /ROTATION subcommand is used to specify the method by which the extracted solution will be rotated.
645 Three methods are available: VARIMAX (which is the default), EQUAMAX, and QUARTIMAX.
646 If don't want any rotation to be performed, the word NOROTATE will prevent the command from performing any
647 rotation on the data. Oblique rotations are not supported.
649 The /METHOD subcommand should be used to determine whether the covariance matrix or the correlation matrix of the data is
650 to be analysed. By default, the correlation matrix is analysed.
652 The /PRINT subcommand may be used to select which features of the analysis are reported:
656 A table of mean values, standard deviations and total weights are printed.
658 Initial communalities and eigenvalues are printed.
660 Extracted communalities and eigenvalues are printed.
662 Rotated communalities and eigenvalues are printed.
664 The correlation matrix is printed.
666 The covariance matrix is printed.
668 The determinant of the correlation or covariance matrix is printed.
670 The Kaiser-Meyer-Olkin measure of sampling adequacy and the Bartlett test of sphericity is printed.
672 The significance of the elements of correlation matrix is printed.
674 All of the above are printed.
676 Identical to INITIAL and EXTRACTION.
679 If /PLOT=EIGEN is given, then a ``Scree'' plot of the eigenvalues will be printed. This can be useful for visualizing
680 which factors (components) should be retained.
682 The /FORMAT subcommand determined how data are to be displayed in loading matrices. If SORT is specified, then the variables
683 are sorted in descending order of significance. If BLANK(@var{n}) is specified, then coefficients whose absolute value is less
684 than @var{n} will not be printed. If the keyword DEFAULT is given, or if no /FORMAT subcommand is given, then no sorting is
685 performed, and all coefficients will be printed.
687 The /CRITERIA subcommand is used to specify how the number of extracted factors (components) are chosen. If FACTORS(@var{n}) is
688 specified, where @var{n} is an integer, then @var{n} factors will be extracted. Otherwise, the MINEIGEN setting will
689 be used. MINEIGEN(@var{l}) requests that all factors whose eigenvalues are greater than or equal to @var{l} are extracted.
690 The default value of @var{l} is 1. The ECONVERGE and ITERATE settings have effect only when iterative algorithms for factor
691 extraction (such as Principal Axis Factoring) are used. ECONVERGE(@var{delta}) specifies that iteration should cease when
692 the maximum absolute value of the communality estimate between one iteration and the previous is less than @var{delta}. The
693 default value of @var{delta} is 0.001.
694 The ITERATE(@var{m}) setting sets the maximum number of iterations to @var{m}. The default value of @var{m} is 25.
696 The @cmd{MISSING} subcommand determines the handling of missing variables.
697 If INCLUDE is set, then user-missing values are included in the
698 calculations, but system-missing values are not.
699 If EXCLUDE is set, which is the default, user-missing
700 values are excluded as well as system-missing values.
702 If LISTWISE is set, then the entire case is excluded from analysis
703 whenever any variable specified in the @cmd{VARIABLES} subcommand
704 contains a missing value.
705 If PAIRWISE is set, then a case is considered missing only if either of the
706 values for the particular coefficient are missing.
707 The default is LISTWISE.
718 [ BY @{varlist@} [BY @{varlist@} [BY @{varlist@} @dots{} ]]]
721 [ BY @{varlist@} [BY @{varlist@} [BY @{varlist@} @dots{} ]]] ]
723 [/CELLS = [MEAN] [COUNT] [STDDEV] [SEMEAN] [SUM] [MIN] [MAX] [RANGE]
724 [VARIANCE] [KURT] [SEKURT]
725 [SKEW] [SESKEW] [FIRST] [LAST]
726 [HARMONIC] [GEOMETRIC]
731 [/MISSING = [TABLE] [INCLUDE] [DEPENDENT]]
734 You can use the @cmd{MEANS} command to calculate the arithmetic mean and similar
735 statistics, either for the dataset as a whole or for categories of data.
737 The simplest form of the command is
741 @noindent which calculates the mean, count and standard deviation for @var{v}.
742 If you specify a grouping variable, for example
744 MEANS @var{v} BY @var{g}.
746 @noindent then the means, counts and standard deviations for @var{v} after having
747 been grouped by @var{g} will be calculated.
748 Instead of the mean, count and standard deviation, you could specify the statistics
749 in which you are interested:
751 MEANS @var{x} @var{y} BY @var{g}
752 /CELLS = HARMONIC SUM MIN.
754 This example calculates the harmonic mean, the sum and the minimum values of @var{x} and @var{y}
757 The CELLS subcommand specifies which statistics to calculate. The available statistics
761 @cindex arithmetic mean
764 The count of the values.
766 The standard deviation.
768 The standard error of the mean.
770 The sum of the values.
776 The difference between the maximum and minimum values.
780 The first value in the category.
782 The last value in the category.
786 The standard error of the skewness.
790 The standard error of the kurtosis.
792 @cindex harmonic mean
795 @cindex geometric mean
799 In addition, three special keywords are recognized:
802 This is the same as MEAN COUNT STDDEV
804 All of the above statistics will be calculated.
806 No statistics will be calculated (only a summary will be shown).
810 More than one @dfn{table} can be specified in a single command.
811 Each table is separated by a @samp{/}. For
815 @var{c} @var{d} @var{e} BY @var{x}
816 /@var{a} @var{b} BY @var{x} @var{y}
817 /@var{f} BY @var{y} BY @var{z}.
819 has three tables (the @samp{TABLE =} is optional).
820 The first table has three dependent variables @var{c}, @var{d} and @var{e}
821 and a single categorical variable @var{x}.
822 The second table has two dependent variables @var{a} and @var{b},
823 and two categorical variables @var{x} and @var{y}.
824 The third table has a single dependent variables @var{f}
825 and a categorical variable formed by the combination of @var{y} and @var{z}.
828 By default values are omitted from the analysis only if missing values
829 (either system missing or user missing)
830 for any of the variables directly involved in their calculation are
832 This behaviour can be modified with the /MISSING subcommand.
833 Three options are possible: TABLE, INCLUDE and DEPENDENT.
835 /MISSING = TABLE causes cases to be dropped if any variable is missing
836 in the table specification currently being processed, regardless of
837 whether it is needed to calculate the statistic.
839 /MISSING = INCLUDE says that user missing values, either in the dependent
840 variables or in the categorical variables should be taken at their face
841 value, and not excluded.
843 /MISSING = DEPENDENT says that user missing values, in the dependent
844 variables should be taken at their face value, however cases which
845 have user missing values for the categorical variables should be omitted
846 from the calculation.
852 @cindex nonparametric tests
857 nonparametric test subcommands
862 [ /STATISTICS=@{DESCRIPTIVES@} ]
864 [ /MISSING=@{ANALYSIS, LISTWISE@} @{INCLUDE, EXCLUDE@} ]
866 [ /METHOD=EXACT [ TIMER [(n)] ] ]
869 NPAR TESTS performs nonparametric tests.
870 Non parametric tests make very few assumptions about the distribution of the
872 One or more tests may be specified by using the corresponding subcommand.
873 If the /STATISTICS subcommand is also specified, then summary statistics are
874 produces for each variable that is the subject of any test.
876 Certain tests may take a long time to execute, if an exact figure is required.
877 Therefore, by default asymptotic approximations are used unless the
878 subcommand /METHOD=EXACT is specified.
879 Exact tests give more accurate results, but may take an unacceptably long
880 time to perform. If the TIMER keyword is used, it sets a maximum time,
881 after which the test will be abandoned, and a warning message printed.
882 The time, in minutes, should be specified in parentheses after the TIMER keyword.
883 If the TIMER keyword is given without this figure, then a default value of 5 minutes
888 * BINOMIAL:: Binomial Test
889 * CHISQUARE:: Chisquare Test
890 * COCHRAN:: Cochran Q Test
891 * FRIEDMAN:: Friedman Test
892 * KENDALL:: Kendall's W Test
893 * KOLMOGOROV-SMIRNOV:: Kolmogorov Smirnov Test
894 * KRUSKAL-WALLIS:: Kruskal-Wallis Test
895 * MANN-WHITNEY:: Mann Whitney U Test
896 * MCNEMAR:: McNemar Test
897 * MEDIAN:: Median Test
899 * SIGN:: The Sign Test
900 * WILCOXON:: Wilcoxon Signed Ranks Test
905 @subsection Binomial test
907 @cindex binomial test
910 [ /BINOMIAL[(p)]=var_list[(value1[, value2)] ] ]
913 The /BINOMIAL subcommand compares the observed distribution of a dichotomous
914 variable with that of a binomial distribution.
915 The variable @var{p} specifies the test proportion of the binomial
917 The default value of 0.5 is assumed if @var{p} is omitted.
919 If a single value appears after the variable list, then that value is
920 used as the threshold to partition the observed values. Values less
921 than or equal to the threshold value form the first category. Values
922 greater than the threshold form the second category.
924 If two values appear after the variable list, then they will be used
925 as the values which a variable must take to be in the respective
927 Cases for which a variable takes a value equal to neither of the specified
928 values, take no part in the test for that variable.
930 If no values appear, then the variable must assume dichotomous
932 If more than two distinct, non-missing values for a variable
933 under test are encountered then an error occurs.
935 If the test proportion is equal to 0.5, then a two tailed test is
936 reported. For any other test proportion, a one tailed test is
938 For one tailed tests, if the test proportion is less than
939 or equal to the observed proportion, then the significance of
940 observing the observed proportion or more is reported.
941 If the test proportion is more than the observed proportion, then the
942 significance of observing the observed proportion or less is reported.
943 That is to say, the test is always performed in the observed
946 PSPP uses a very precise approximation to the gamma function to
947 compute the binomial significance. Thus, exact results are reported
948 even for very large sample sizes.
953 @subsection Chisquare Test
955 @cindex chisquare test
959 [ /CHISQUARE=var_list[(lo,hi)] [/EXPECTED=@{EQUAL|f1, f2 @dots{} fn@}] ]
963 The /CHISQUARE subcommand produces a chi-square statistic for the differences
964 between the expected and observed frequencies of the categories of a variable.
965 Optionally, a range of values may appear after the variable list.
966 If a range is given, then non integer values are truncated, and values
967 outside the specified range are excluded from the analysis.
969 The /EXPECTED subcommand specifies the expected values of each
971 There must be exactly one non-zero expected value, for each observed
972 category, or the EQUAL keywork must be specified.
973 You may use the notation @var{n}*@var{f} to specify @var{n}
974 consecutive expected categories all taking a frequency of @var{f}.
975 The frequencies given are proportions, not absolute frequencies. The
976 sum of the frequencies need not be 1.
977 If no /EXPECTED subcommand is given, then then equal frequencies
982 @subsection Cochran Q Test
984 @cindex Cochran Q test
988 [ /COCHRAN = varlist ]
991 The Cochran Q test is used to test for differences between three or more groups.
992 The data for @var{varlist} in all cases must assume exactly two distinct values (other than missing values).
994 The value of Q will be displayed and its Asymptotic significance based on a chi-square distribution.
997 @subsection Friedman Test
999 @cindex Friedman test
1002 [ /FRIEDMAN = varlist ]
1005 The Friedman test is used to test for differences between repeated measures when there is no indication that the distributions are normally distributed.
1007 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.
1010 @subsection Kendall's W Test
1012 @cindex Kendall's W test
1013 @cindex coefficient of concordance
1016 [ /KENDALL = varlist ]
1019 The Kendall test investigates whether an arbitrary number of related samples come from the
1021 It is identical to the Friedman test except that the additional statistic W, Kendall's Coefficient of Concordance is printed.
1022 It has the range [0,1] --- a value of zero indicates no agreement between the samples whereas a value of
1023 unity indicates complete agreement.
1026 @node KOLMOGOROV-SMIRNOV
1027 @subsection Kolmogorov-Smirnov Test
1028 @vindex KOLMOGOROV-SMIRNOV
1030 @cindex Kolmogorov-Smirnov test
1033 [ /KOLMOGOROV-SMIRNOV (@{NORMAL [@var{mu}, @var{sigma}], UNIFORM [@var{min}, @var{max}], POISSON [@var{lambda}], EXPONENTIAL [@var{scale}] @}) = varlist ]
1036 The one sample Kolmogorov-Smirnov subcommand is used to test whether or not a dataset is
1037 drawn from a particular distribution. Four distributions are supported, @i{viz:}
1038 Normal, Uniform, Poisson and Exponential.
1040 Ideally you should provide the parameters of the distribution against which you wish to test
1041 the data. For example, with the normal distribution the mean (@var{mu})and standard deviation (@var{sigma})
1042 should be given; with the uniform distribution, the minimum (@var{min})and maximum (@var{max}) value should
1044 However, if the parameters are omitted they will be imputed from the data. Imputing the
1045 parameters reduces the power of the test so should be avoided if possible.
1047 In the following example, two variables @var{score} and @var{age} are tested to see if
1048 they follow a normal distribution with a mean of 3.5 and a standard deviation of 2.0.
1051 /KOLMOGOROV-SMIRNOV (normal 3.5 2.0) = @var{score} @var{age}.
1053 If the variables need to be tested against different distributions, then a separate
1054 subcommand must be used. For example the following syntax tests @var{score} against
1055 a normal distribution with mean of 3.5 and standard deviation of 2.0 whilst @var{age}
1056 is tested against a normal distribution of mean 40 and standard deviation 1.5.
1059 /KOLMOGOROV-SMIRNOV (normal 3.5 2.0) = @var{score}
1060 /KOLMOGOROV-SMIRNOV (normal 40 1.5) = @var{age}.
1063 The abbreviated subcommand K-S may be used in place of KOLMOGOROV-SMIRNOV.
1065 @node KRUSKAL-WALLIS
1066 @subsection Kruskal-Wallis Test
1067 @vindex KRUSKAL-WALLIS
1069 @cindex Kruskal-Wallis test
1072 [ /KRUSKAL-WALLIS = varlist BY var (lower, upper) ]
1075 The Kruskal-Wallis test is used to compare data from an
1076 arbitrary number of populations. It does not assume normality.
1077 The data to be compared are specified by @var{varlist}.
1078 The categorical variable determining the groups to which the
1079 data belongs is given by @var{var}. The limits @var{lower} and
1080 @var{upper} specify the valid range of @var{var}. Any cases for
1081 which @var{var} falls outside [@var{lower}, @var{upper}] will be
1084 The mean rank of each group as well as the chi-squared value and significance
1085 of the test will be printed.
1086 The abbreviated subcommand K-W may be used in place of KRUSKAL-WALLIS.
1090 @subsection Mann-Whitney U Test
1091 @vindex MANN-WHITNEY
1093 @cindex Mann-Whitney U test
1094 @cindex U, Mann-Whitney U
1097 [ /MANN-WHITNEY = varlist BY var (group1, group2) ]
1100 The Mann-Whitney subcommand is used to test whether two groups of data come from different populations.
1101 The variables to be tested should be specified in @var{varlist} and the grouping variable, that determines to which group the test variables belong, in @var{var}.
1102 @var{Var} may be either a string or an alpha variable.
1103 @var{Group1} and @var{group2} specify the
1104 two values of @var{var} which determine the groups of the test data.
1105 Cases for which the @var{var} value is neither @var{group1} or @var{group2} will be ignored.
1107 The value of the Mann-Whitney U statistic, the Wilcoxon W, and the significance will be printed.
1108 The abbreviated subcommand M-W may be used in place of MANN-WHITNEY.
1111 @subsection McNemar Test
1113 @cindex McNemar test
1116 [ /MCNEMAR varlist [ WITH varlist [ (PAIRED) ]]]
1119 Use McNemar's test to analyse the significance of the difference between
1120 pairs of correlated proportions.
1122 If the @code{WITH} keyword is omitted, then tests for all
1123 combinations of the listed variables are performed.
1124 If the @code{WITH} keyword is given, and the @code{(PAIRED)} keyword
1125 is also given, then the number of variables preceding @code{WITH}
1126 must be the same as the number following it.
1127 In this case, tests for each respective pair of variables are
1129 If the @code{WITH} keyword is given, but the
1130 @code{(PAIRED)} keyword is omitted, then tests for each combination
1131 of variable preceding @code{WITH} against variable following
1132 @code{WITH} are performed.
1134 The data in each variable must be dichotomous. If there are more
1135 than two distinct variables an error will occur and the test will
1139 @subsection Median Test
1144 [ /MEDIAN [(value)] = varlist BY variable (value1, value2) ]
1147 The median test is used to test whether independent samples come from
1148 populations with a common median.
1149 The median of the populations against which the samples are to be tested
1150 may be given in parentheses immediately after the
1151 /MEDIAN subcommand. If it is not given, the median will be imputed from the
1152 union of all the samples.
1154 The variables of the samples to be tested should immediately follow the @samp{=} sign. The
1155 keyword @code{BY} must come next, and then the grouping variable. Two values
1156 in parentheses should follow. If the first value is greater than the second,
1157 then a 2 sample test is performed using these two values to determine the groups.
1158 If however, the first variable is less than the second, then a @i{k} sample test is
1159 conducted and the group values used are all values encountered which lie in the
1160 range [@var{value1},@var{value2}].
1164 @subsection Runs Test
1169 [ /RUNS (@{MEAN, MEDIAN, MODE, value@}) = varlist ]
1172 The /RUNS subcommand tests whether a data sequence is randomly ordered.
1174 It works by examining the number of times a variable's value crosses a given threshold.
1175 The desired threshold must be specified within parentheses.
1176 It may either be specified as a number or as one of MEAN, MEDIAN or MODE.
1177 Following the threshold specification comes the list of variables whose values are to be
1180 The subcommand shows the number of runs, the asymptotic significance based on the
1184 @subsection Sign Test
1189 [ /SIGN varlist [ WITH varlist [ (PAIRED) ]]]
1192 The /SIGN subcommand tests for differences between medians of the
1194 The test does not make any assumptions about the
1195 distribution of the data.
1197 If the @code{WITH} keyword is omitted, then tests for all
1198 combinations of the listed variables are performed.
1199 If the @code{WITH} keyword is given, and the @code{(PAIRED)} keyword
1200 is also given, then the number of variables preceding @code{WITH}
1201 must be the same as the number following it.
1202 In this case, tests for each respective pair of variables are
1204 If the @code{WITH} keyword is given, but the
1205 @code{(PAIRED)} keyword is omitted, then tests for each combination
1206 of variable preceding @code{WITH} against variable following
1207 @code{WITH} are performed.
1210 @subsection Wilcoxon Matched Pairs Signed Ranks Test
1211 @comment node-name, next, previous, up
1213 @cindex wilcoxon matched pairs signed ranks test
1216 [ /WILCOXON varlist [ WITH varlist [ (PAIRED) ]]]
1219 The /WILCOXON subcommand tests for differences between medians of the
1221 The test does not make any assumptions about the variances of the samples.
1222 It does however assume that the distribution is symetrical.
1224 If the @code{WITH} keyword is omitted, then tests for all
1225 combinations of the listed variables are performed.
1226 If the @code{WITH} keyword is given, and the @code{(PAIRED)} keyword
1227 is also given, then the number of variables preceding @code{WITH}
1228 must be the same as the number following it.
1229 In this case, tests for each respective pair of variables are
1231 If the @code{WITH} keyword is given, but the
1232 @code{(PAIRED)} keyword is omitted, then tests for each combination
1233 of variable preceding @code{WITH} against variable following
1234 @code{WITH} are performed.
1237 @comment node-name, next, previous, up
1244 /MISSING=@{ANALYSIS,LISTWISE@} @{EXCLUDE,INCLUDE@}
1245 /CRITERIA=CIN(confidence)
1253 (Independent Samples mode.)
1254 GROUPS=var(value1 [, value2])
1258 (Paired Samples mode.)
1259 PAIRS=var_list [WITH var_list [(PAIRED)] ]
1264 The @cmd{T-TEST} procedure outputs tables used in testing hypotheses about
1266 It operates in one of three modes:
1268 @item One Sample mode.
1269 @item Independent Groups mode.
1274 Each of these modes are described in more detail below.
1275 There are two optional subcommands which are common to all modes.
1277 The @cmd{/CRITERIA} subcommand tells PSPP the confidence interval used
1278 in the tests. The default value is 0.95.
1281 The @cmd{MISSING} subcommand determines the handling of missing
1283 If INCLUDE is set, then user-missing values are included in the
1284 calculations, but system-missing values are not.
1285 If EXCLUDE is set, which is the default, user-missing
1286 values are excluded as well as system-missing values.
1287 This is the default.
1289 If LISTWISE is set, then the entire case is excluded from analysis
1290 whenever any variable specified in the @cmd{/VARIABLES}, @cmd{/PAIRS} or
1291 @cmd{/GROUPS} subcommands contains a missing value.
1292 If ANALYSIS is set, then missing values are excluded only in the analysis for
1293 which they would be needed. This is the default.
1297 * One Sample Mode:: Testing against a hypothesized mean
1298 * Independent Samples Mode:: Testing two independent groups for equal mean
1299 * Paired Samples Mode:: Testing two interdependent groups for equal mean
1302 @node One Sample Mode
1303 @subsection One Sample Mode
1305 The @cmd{TESTVAL} subcommand invokes the One Sample mode.
1306 This mode is used to test a population mean against a hypothesized
1308 The value given to the @cmd{TESTVAL} subcommand is the value against
1309 which you wish to test.
1310 In this mode, you must also use the @cmd{/VARIABLES} subcommand to
1311 tell PSPP which variables you wish to test.
1313 @node Independent Samples Mode
1314 @comment node-name, next, previous, up
1315 @subsection Independent Samples Mode
1317 The @cmd{GROUPS} subcommand invokes Independent Samples mode or
1319 This mode is used to test whether two groups of values have the
1320 same population mean.
1321 In this mode, you must also use the @cmd{/VARIABLES} subcommand to
1322 tell PSPP the dependent variables you wish to test.
1324 The variable given in the @cmd{GROUPS} subcommand is the independent
1325 variable which determines to which group the samples belong.
1326 The values in parentheses are the specific values of the independent
1327 variable for each group.
1328 If the parentheses are omitted and no values are given, the default values
1329 of 1.0 and 2.0 are assumed.
1331 If the independent variable is numeric,
1332 it is acceptable to specify only one value inside the parentheses.
1333 If you do this, cases where the independent variable is
1334 greater than or equal to this value belong to the first group, and cases
1335 less than this value belong to the second group.
1336 When using this form of the @cmd{GROUPS} subcommand, missing values in
1337 the independent variable are excluded on a listwise basis, regardless
1338 of whether @cmd{/MISSING=LISTWISE} was specified.
1341 @node Paired Samples Mode
1342 @comment node-name, next, previous, up
1343 @subsection Paired Samples Mode
1345 The @cmd{PAIRS} subcommand introduces Paired Samples mode.
1346 Use this mode when repeated measures have been taken from the same
1348 If the @code{WITH} keyword is omitted, then tables for all
1349 combinations of variables given in the @cmd{PAIRS} subcommand are
1351 If the @code{WITH} keyword is given, and the @code{(PAIRED)} keyword
1352 is also given, then the number of variables preceding @code{WITH}
1353 must be the same as the number following it.
1354 In this case, tables for each respective pair of variables are
1356 In the event that the @code{WITH} keyword is given, but the
1357 @code{(PAIRED)} keyword is omitted, then tables for each combination
1358 of variable preceding @code{WITH} against variable following
1359 @code{WITH} are generated.
1363 @comment node-name, next, previous, up
1367 @cindex analysis of variance
1372 [/VARIABLES = ] var_list BY var
1373 /MISSING=@{ANALYSIS,LISTWISE@} @{EXCLUDE,INCLUDE@}
1374 /CONTRAST= value1 [, value2] ... [,valueN]
1375 /STATISTICS=@{DESCRIPTIVES,HOMOGENEITY@}
1376 /POSTHOC=@{BONFERRONI, GH, LSD, SCHEFFE, SIDAK, TUKEY, ALPHA ([value])@}
1379 The @cmd{ONEWAY} procedure performs a one-way analysis of variance of
1380 variables factored by a single independent variable.
1381 It is used to compare the means of a population
1382 divided into more than two groups.
1384 The dependent variables to be analysed should be given in the @code{VARIABLES}
1386 The list of variables must be followed by the @code{BY} keyword and
1387 the name of the independent (or factor) variable.
1389 You can use the @code{STATISTICS} subcommand to tell PSPP to display
1390 ancilliary information. The options accepted are:
1393 Displays descriptive statistics about the groups factored by the independent
1396 Displays the Levene test of Homogeneity of Variance for the
1397 variables and their groups.
1400 The @code{CONTRAST} subcommand is used when you anticipate certain
1401 differences between the groups.
1402 The subcommand must be followed by a list of numerals which are the
1403 coefficients of the groups to be tested.
1404 The number of coefficients must correspond to the number of distinct
1405 groups (or values of the independent variable).
1406 If the total sum of the coefficients are not zero, then PSPP will
1407 display a warning, but will proceed with the analysis.
1408 The @code{CONTRAST} subcommand may be given up to 10 times in order
1409 to specify different contrast tests.
1410 The @code{MISSING} subcommand defines how missing values are handled.
1411 If LISTWISE is specified then cases which have missing values for
1412 the independent variable or any dependent variable will be ignored.
1413 If ANALYSIS is specified, then cases will be ignored if the independent
1414 variable is missing or if the dependent variable currently being
1415 analysed is missing. The default is ANALYSIS.
1416 A setting of EXCLUDE means that variables whose values are
1417 user-missing are to be excluded from the analysis. A setting of
1418 INCLUDE means they are to be included. The default is EXCLUDE.
1420 Using the @code{POSTHOC} subcommand you can perform multiple
1421 pairwise comparisons on the data. The following comparison methods
1425 Least Significant Difference.
1427 Tukey Honestly Significant Difference.
1435 The Games-Howell test.
1439 The optional syntax @code{ALPHA(@var{value})} is used to indicate
1440 that @var{value} should be used as the
1441 confidence level for which the posthoc tests will be performed.
1442 The default is 0.05.
1445 @comment node-name, next, previous, up
1446 @section QUICK CLUSTER
1447 @vindex QUICK CLUSTER
1449 @cindex K-means clustering
1453 QUICK CLUSTER var_list
1454 [/CRITERIA=CLUSTERS(@var{k}) [MXITER(@var{max_iter})]]
1455 [/MISSING=@{EXCLUDE,INCLUDE@} @{LISTWISE, PAIRWISE@}]
1458 The @cmd{QUICK CLUSTER} command performs k-means clustering on the
1459 dataset. This is useful when you wish to allocate cases into clusters
1460 of similar values and you already know the number of clusters.
1462 The minimum specification is @samp{QUICK CLUSTER} followed by the names
1463 of the variables which contain the cluster data. Normally you will also
1464 want to specify @samp{/CRITERIA=CLUSTERS(@var{k})} where @var{k} is the
1465 number of clusters. If this is not given, then @var{k} defaults to 2.
1467 The command uses an iterative algorithm to determine the clusters for
1468 each case. It will continue iterating until convergence, or until @var{max_iter}
1469 iterations have been done. The default value of @var{max_iter} is 2.
1471 The @cmd{MISSING} subcommand determines the handling of missing variables.
1472 If INCLUDE is set, then user-missing values are considered at their face
1473 value and not as missing values.
1474 If EXCLUDE is set, which is the default, user-missing
1475 values are excluded as well as system-missing values.
1477 If LISTWISE is set, then the entire case is excluded from the analysis
1478 whenever any of the clustering variables contains a missing value.
1479 If PAIRWISE is set, then a case is considered missing only if all the
1480 clustering variables contain missing values. Otherwise it is clustered
1481 on the basis of the non-missing values.
1482 The default is LISTWISE.
1486 @comment node-name, next, previous, up
1493 [VARIABLES=] var_list [@{A,D@}] [BY var_list]
1494 /TIES=@{MEAN,LOW,HIGH,CONDENSE@}
1495 /FRACTION=@{BLOM,TUKEY,VW,RANKIT@}
1497 /MISSING=@{EXCLUDE,INCLUDE@}
1499 /RANK [INTO var_list]
1500 /NTILES(k) [INTO var_list]
1501 /NORMAL [INTO var_list]
1502 /PERCENT [INTO var_list]
1503 /RFRACTION [INTO var_list]
1504 /PROPORTION [INTO var_list]
1506 /SAVAGE [INTO var_list]
1509 The @cmd{RANK} command ranks variables and stores the results into new
1512 The VARIABLES subcommand, which is mandatory, specifies one or
1513 more variables whose values are to be ranked.
1514 After each variable, @samp{A} or @samp{D} may appear, indicating that
1515 the variable is to be ranked in ascending or descending order.
1516 Ascending is the default.
1517 If a BY keyword appears, it should be followed by a list of variables
1518 which are to serve as group variables.
1519 In this case, the cases are gathered into groups, and ranks calculated
1522 The TIES subcommand specifies how tied values are to be treated. The
1523 default is to take the mean value of all the tied cases.
1525 The FRACTION subcommand specifies how proportional ranks are to be
1526 calculated. This only has any effect if NORMAL or PROPORTIONAL rank
1527 functions are requested.
1529 The PRINT subcommand may be used to specify that a summary of the rank
1530 variables created should appear in the output.
1532 The function subcommands are RANK, NTILES, NORMAL, PERCENT, RFRACTION,
1533 PROPORTION and SAVAGE. Any number of function subcommands may appear.
1534 If none are given, then the default is RANK.
1535 The NTILES subcommand must take an integer specifying the number of
1536 partitions into which values should be ranked.
1537 Each subcommand may be followed by the INTO keyword and a list of
1538 variables which are the variables to be created and receive the rank
1539 scores. There may be as many variables specified as there are
1540 variables named on the VARIABLES subcommand. If fewer are specified,
1541 then the variable names are automatically created.
1543 The MISSING subcommand determines how user missing values are to be
1544 treated. A setting of EXCLUDE means that variables whose values are
1545 user-missing are to be excluded from the rank scores. A setting of
1546 INCLUDE means they are to be included. The default is EXCLUDE.
1548 @include regression.texi
1552 @section RELIABILITY
1558 /SCALE (@var{name}) = @{var_list, ALL@}
1559 /MODEL=@{ALPHA, SPLIT[(N)]@}
1560 /SUMMARY=@{TOTAL,ALL@}
1561 /MISSING=@{EXCLUDE,INCLUDE@}
1564 @cindex Cronbach's Alpha
1565 The @cmd{RELIABILTY} command performs reliability analysis on the data.
1567 The VARIABLES subcommand is required. It determines the set of variables
1568 upon which analysis is to be performed.
1570 The SCALE subcommand determines which variables reliability is to be
1571 calculated for. If it is omitted, then analysis for all variables named
1572 in the VARIABLES subcommand will be used.
1573 Optionally, the @var{name} parameter may be specified to set a string name
1576 The MODEL subcommand determines the type of analysis. If ALPHA is specified,
1577 then Cronbach's Alpha is calculated for the scale. If the model is SPLIT,
1578 then the variables are divided into 2 subsets. An optional parameter
1579 @var{N} may be given, to specify how many variables to be in the first subset.
1580 If @var{N} is omitted, then it defaults to one half of the variables in the
1581 scale, or one half minus one if there are an odd number of variables.
1582 The default model is ALPHA.
1584 By default, any cases with user missing, or system missing values for
1586 in the VARIABLES subcommand will be omitted from analysis.
1587 The MISSING subcommand determines whether user missing values are to
1588 be included or excluded in the analysis.
1590 The SUMMARY subcommand determines the type of summary analysis to be performed.
1591 Currently there is only one type: SUMMARY=TOTAL, which displays per-item
1592 analysis tested against the totals.
1600 @cindex Receiver Operating Characteristic
1601 @cindex Area under curve
1604 ROC @var{var_list} BY @var{state_var} (@var{state_value})
1605 /PLOT = @{ CURVE [(REFERENCE)], NONE @}
1606 /PRINT = [ SE ] [ COORDINATES ]
1607 /CRITERIA = [ CUTOFF(@{INCLUDE,EXCLUDE@}) ]
1608 [ TESTPOS (@{LARGE,SMALL@}) ]
1609 [ CI (@var{confidence}) ]
1610 [ DISTRIBUTION (@{FREE, NEGEXPO @}) ]
1611 /MISSING=@{EXCLUDE,INCLUDE@}
1615 The @cmd{ROC} command is used to plot the receiver operating characteristic curve
1616 of a dataset, and to estimate the area under the curve.
1617 This is useful for analysing the efficacy of a variable as a predictor of a state of nature.
1619 The mandatory @var{var_list} is the list of predictor variables.
1620 The variable @var{state_var} is the variable whose values represent the actual states,
1621 and @var{state_value} is the value of this variable which represents the positive state.
1623 The optional subcommand PLOT is used to determine if and how the ROC curve is drawn.
1624 The keyword CURVE means that the ROC curve should be drawn, and the optional keyword REFERENCE,
1625 which should be enclosed in parentheses, says that the diagonal reference line should be drawn.
1626 If the keyword NONE is given, then no ROC curve is drawn.
1627 By default, the curve is drawn with no reference line.
1629 The optional subcommand PRINT determines which additional tables should be printed.
1630 Two additional tables are available.
1631 The SE keyword says that standard error of the area under the curve should be printed as well as
1633 In addition, a p-value under the null hypothesis that the area under the curve equals 0.5 will be
1635 The COORDINATES keyword says that a table of coordinates of the ROC curve should be printed.
1637 The CRITERIA subcommand has four optional parameters:
1639 @item The TESTPOS parameter may be LARGE or SMALL.
1640 LARGE is the default, and says that larger values in the predictor variables are to be
1641 considered positive. SMALL indicates that smaller values should be considered positive.
1643 @item The CI parameter specifies the confidence interval that should be printed.
1644 It has no effect if the SE keyword in the PRINT subcommand has not been given.
1646 @item The DISTRIBUTION parameter determines the method to be used when estimating the area
1648 There are two possibilities, @i{viz}: FREE and NEGEXPO.
1649 The FREE method uses a non-parametric estimate, and the NEGEXPO method a bi-negative
1650 exponential distribution estimate.
1651 The NEGEXPO method should only be used when the number of positive actual states is
1652 equal to the number of negative actual states.
1653 The default is FREE.
1655 @item The CUTOFF parameter is for compatibility and is ignored.
1658 The MISSING subcommand determines whether user missing values are to
1659 be included or excluded in the analysis. The default behaviour is to
1661 Cases are excluded on a listwise basis; if any of the variables in @var{var_list}
1662 or if the variable @var{state_var} is missing, then the entire case will be