Skip to content

15.7.9.3 Scale Missing Values ​

/SMISSING {VARIABLE _|_ LISTWISE}

The SMISSING subcommand, which must precede the first TABLE subcommand, controls treatment of missing values for scalar variables in producing all the output tables. SMISSING is optional.

With SMISSING=VARIABLE, which is the default, missing values are excluded on a variable-by-variable basis. With SMISSING=LISTWISE, when stacked scalar variables are nested together with a categorical variable, a missing value for any of the scalar variables causes the case to be excluded for all of them.

As an example, consider the following dataset, in which ‘x’ is a categorical variable and ‘y’ and ‘z’ are scale:

xyz
1.40.00
110.0050.00
120.0060.00
130.00.

With the default missing-value treatment, ‘x’’s mean is 20, based on the values 10, 20, and 30, and ‘y’’s mean is 50, based on 40, 50, and 60:

CTABLES /TABLE (y + z) > x.
Mean
yx120.00
zx150.00

By adding SMISSING=LISTWISE, only cases where ‘y’ and ‘z’ are both non-missing are considered, so ‘x’’s mean becomes 15, as the average of 10 and 20, and ‘y’’s mean becomes 55, the average of 50 and 60:

CTABLES /SMISSING LISTWISE /TABLE (y + z) > x.
Mean
yx115.00
zx155.00

Even with SMISSING=LISTWISE, if ‘y’ and ‘z’ are separately nested with ‘x’, instead of using a single ‘>’ operator, missing values revert to being considered on a variable-by-variable basis:

CTABLES /SMISSING LISTWISE /TABLE (y > x) + (z > x).
Mean
yx120.00
zx150.00

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