SPSS tutorials website header logo SPSS TUTORIALS BASICS ANOVA REGRESSION FACTOR CORRELATION

SPSS – Set Missing Values with Syntax

When working with SPSS, specifying missing values correctly is often an essential step in analyzing data. This tutorial demonstrates how to set missing values the right way.

Setting Missing Values in SPSS

SPSS Missing Values Syntax Examples

(The test data used by the syntax below are found here.)

*1. Specifying 4 and 5 as missing values for "married".

missing values married(4,5).

*2. Specify a range (1,000,000 and upwards) as missing values for "income".

missing values income (1000000 thru hi).

*3. Specify 2 as missing value for variables q1 through q3.

missing values q1 to q3 (2).

Changing Columns in SPSS

SPSS Variable Width Syntax Example

(The test data used by the syntax below are found here.)

*Set columns = 50 for q1 through q3..

variable width q1 to q3 (50).

Changing Variable Alignment in SPSS

SPSS Variable Align Syntax Example

(The test data used by the syntax below are found here.)

*Set Variable Alignment = center for q1 through q3.

variable alignment q1 to q3 (center).

Changing Measurement Levels in SPSS

SPSS Variable Level Syntax Example

(The test data used by the syntax below are found here.)

*Set measurement level to scale for "birthday", ordinal for "married" and nominal for q1 through q3.

variable level birthday(scale) married(ordinal) q1 to q3 (nominal).

Changing Roles in SPSS

SPSS Variable Role Syntax Example

(The test data used by the syntax below are found here.)

*Set role to input for "married", target for "income" and both for "q1" through "q3".

variable role
/input married
/target income
/both q1 to q3.

Tell us what you think!

*Required field. Your comment will show up after approval from a moderator.

THIS TUTORIAL HAS 13 COMMENTS: