Variable Labels and Value Labels in SPSS

by Karen Grace-Martin

SPSS Variable Labels and Value Labels are two of the great features of its ability to create a code book right in the data set.  Using these every time is good statistical practice.

SPSS doesn’t limit variable names to 8 characters like it used to, but you still can’t use spaces, and it will make coding easier if you keep the variable names short.  You then use Variable Labels to give a nice, long description of each variable.  On questionnaires, I often use the actual question.

There are good reasons for using Variable Labels right in the data set.  I know you want to get right to your data analysis, but using Variable Labels will save so much time later.

1. If your paper code sheet ever gets lost, you still have the variable names.

2. Anyone else who uses your data–lab assistants, graduate students, statisticians–will immediately know what each variable means.

3. As entrenched as you are with your data right now, you will forget what those variable names refer to within months.  When a committee member or reviewer wants you to redo an analysis, it will save tons of time to have those variable labels right there.

4.  It’s just more efficient–you don’t have to look up what those variable names mean when you read your output.

The really nice part is SPSS makes Variable Labels easy to use:

1. Mouse over the variable name in the Data View spreadsheet to see the Variable Label.

2. In dialog boxes, lists of variables can be shown with either Variable Names or Variable Labels.  Just go to Edit–>Options.  In the General tab, choose Display Labels.

3. On the output, SPSS allows you to print out Variable Names or Variable Labels or both.  I usually like to have both.  Just go to Edit–>Options.  In the Output tab, choose ‘Names and Labels’ in the first and third boxes.

Value Labels are similar, but Value Labels are descriptions of the values a variable can take.  Labeling values right in SPSS means you don’t have to remember if 1=Strongly Agree and 5=Strongly Disagree or vice-versa.  And it makes data entry much more efficient–you can type in 1 and 0 for Male and Female much faster than you can type out those whole words, or even M and F.  But by having Value Labels, your data and output still give you the meaningful values.

Once again, SPSS makes it easy for you.

1. If you’d rather see Male and Female in the data set than 0 and 1, go to View–>Value Labels.

2. Like Variable Labels, you can get Value Labels on output, along with the actual values.  Just go to Edit–>Options.  In the ‘Output Labels’ tab, choose ‘Values and Labels’ in the second and fourth boxes.

Want to learn more? If you’re just getting started with data analysis in SPSS, or would like a thorough refresher, please join us in our online workshop Introduction to Data Analysis in SPSS.



Bookmark and Share

{ 78 comments… read them below or add one }

mandy

Hi, I have tried to put level of self-esteem as my variable, but it didn’t work out, saying ” it contains illegal characters,” but when I am in a statistic class, I typed in ” number of sex partners” and it work out perfectly. So I am wondering what is happening here?

Thanks for helping me out!
Thank you,
Mandy

Reply

John Dawes

Hi Mandy, it could be you have spaces or a “-” in the description of the levels, SPSS can be quite twitchy about such details

Reply

Rebecca

Hi,

I was wondering if anyone could help me with this query please. I am wanting to test the difference between the age of my sample and god important they consider a specific diet. Age is ranked in 7 categories (ordinal data) whereas importance is rated on a scale if 1-4. Does anyone know which statistical test I would use for this please? I thought it would be a Mann Whitney at first but this doesn’t seem right when I run the test.

Any help would be very much appreciated!

Thankyou,

Rebecca

Reply

Paul G

I have a nominal variable that I want to input, yet I notice with SPSS 22 there is no choice for nominal varible (nor ordinal ratio for that matter). You still have “comma” “dot” etc. Is there a reason why this is no longer a choice. Will this effect analyses?
Thanks so much for your help

Reply

Karen

Hi Paul, where are you trying to input it within SPSS?

Reply

Sarah

I’m trying to work out the mean change between two variables. Some have a positive change eg 30 and some have a negative change eg -40. Unfortunately the negative numbers are giving me an incorrect mean change, as the change in the second figure is in fact ’40’. How do I get the negative numbers to be shown as positive? Instead of the formula (post – pre) or (pre -post) is the a way of just calculating (change in value post
to pre) therefore resulting in net change figure which wouldn’t be negative?

Reply

Malimbolo

Please can you help define precisely the following terms on spss table. Data view, Variable view, name, lable, values and legacy dialogs.

Reply

Ayush Jain

I’ve extra value labels and I need to remove them. is there a way to remove a value label without having to re-enter the existing ones?

Reply

Karen

That’s a good question.

You can do it in the Variable View tab of the data window. Go to the Value Labels column and click the little box for that variable. A window will pop up where you can define value labels. There’s also a remove button.

I am pretty sure though in syntax, you need to redefine the value labels that you do want.

Reply

Toni

Hi Karen. My survey is divided into 3 sections: student benefits, Job Diagnostic and PST/RTI usefulness. How do I compile the scores for each section in order to run an analysis that compares two groups: teachers with RTI training and teachers without RTI training.

Thanks in advance,
Toni

Reply

Jan

I want to do a GLM (repeated measures ANOVA) with the valence of some actions of my test-subjects (valence = desirability of actions) as a within-subject factor. My subjects have to rate a number of actions/behaviours in a pre-set list of 20 actions from ‘very likely to do’ to ‘will never do this’ on a scale from 1 to 7, and some of these actions are desirable (e.g. help a blind man crossing the street) and therefore have a positive valence (in psychology) and some others are non-desirable (e.g. play loud music at night) and therefore have negative valence in psychology.
My question is how I can use valence as a within-subjects factor in GLM. Is there a way to tell SPSS some actons have positive valence and others have negative valence ? I assume assigning lables to the actions will not do it, as SPSS does not make analyses based on labels …
Please help. Thank you.

Reply

Dag

hi there, can u help me with this problem..

from the ”variable view” under ‘values’ i put 0=male and 1=female,
but when i start typing 0 in the data view, i expect the word ‘male’ will automatically appear, but it remained 0.

Reply

George

Hello!
I have something that I cannot deal with (I guess).
I have a number of variables, which values are coded with 0 and 1 (0=NO not exist, 1=YES). I want to compute the variables into a general one (it is a dimension, more precisely) and the resulting variable’s values are a number between 0 and 1 (eg: 0.12, 0.76).
How can I interpret/explain them, if the values are Yes or No?
I do not know if you understand… Thanks a lot!
George

Reply

nasser

please help me friends, when i entered the variables it is ok, but when i go to the data view the names are there but when i enter data it turns into question mark. a big please help me

Reply

Abdul

I’ve got a scale compose 12 ”true” ”false” and ”don’t know”

I would like to give a value of 1 to each correct answer

fo example if the first question correct answer is true so, i want to give ”true”= 1 and both ”false”, ”don’t know”= 0

how can i do that

Thanks in advance

Reply

Steve Okeme

how can I increase the rows in data view of spss 17. I have 400 questionnaires and the rows is only 145. I hope it is not just peculiar to version 17

Reply

Amado

I have two variables that contain negative values. Every time I entered these value I got a dot instead. What can I do?

Reply

Karen

The only thing I can think of there is either you need to increase the width of the variable or you don’t have it set to numeric.

Reply

Lna

Hello

I am struggling with value labels in SPSS. My problem is that I need to give the same value to different labels. For example: Happy =1, Sad =0, Mad =0…
Do you have any advice?

Thanks in advance !

Reply

Karen

I don’t see how that would work. You’ll need two different values for Sad and Mad labels.

Reply

tom

Good day. I Am trying to code questions that looks like this:
1. Aranalysis member of NACAS?
A: YES
B: NO
if Yes when did you become a member ..(1-2yrs ago ) (3-6Yrs) (7-9yrs)
pls how can i code this type of question in spss package for useful analysi? Thanks in anticipation of your answers.

Reply

leon

I am creating a histogram and am using 5 variables. I cannot seem to get variable #1 to appear on my histogram. What appears is 2,3,4,5 and the x-axis heading in the #6 position.
Can anyone suggest what I do to correct this.

Reply

Win

Hi
I am struggling with value labels in SPSS version 22. The problem is that the data/texts won’t change into number in data view after I labelled the values in variable view. How is that? What step did I miss? Please advise

Thanks !

Reply

Karen

It’s impossible to know for sure, but my guess is you’ve got the display set to show the value labels instead of values. It’s in the “View” menu.

Reply

Abdul Wakeel

I am working in SPSS 16. I use to analyse the 50 variables but SPSS 16 can handle 41 variables. Any suggestion about this problem please?

Reply

kathryn

can anyone help me? I am testing 3 hypotheses. i conducted a survey of 50 people and am selecting 1 question to best represent each variable (quality of work, adaptability and dependability). MY overall hypothesis is: wmployes who report to a transformational leader perform their jobs better than employees who report to a tranactional leader. I have selected my questions to represent each dependent variable and both independent variables. how do I perform a cross-tab with chi-square? also do I need 2 questions for each DV to represent both IV? please help! I am totally lost

Reply

Gbnega

I coded 2 levels of independent variables 1 and 2 in a logistic regression analysis. The OR was the inverse value of what I was expecting. Please, how does SPSS recode my original value labels to 0 and 1? Does SPSS make “1”=”0″ and “2”=”1″?
Thanks

Reply

Jørgen

Hei. I have a dataset where I want to change the values for the name.
Example: Variable 1 have 5 values. In the original dataset, 5 means strongly disagree and 1 means totaly agree. I want to change so that 5 means strongly agree and 1 means strongly disagree. I thought i got it right, but then when I looked at describe and frequensies i saw everything had been messed up. The 500 who before totaly agreed, now came under strongly disagree. Is there someway to fix this?

Reply

Karen

You need to both recode the variable AND change your value labels.

Reply

Francis

Karen, thanks for all your help. I am trying to group number of years with ailment as an independent variable and Mental Health as a dependent variable. I want to group 0 – 3 years under group 1, 4 – 7 years under group 2 and 8 – 12 years under group 3 in the Values column. I think I have grouped successfully but when I run a one way ANOVA, I see the groups, but I also see the numbers without groups.

Reply

Adrian

Hello there!

My question is about value labels. I have ordinal variables from range 1-7.

1 = not at all, 7 = very much. The other values (2 to 6) have no label on my survey.

My question: Do I still have to enter the labels for values 2 – 6? Or is there a way to simply label the minimum (which is 1) and maximum (which is 7)? The values 2-6 would simply be there, without any label. Methodically, that would be better.

Link to a scale similar to the one I used in my survey ( – only max and min values labelled): http://rmsbunkerblog.wordpress.com/2010/08/23/interpreting-importance-max-difference-maxdiff-analysis-in-market-research/

Thank you for your help!

Reply

ashwin

Hi
wanted to know, can we enter ‘don’t know’ response from a questionnaire to VALUES label in spss spreadsheet or is it necessary to enter it in MISSING labels.

Eg: if the question is “what is the religion of the head of household” & the answer for it is ‘don’t know’ can we enter it in value label itself.

Thank You

Reply

Karen

Hi Ashwin,

You can do either, depending on what you want to know from the analysis. So step back and strategize. This is a good issue to discuss with colleagues. I find it’s often helpful to talk things through with someone.

Reply

Jenna

Hi! I have three variables and used a likert scale for each. I then added response scores for each scale but I do not know what to do with the Values column in the Variable View. Should I leave that with None? And am I right with adding the scores? If it’s possible, I would appreciate to hear an answer from you soon. Thanks!

Reply

Karen

Hi Jenna,

The values column is for labelling the values. For example, you may want to say 1=low, 5=high, just to help you remember.

Reply

Naima Khurshid

hi,

I am trying to assign values to semantic differential question in SPSS

important 1 2 3 4 5 6 7 unimportant

where 1 = “I absolutely agree with the meaning in left”” and 7 = “I absolutely agreewith the meaning in right”

How to assign value and labels to this situation in SPSS? I am so confused, need help urgently

Reply

Karen

Hi Naima,

You’ll have to give me more detail about what is confusing you.

I’m not sure why you aren’t just using the labels you mention. You’ll want to make sure that a 1 always has the same meaning for every item (and I suspect this is the tricky part). For example, make sure 1 is always the more positive end of the scale. Not sure if all your items have a positive/negative valence or some other attribute that you can always say the left end has an equivalent meaning.

Reply

tsering

Hi
I wanted to know how to enter variables in case of sub questions and also how to make sure that they “connect” when shown in frequency or graph?
Thank you

Reply

Rustam

Hi –
Is that possible to get variable labels and value labels? For example, varible ‘C’ has label ‘Country’ and value labels:
0=’Other’;
1=’USA’;
2=’Russia’
Now we need to create 3 binary variables ‘C0′,’C1′,’C2’ with labels ‘Country is Other’, ‘Country is USA’, ‘Country is Russia’. How can I do it in syntax?

Many thanks

Reply

Karen

Hi Rustam,

Not sure whether you’re asking how to create the 3 binary variables or how to label them.

You do the first with a RECODE command and the second with the VARIABLE LABELS command.

https://www.theanalysisfactor.com/recoding-variables-spss/
https://www.theanalysisfactor.com/3-pieces-of-spss-syntax-to-keep-handy/

Reply

Aisling Treanor

Hi, I have about 15 variables which all need labelling but spss will only allow me to label 9, it would allow me to create a 10th variable. Is there any way around this or will spss only allow you to label a certain number of variables?
Any help would be greatly appreciated.

Reply

Karen

Hi Aisling,

I can’t imagine why it would only let you label 9. No, you should be able to do more.

Reply

Walker

You probably figured this out already, but I ran into the same problem and was confused until I noticed that the variable I was labeling had a length of 1. I changed it to 2 and then could assign labels higher than 9.

(I’m assuming what you meant was that SPSS will only allow you to assign labels to 9 values within a single variable.)

Reply

Shereef

I would like to know the following with regard to regression using SPSS

I want to regress consumption ( dependent) with price, family size, house size, education of family head, job of family head, awareness etc. (variables) . How the ‘measure’ column is selected while entering data.( ie. scale/ordinal/nominal in variable view). Can I do linear regression for all these data simultaneously.

Reply

Karen

Hi Shereef,

Yes, you can run a simultaneous model. How you define those in the measure view doesn’t affect the analysis. It’s more about how you code variables. I would recommend using the GLM procedure, rather than the regression, as it will do the coding of categorical variables for you.

Reply

TLC

What about applying a value label to a range of values, such as:

0-4 = “<5 yrs"
5-9 = "5 to 10 yrs"
10-high = "10+ yrs"

Is that possible in SPSS 19? I'd really like to avoid recoding the variable.

Thanks in advance!

Reply

Karen

I have never tried. Did you try it?

If the range doesn’t work, you could always specify each value. For example:
0 ‘<5 years'
1 '<5 years'

etc.

Reply

Amber

Hi – I would like to know if there is a way to get SPSS to display the value labels for predictors in a multinomial logistic regression. I’ve figured out how to get the output to display the value label for the dependent variable, but not the factors. For instance, it might say “FACTORA = 1” in the output table, but not “FACTORA = Yes” (where “yes” is the label for the value of “1” for the “FACTORA” variable). It would make interpretation of the output so much easier if you could tell, at a glance, which level of the factor yielded the particular log-odds for the outcome in question. Thanks so much!

Reply

Karen

Not that I know of. That would be nice, though.

Reply

Sam

Hi

Is it possible to add in value labels for multiple variables in one go using SPSS syntax, and if so how? I have around 50 variables which all need the same variable labels added…

Many thanks.

Reply

Karen

Hi Sam,

Yes. Just list them together.

Value labels Variable1 Variable2 Variable3
1 Yes
0 No.

Assigns Yes and No to 1 and 0 for all three variables.

Reply

Sam

Thanks Karen

Reply

Tareq

Dear all,

How can I print out a list of all variables and values codes in SPSS?

Many thanks

Reply

Karen

Tareq, Instructions are here: How to Get a Code Book from SPSS

Reply

Mahmud

I am trying to edit my tables to conform with APA. I know in SPSS version 20, you can easily produce APA tables by using Compact Academic Times Roman. I now have version 21 and it does not have the Compact Academic Times Roman and I happen to have the graduate version, too. So what can I do

Reply

Karen

Hi Mahmud,

I’m not really an APA expert. I knew it well a few decades ago, but it has changed since then. So I’m not sure.

If anyone else knows, please feel free to comment.

Reply

GCMuser

Hi there,

I am trying to combine three(3) value sets together. How do I do that without having to completely type all of the values from 2 & 3 into value 1?

Reply

Karen

I’m not sure if you mean that you have three variable with the same value labels that you’re trying to assign or if you’re trying to recode three variables into one. Either can be done.

Reply

Abdellah Jemal

Hi Kare
How Create a new variable name GENDER_1 which takes the value of 1 for male (m) and 0 otherwise (f) by SPSS 16 from the existing variable “Gender ” .

Reply

Karen

Hi Abdellah, You will proabaly use the Recode into Different Variables function (in the Transform menu). But it depends on how the original Gender variable is set up.

Reply

Iyke

Hi Karen

We’ve just the SPSS we use to SPSS 19 but when i create/enter my values in the variable view ie the drop down menu, they don’t seem to come up in the data view. Please help.

Reply

Karen

Iyke, go to the View menu in SPSS and click “Value Labels.” That will display the labels in the data view instead of the values.

Reply

noah

Is it possible to enter more than one value label in a cell for example if a respondent had more than one preferences.

Reply

Karen

No, you’ll need a separate variable for multiple responses. These either need to be in separate columns or you need multiple rows of data per person, depending on the analysis you’re doing. This is an example of when figuring out what is a unit of analysis and what is a variable can get tricky.

Reply

CW

Hi,

i have a question about formating letters of variable labels. I didn’t found any explanation where to format characters as subscripts. Is there any option for that. Otherwise i would have to edit each Output manually and that is quite time consuming. Any ideas??

Reply

Karen

Hmm, not sure I’ve ever seen that. I don’t know if that’s possible, but you can create custom templates for tables and graphs, but I’m not sure subscripts are possible.

Anyone else ever see this?

Karen

Reply

austine

I have a table consisting 12 male frequency and 8 female frquency. how can I code it in spss??

Reply

Karen

Hi Ausine,

I’m not sure exactly what it is you’re trying to do. Can you explain in more detail?

Karen

Reply

Huseyin

You can do it by Weight Cases. Create two variables to do this: gender and frequency. Assuming male = 1, female = 2, enter 1 at the first row of gender and enter 12 for its frequency. Similarly enter 2 for the second row of gender and enter 8 for its frequency. Then click Data –> Weight Cases and choose Weight Cases by option. After then click frequency from the left and pass it to the Frequency Variable and click OK. From now on, SPSS will weight cases using your frequencies.

Reply

gary

When I run the analysis in SPSS, all of my questions get analyzed as opposed to just the one variable name. For instance if I have a variable perf and another variable trst and I want to find the mean, SPSS tells me the mean of all questions from the survey under perf and trst as opposed to just perf and trst. Can anyone help?

Reply

Karen

Hi Gary,

Maybe. That seems very strange. Usually you have to specify which variables you want. Can you tell me more about which procedure you’re using and what you’re inputting?

Karen

Reply

dhaf

hi there! please help me with this, i just wanna know is there a way to view labels without counts or zero frequency for the Output Tables? hope you understand what i meant :). sample: for variable1, entry must be “1 to 5”. if no one answer “1”, how can i generate a table of frequency showing that value 1 has no counts or zero.

1 = 0
2 = 3
3 = 4
4 = 1
5 = 2

Thanks in advance. 🙂

Reply

Karen

I do understand what you’re asking and I don’t know off the top of my head.

Two things I would try 1) see if having value labels helps keep all values on the table. Otherwise SPSS doesn’t know those values exist. 2) if that fails, define 1 as a missing value.

That said, if anyone else knows the answer right away, please feel free to chime in….

Karen

Reply

amy

Hi –

Any help would be much appreciated! How do I display all value labels? I would like to print with all this information visible and cannot find a way to do it! I have a very long telephone questionaire in SSPS and do not want to have to retype the whole thing! Please help!!!

Reply

Karen

Hi Amy,

Go to File –> Display Data File Information –> Working File.

It will give you two tables, one of which lists all value labels. I agree it’s useful to be able to print that out.

Karen

Reply

syakirah

hye…
in version 19, what is the function of role in the variable view…how we want to differentiate them?

Reply

TSS

Hi,
I was wondering if you can help me with viewing variable labels while in the Data View. you say that one can:
1. Mouse over the variable name in the Data View spreadsheet to see the Variable Label.

Yet I do not seem to have this feature on my version of SPSS (17.0). Is this a setting or perhaps a feature on a different version?
Thanks!

Reply

Karen

That feature should definitely be in version 17. I have never seen it not turned on, but you can always check the Options in the Edit menu. I would make sure you have variable labels set up. Nothing will show up if a variable has no label, of course.

Reply

Leave a Comment

Please note that, due to the large number of comments submitted, any comments on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.

{ 3 trackbacks }

Previous post:

Next post: