* ROC:: Receiver Operating Characteristic.
@end menu
-@node DESCRIPTIVES
+@node DESCRIPTIVES, FREQUENCIES, Statistics, Statistics
@section DESCRIPTIVES
@vindex DESCRIPTIVES
@caption {Descriptives statistics including two normalized variables (Z-scores)}
@end float
-@node FREQUENCIES
+@node FREQUENCIES, EXAMINE, DESCRIPTIVES, Statistics
@section FREQUENCIES
@vindex FREQUENCIES
@caption {The relative frequencies of @exvar{sex} and @exvar{occupation}}
@end float
-@node EXAMINE
+@node EXAMINE, GRAPH, FREQUENCIES, Statistics
@section EXAMINE
@vindex EXAMINE
for which there are many distinct values, then @cmd{EXAMINE} will produce a very
large quantity of output.
-@node GRAPH
+@node GRAPH, CORRELATIONS, EXAMINE, Statistics
@section GRAPH
@vindex GRAPH
* BAR CHART:: Bar Charts
@end menu
-@node SCATTERPLOT
+@node SCATTERPLOT, HISTOGRAM, GRAPH, GRAPH
@subsection Scatterplot
@cindex scatterplot
on the value of the @var{gender} variable, the colour of the datapoint is different. With
this plot it is possible to analyze gender differences for @var{height} versus @var{weight} relation.
-@node HISTOGRAM
+@node HISTOGRAM, BAR CHART, SCATTERPLOT, GRAPH
@subsection Histogram
@cindex histogram
/HISTOGRAM = @var{weight}.
@end example
-@node BAR CHART
+@node BAR CHART, , HISTOGRAM, GRAPH
@subsection Bar Chart
@cindex bar chart
Bar charts can also be produced using the @ref{FREQUENCIES} and @ref{CROSSTABS} commands.
-@node CORRELATIONS
+@node CORRELATIONS, CROSSTABS, GRAPH, Statistics
@section CORRELATIONS
@vindex CORRELATIONS
be displayed for each pair of variables.
The keyword @subcmd{ALL} is the union of @subcmd{DESCRIPTIVES} and @subcmd{XPROD}.
-@node CROSSTABS
+@node CROSSTABS, CTABLES, CORRELATIONS, Statistics
@section CROSSTABS
@vindex CROSSTABS
@caption {The results of a test of independence between @exvar{sex} and @exvar{occupation}}
@end float
-@node CTABLES
+@node CTABLES, FACTOR, CROSSTABS, Statistics
@section CTABLES
@vindex CTABLES
@menu
* CTABLES Basics::
+* CTABLES Data Summarization::
@end menu
-@node CTABLES Basics
+@node CTABLES Basics, CTABLES Data Summarization, CTABLES, CTABLES
@subsection Basics
The only required subcommand is @code{TABLE}, which specifies the
@noindent
In @code{TABLE}, each of @var{rows}, @var{columns}, and @var{layers}
is either empty or an axis expression that specifies one or more
-variables. An axis expression that names a categorical variable
-divides the data into cells according to the values of that variable.
-When all the variables named on @code{TABLE} are categorical, by
-default each cell displays the number of cases that it contains, so
-specifying a single variable yields a frequency table:
+variables. At least one must specify an axis expression.
+
+@menu
+* CTABLES Categorical Variable Basics::
+* CTABLES Scalar Variable Basics::
+* CTABLES Overriding Measurement Level::
+* CTABLES Multiple Response Sets::
+@end menu
+
+@node CTABLES Categorical Variable Basics, CTABLES Scalar Variable Basics, CTABLES Basics, CTABLES Basics
+@subsubsection Categorical Variables
+
+An axis expression that names a categorical variable divides the data
+into cells according to the values of that variable. When all the
+variables named on @code{TABLE} are categorical, by default each cell
+displays the number of cases that it contains, so specifying a single
+variable yields a frequency table:
@example
CTABLES /TABLE=AgeGroup.
@psppoutput {ctables2}
@noindent
-The @samp{>} operator nests multiple variables on a single axis, e.g.:
+The @samp{>} ``nesting'' operator nests multiple variables on a single
+axis, e.g.:
@example
CTABLES /TABLE qn105ba BY AgeGroup > qns3a.
@psppoutput {ctables3}
@noindent
-The @samp{+} operator allows a single output table to include multiple
-data analyses. With @samp{+}, @code{CTABLES} divides the output table
-into multiple sections, each of which includes an analysis of the full
-data set. For example, the following command separately tabulates age
-group and driving frequency by gender:
+The @samp{+} ``stacking'' operator allows a single output table to
+include multiple data analyses. With @samp{+}, @code{CTABLES} divides
+the output table into multiple @dfn{sections}, each of which includes
+an analysis of the full data set. For example, the following command
+separately tabulates age group and driving frequency by gender:
@example
CTABLES /TABLE AgeGroup + qn1 BY qns3a.
@end example
@psppoutput {ctables5}
-@node FACTOR
+@node CTABLES Scalar Variable Basics, CTABLES Overriding Measurement Level, CTABLES Categorical Variable Basics, CTABLES Basics
+@subsubsection Scalar Variables
+
+Categorical variables make @code{CTABLES} divide tables into cells.
+With scalar variables, @code{CTABLES} instead calculates a summary
+measure, by default the mean, of the values that fall into a cell.
+For example, if the only variable specified is a scalar variable, then
+the output is a single cell that holds the mean of all of the data:
+
+@example
+CTABLES /TABLE qnd1.
+@end example
+@psppoutput {ctables6}
+
+A scalar variable may nest with categorical variables. The following
+example shows the mean age of survey respondents across gender and
+language groups:
+
+@example
+CTABLES /TABLE qns3a > qnd1 BY region.
+@end example
+@psppoutput {ctables7}
+
+The order of nesting of scalar and categorical variables affects table
+labeling, but it does not affect the data displayed in the table. The
+following example shows how the output changes when the nesting order
+of the scalar and categorical variable are interchanged:
+
+@example
+CTABLES /TABLE qnd1 > qns3a BY region.
+@end example
+@psppoutput {ctables8}
+
+Only a single scalar variable may appear in each section; that is, a
+scalar variable may not nest inside a scalar variable directly or
+indirectly. Scalar variables may only appear on one axis within
+@code{TABLE}.
+
+@node CTABLES Overriding Measurement Level, CTABLES Multiple Response Sets, CTABLES Scalar Variable Basics, CTABLES Basics
+@subsubsection Overriding Measurement Level
+
+By default, @code{CTABLES} uses a variable's measurement level to
+decide whether to treat it as categorical or scalar. Variables
+assigned the nominal or ordinal measurement level are treated as
+categorical, and scalar variables are treated as scalar.
+
+Use the @code{VARIABLE LEVEL} command to change a variable's
+measurement level. To treat a variable as categorical or scalar only
+for one use on @code{CTABLES}, add @samp{[C]} or @samp{[S]},
+respectively, after the variable name. The following example shows
+how to analyze the scalar variable @code{qn20} as categorical:
+
+@example
+CTABLES /TABLE qn20 [C] BY qns3a.
+@end example
+@psppoutput {ctables9}
+
+@node CTABLES Multiple Response Sets, , CTABLES Overriding Measurement Level, CTABLES Basics
+@subsubheading Multiple Response Sets
+
+The @code{CTABLES} command does not yet support multiple response
+sets.
+
+@node CTABLES Data Summarization, , CTABLES Basics, CTABLES
+@subsection Data Summarization
+
+The @code{CTABLES} command allows the user to control how the data are
+summarized with summary specifications, which are enclosed in square
+brackets following a variable name on the @code{TABLE} subcommand.
+When all the variables are categorical, summary specifications can be
+given for the innermost nested variables on any one axis. When a
+scalar variable is present, only the scalar variable may have summary
+specifications. The following example includes a summary
+specification for column and row percentages for categorical
+variables, and mean and median for a scalar variable:
+
+@example
+CTABLES
+ /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a
+ /TABLE=AgeGroup [COLPCT, ROWPCT] BY qns3a.
+@end example
+@psppoutput {ctables10}
+
+A summary specification may override the default label and format by
+appending a string or format specification or both (in that order) to
+the summary function name. For example:
+
+@example
+CTABLES /TABLE=AgeGroup [COLPCT 'Gender %' PCT5.0,
+ ROWPCT 'Age Group %' PCT5.0]
+ BY qns3a.
+@end example
+@psppoutput {ctables11}
+
+Parentheses are a shorthand to apply summary specifications to
+multiple variables. For example, both of these commands:
+
+@example
+CTABLES /TABLE=AgeGroup[COLPCT] + qns1[COLPCT] BY qns3a.
+CTABLES /TABLE=(AgeGroup + qns1)[COLPCT] BY qns3a.
+@end example
+
+@noindent
+produce the same output shown below:
+
+@psppoutput {ctables12}
+
+The following sections list the available summary functions.
+
+@menu
+* CTABLES Summary Functions for Categorical and Scale Variables::
+@end menu
+
+@node CTABLES Summary Functions for Categorical and Scale Variables, , CTABLES Data Summarization, CTABLES Data Summarization
+@subsubsection Summary Functions for Categorical and Scale Variables
+
+This section lists the summary functions that can be applied to cells
+in @code{CTABLES}. Many of these functions have an @var{area} in
+their names. Some @var{area}s correspond to parts of @dfn{subtables},
+whose contents are the cells that pair an innermost row variable and
+an innermost column variable:
+
+@table @code
+@item ROW
+A row within a subtable.
+
+@item COL
+A column within a subtable.
+
+@item SUBTABLE
+All the cells in a subtable
+@end table
+
+Other areas correspond to parts of @dfn{sections}, where stacked
+variables divide each section from another:
+
+@table @code
+@item TABLE
+An entire section.
+
+@item LAYER
+A layer within a section.
+
+@item LAYERROW
+A row in one layer within a section.
+
+@item LAYERCOL
+A column in one layer within a section.
+@end table
+
+The following summary functions may be applied to any variable
+regardless of whether it is categorical or scalar.
+
+@table @asis
+@item @code{COUNT}
+@itemx @code{ECOUNT}
+The sum of weights in a cell (the number of cases, for an unweighted
+dataset). For @code{ECOUNT}, if the @code{WEIGHT} subcommand
+specified an adjustment weight variable, its sum is used.
+
+@item @i{area}@code{PCT} or @i{area}@code{PCT.COUNT}
+A percentage within the specified @var{area}.
+
+@item @i{area}@code{PCT.VALIDN}
+A percentage of valid values within the specified @var{area}.
+
+@item @i{area}@code{PCT.TOTALN}
+A percentage of total values within the specified @var{area}.
+@end table
+
+The following summary functions apply only to scale variables:
+
+@table @asis
+@item @code{MAXIMUM}
+The largest value.
+
+@item @code{MEAN}
+The mean.
+
+@item @code{MEDIAN}
+The median value.
+
+@item @code{MINIMUM}
+The smallest value.
+
+@item @code{MISSING}
+Sum of weights of user- and system-missing values.
+
+@item @code{MODE}
+The highest-frequency value. Ties are broken by taking the smallest mode.
+
+@item @i{area}@code{PCT.SUM}
+Percentage of the sum of the values across @var{area}.
+
+@item @code{PTILE} @i{n}
+The @var{n}th percentile, where @math{0 @leq{} @var{n} @leq{} 100}.
+
+@item @code{RANGE}
+The maximum minus the minimum.
+
+@item @code{SEMEAN}
+The standard error of the mean.
+
+@item @code{STDDEV}
+The standard deviation.
+
+@item @code{SUM}
+The sum.
+
+@item @code{TOTALN}
+@itemx @code{ETOTALN}
+The sum of total count weights. For @code{ETOTALN}, if the
+@code{WEIGHT} subcommand specified an adjustment weight variable, its
+sum is used.
+
+@item @code{VALIDN}
+@itemx @code{EVALIDN}
+The sum of valid count weights. For @code{ETOTALN}, if the
+@code{WEIGHT} subcommand specified an adjustment weight variable, its
+sum is used.
+
+@item @code{VARIANCE}
+The variance.
+@end table
+
+
+@node FACTOR, GLM, CTABLES, Statistics
@section FACTOR
@vindex FACTOR
either of the values for the particular coefficient are missing.
The default is @subcmd{LISTWISE}.
-@node GLM
+@node GLM, LOGISTIC REGRESSION, FACTOR, Statistics
@section GLM
@vindex GLM
A case for which any dependent variable or any factor
variable has a missing value is excluded from the analysis.
-@node LOGISTIC REGRESSION
+@node LOGISTIC REGRESSION, MEANS, GLM, Statistics
@section LOGISTIC REGRESSION
@vindex LOGISTIC REGRESSION
values are excluded as well as system-missing values.
This is the default.
-@node MEANS
+@node MEANS, NPAR TESTS, LOGISTIC REGRESSION, Statistics
@section MEANS
@vindex MEANS
will not be easy to interpret.
So you should consider carefully which variables to select for participation in the analysis.
-@node NPAR TESTS
+@node NPAR TESTS, T-TEST, MEANS, Statistics
@section NPAR TESTS
@vindex NPAR TESTS
@end menu
-@node BINOMIAL
+@node BINOMIAL, CHISQUARE, NPAR TESTS, NPAR TESTS
@subsection Binomial test
@vindex BINOMIAL
@cindex binomial test
even for very large sample sizes.
-@node CHISQUARE
+@node CHISQUARE, COCHRAN, BINOMIAL, NPAR TESTS
@subsection Chi-square Test
@vindex CHISQUARE
@cindex chi-square test
@end float
-@node COCHRAN
+@node COCHRAN, FRIEDMAN, CHISQUARE, NPAR TESTS
@subsection Cochran Q Test
@vindex Cochran
@cindex Cochran Q test
The value of Q is displayed along with its Asymptotic significance
based on a chi-square distribution.
-@node FRIEDMAN
+@node FRIEDMAN, KENDALL, COCHRAN, NPAR TESTS
@subsection Friedman Test
@vindex FRIEDMAN
@cindex Friedman test
A list of variables which contain the measured data must be given. The procedure
prints the sum of ranks for each variable, the test statistic and its significance.
-@node KENDALL
+@node KENDALL, KOLMOGOROV-SMIRNOV, FRIEDMAN, NPAR TESTS
@subsection Kendall's W Test
@vindex KENDALL
@cindex Kendall's W test
unity indicates complete agreement.
-@node KOLMOGOROV-SMIRNOV
+@node KOLMOGOROV-SMIRNOV, KRUSKAL-WALLIS, KENDALL, NPAR TESTS
@subsection Kolmogorov-Smirnov Test
@vindex KOLMOGOROV-SMIRNOV
@vindex K-S
The abbreviated subcommand @subcmd{K-S} may be used in place of @subcmd{KOLMOGOROV-SMIRNOV}.
-@node KRUSKAL-WALLIS
+@node KRUSKAL-WALLIS, MANN-WHITNEY, KOLMOGOROV-SMIRNOV, NPAR TESTS
@subsection Kruskal-Wallis Test
@vindex KRUSKAL-WALLIS
@vindex K-W
@subcmd{KRUSKAL-WALLIS}.
-@node MANN-WHITNEY
+@node MANN-WHITNEY, MCNEMAR, KRUSKAL-WALLIS, NPAR TESTS
@subsection Mann-Whitney U Test
@vindex MANN-WHITNEY
@vindex M-W
@subcmd{M-W}.
-@node MCNEMAR
+@node MCNEMAR, MEDIAN, MANN-WHITNEY, NPAR TESTS
@subsection McNemar Test
@vindex MCNEMAR
@cindex McNemar test
than two distinct variables an error will occur and the test will
not be run.
-@node MEDIAN
+@node MEDIAN, RUNS, MCNEMAR, NPAR TESTS
@subsection Median Test
@vindex MEDIAN
@cindex Median test
range [@var{value1},@var{value2}].
-@node RUNS
+@node RUNS, SIGN, MEDIAN, NPAR TESTS
@subsection Runs Test
@vindex RUNS
@cindex runs test
The subcommand shows the number of runs, the asymptotic significance based on the
length of the data.
-@node SIGN
+@node SIGN, WILCOXON, RUNS, NPAR TESTS
@subsection Sign Test
@vindex SIGN
@cindex sign test
of variable preceding @code{WITH} against variable following
@code{WITH} are performed.
-@node WILCOXON
+@node WILCOXON, , SIGN, NPAR TESTS
@subsection Wilcoxon Matched Pairs Signed Ranks Test
@vindex WILCOXON
@cindex wilcoxon matched pairs signed ranks test
of variable preceding @subcmd{WITH} against variable following
@subcmd{WITH} are performed.
-@node T-TEST
+@node T-TEST, ONEWAY, NPAR TESTS, Statistics
@section T-TEST
@vindex T-TEST
* Paired Samples Mode:: Testing two interdependent groups for equal mean
@end menu
-@node One Sample Mode
+@node One Sample Mode, Independent Samples Mode, T-TEST, T-TEST
@subsection One Sample Mode
The @subcmd{TESTVAL} subcommand invokes the One Sample mode.
@caption {The results of a one sample T-test of @exvar{weight} using a test value of 76.8kg}
@end float
-@node Independent Samples Mode
+@node Independent Samples Mode, Paired Samples Mode, One Sample Mode, T-TEST
@subsection Independent Samples Mode
The @subcmd{GROUPS} subcommand invokes Independent Samples mode or
@caption {The results of an independent samples T-test of @exvar{height} by @exvar{sex}}
@end float
-@node Paired Samples Mode
+@node Paired Samples Mode, , Independent Samples Mode, T-TEST
@subsection Paired Samples Mode
The @cmd{PAIRS} subcommand introduces Paired Samples mode.
@subcmd{WITH} are generated.
-@node ONEWAY
+@node ONEWAY, QUICK CLUSTER, T-TEST, Statistics
@section ONEWAY
@vindex ONEWAY
@var{value}. If @code{ALPHA(@var{value})} is not specified, then the
confidence level used is 0.05.
-@node QUICK CLUSTER
+@node QUICK CLUSTER, RANK, ONEWAY, Statistics
@section QUICK CLUSTER
@vindex QUICK CLUSTER
the new variable which is to contain the saved parameter. If no variable name is specified,
then PSPP will create one.
-@node RANK
+@node RANK, RELIABILITY, QUICK CLUSTER, Statistics
@section RANK
@vindex RANK
@include regression.texi
-@node RELIABILITY
+@node RELIABILITY, ROC, RANK, Statistics
@section RELIABILITY
@vindex RELIABILITY
@end float
-@node ROC
+@node ROC, , RELIABILITY, Statistics
@section ROC
@vindex ROC