Skip to content

15.7.9.1 Missing Values for Cell-Defining Variables ​

For variables that divide tables into cells, per-variable category options, as described in CTABLES Per-Variable Category Options, determine which data is analyzed. If any of the categories for such a variable would exclude a case, then that case is not included.

As an example, consider the following entirely artificial dataset, in which ‘x’ and ‘y’ are categorical variables with missing value 9, and ‘z’ is scale:

xyz
111
1210
19100
211000
2210000
29100000
911000000
9210000000
99100000000

Using ‘x’ and ‘y’ to define cells, and summarizing ‘z’, by default PSPP omits all the cases that have ‘x’ or ‘y’ (or both) missing:

CTABLES /TABLE x > y > z [SUM].
Sum
x1y1z1
2z10
2y1z1000
2z10000

If, however, we add CATEGORIES specifications to include missing values for ‘y’ or for ‘x’ and ‘y’, the output table includes them, like so:

CTABLES /TABLE x > y > z [SUM] /CATEGORIES VARIABLES=y MISSING=INCLUDE.
CTABLES /TABLE x > y > z [SUM] /CATEGORIES VARIABLES=x y MISSING=INCLUDE.
Sum
x1y1z1
2z10
9z100
2y1z1000
2z10000
9z100000
Sum
x1y1z1
2z10
9z100
2y1z1000
2z10000
9z100000
9y1z1000000
2z10000000
9z100000000

基于 GNU PSPP 2.0.1 手册与入门教程整理