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

SPSS – Set Variable Labels with Syntax

Managing variable and value labels without syntax is way more work than necessary. This tutorial explains how to do this more efficiently.

Changing Variable Labels in SPSS

SPSS Variable Labels Syntax Examples

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

*1. Modify (or add) a single variable label.

variable labels name 'First name of respondent'.

*2. Modify (or add) two variable labels in a single command.

variable labels birthday 'Birthday of respondent'/married 'Marital status of respondent'.

Changing Value Labels in SPSS

SPSS Value Labels Syntax Examples

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

*1. Apply single value label. Note how it appears under Variable View.

value labels married 1 'Never married'.

*2. Wrong way for adding/changing value labels. This removes the value label we added in the previous command.

value labels married 2 'Married'.

*3. Right way: use ADD VALUE LABELS instead of VALUE LABELS.

add value labels married 1'Never married' 3'Other' 4 'Don''t want to tell' 5 'Question skipped'.

*4. Alternative: apply all value labels in a single command.

value labels q1 q2 q3 0 'No' 1 'Yes' 2 "Don't know/not applicable".

Tell us what you think!

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

THIS TUTORIAL HAS 1 COMMENT: