SPSS tutorials

BASICS DATA ANALYSIS T-TEST ANOVA CHI-SQUARE TEST

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".

Previous tutorial: SPSS – Set Missing Values with Syntax

Next tutorial: SPSS Independent Samples T-Test Tutorial

Let me know what you think!

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