Tag Archives: Variable labels

Variable and Value Labels

Let’s face it, a well prepped SPSS dataset has informative and accurate labels for each variable and their respective values. However, it’s all too easy to plow ahead and think you’ll remember what each obscure acronym you create in the moment and the values assigned to them will mean some years down the road. Maybe, maybe not, but what I know is that if you spend a little extra time prepping your dataset, you can save your colleagues or yourself a great deal of time that would be spent trying to understand what your past-self was thinking.

Luckily, the business of renaming variable and value labels is fairly straightforward, yet there are still some tips and tricks that you can use in special cases that I will mention below.

But first, I’ll quickly go over the basics.

Syntax for Labeling or Relabeling Variable Labels

Labeling one variable

VARIABLE LABELS varname ‘Type your variable label here’.

e.g.,
VARIABLE LABELS FPK ‘MEAN SCALE SCORE: Follower’s political knowledge’.

Labeling more than one variable

VARIABLE LABELS varname ‘Type your variable label here’
/varname2 ‘Type your variable label 2 here’
/varname3 ‘Type your variable label 3 here’.

e.g.,
VARIABLE LABELS FPK ‘MEAN SCALE SCORE: Follower’s political knowledge’
/FPS ‘MEAN SCALE SCORE: Follower’s political skill’
/FPW ‘MEAN SCALE SCORE: Follower’s political will’.

Syntax for Labeling or Relabeling Value Labels

Labeling the values for one variable

VALUE LABELS varname #’Type your value number here’.

e.g.,
VALUE LABELS FPK 1’Strongly disagree’ 2’Somewhat disagree’ 3’Neither agree nor disagree’ 4’Somewhat agree’ 5’Strongly agree’

Labeling the values for more than on consecutive variable

VALUE LABELS varname1 to varname9 #’Type your value number here’.

e.g.,
VALUE LABELS FPK1 to FPK9 1’Strongly disagree’ 2’Somewhat disagree’ 3’Neither agree nor disagree’ 4’Somewhat agree’ 5’Strongly agree’

Labeling the values for more than one non-consecutive variable

VALUE LABELS varname1 #’Type your value number here’
/varname6 #’Type your value number here’.

e.g.,
VALUE LABELS FPK1 1’Strongly disagree’ 2’Somewhat disagree’ 3’Neither agree nor disagree’ 4’Somewhat agree’ 5’Strongly agree’
/ABSENCE 0’No’ 1’Yes’.

Tips and Tricks for Renaming Variable Labels

The most important thing to remember when labeling or relabeling variable labels is that you have something for each variable. The idea is that you should understand what each variable is without having to open any other file or going back to your original survey or source material.

Often times, you will have special variables that you created solely to conduct analyses on, such as mean scale scores, clinical cut-off scores, and so forth. I find it helpful to make these important variables pop out by beginning their label with an all-caps description (e.g., MEAN SCALE SCORE: Follower’s political knowledge; CLINICAL CUTOFF SCORE: HADS depression).

Tips and Tricks for Renaming Value Labels

The same general informative tip applies to value labels. It’s easy to leave these blank, but you can make your life easier by labeling these where appropriate.

Occasionally your source material will have or produce wonky values and value labels for you that you want to change (recoding variables is another related but separate topic that I will write about soon). After recoding the variable values, there is a very easy method of removing the old value labels and replacing them with ones that match your updated values.

Here is the syntax:
VALUE LABELS varname.
VALUE LABELS varname #’Type your value label here’.

e.g.,
VALUE LABELS FPK.
VALUE LABELS FPK 1’Strongly disagree’ 2’Somewhat disagree’ 3’Neither agree nor disagree’ 4’Somewhat agree’ 5’Strongly agree’

Here, the first VALUE LABELS command will remove the existing value labels and the second VALUE LABELS command will produce new value labels for your variable.