Variable Labels and Value Labels in SPSS

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 data analysis 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.

Variable Labels

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

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.

 

Getting Started with SPSS
Karen will introduce you to how SPSS is set up, some hidden features to make it easier to use, and some practical tips.

Reader Interactions

Comments

  1. di says

    hi. how can I save and transfer my data file with spss format and variable view details from one Pc to another completly?
    I tried by ‘save as’ but it doesn’t work. Next I tried to copy saved data from software to my memory and open them in new pc but they didnt open on spss. What should I do?

  2. Okoye says

    Please I need help
    I have filled in everything in my Variable View in my SPSS and when I go to my Data View, it shows me question marks
    Even when I type, it goes back to Question marks
    What do I do ?

  3. Alina Maximova says

    Hi,

    I have an issue with value labels. I have three surveys in total. After inserting first one into SPSS spreadsheet, I created a variable called “Survey” and put Value Labels 1,00-“English surevey”, 2,00- “Portuguese survey”, 3,00- “Russian survey”. However, in the Data View all I can see is the dots instead of values labels. Could you help?

    Thanks

  4. Anna says

    Hi so this is hard to explain but im gonna give it a go!
    when i imported my survey data into spss it automatically assigned values to the labels but to score the data i needed to change these. so for instance very good was labelled as 1 and so on until number 4 but i need to change it so very good is 0 and so on until number 3. when i do this and go to the data view, instead of very good staying in the same place but being labelled as 0 instead of 1 what is now number 1 is in its place. i cant understand why this is happening! any help would be great this is for my thesis so it is really important its done right! thanks

  5. Emmanuel says

    What do you enter in the data view–the acutal variables or the codes. I typed secondary into the data view, it stopped at r and cound not enter the y. If the variable is already coded in the label section in variable view, what do you enter in the data view–the codes or the actual variable

  6. Nicole G. says

    Hi I am doing a class project for my advanced research methods course and I am having issues labeling the number of variables…

    I am doing a repeated measures (within subjects) and when I add the number of levels which is 6, it does not let me add it, there are no spaces or ” -” in there, it just says there are “Variable name contains an Illegal character”

    I would really appreciate the help! Thanks in advance.

  7. D says

    I am a stats TA and had a student working on some charts. She noticed that they started looking odd and called me over when we noticed the data had all been completely changed to what seemed like random numbers that meant nothing to her. She has no clue if she hit a wrong key, but her entire data set had been changed. She closed SPSS and went to re-open it and then she was unable to access her data all together. She was using an macbook when this happened. Curious if this has happened to anyone or if you know how to get this fixed. Thanks!

  8. iqra says

    do i have to write same value labels separately for each item or there is any way to copy these labels for other items as well.

  9. sebastien says

    How can I import a codebook of value labels into SPSS? I have a word file codebook describing value labels (e.g. village names for codes 1 to 38), and a separate excel table with the data (e.g. household i, village j). I would like to import the excel table with the data while also importing the value labels without having to copy them manually (I have a database with >100 questions and >30 codes for each value). How to do that in SPSS?
    Thank you for your advice.

  10. D. RAJA says

    My patient data file has a variable named “Medical history” where i have inputs like asthma, hypertension, asthma and hypertension, diabetes, diabetes and hypertension, Arthritis, Arthritis and asthma. How to give label for such a value?

  11. Jordan says

    I have imput the values and my frequency tables show the catorgories by i still have value 1,2 etc on the horizontal axis
    Am i doing something wrong

    • Karen says

      Hi Jordan,

      There is an option for tables to show either the values or the value labels. You can change this in the Options, which is usually under the Edit menu.

      • Dami says

        That option does not affect the horizontal axis on the histogram. Like he said, the label values show in the frequency tables but they don’t show in the graph only the numerical value assigned shows

  12. Nicola says

    Do the values have to be whole numbers? I am trying to group my data such as 4.4-5 is well above average, 3.6-4.3 is somewhat above average, and so on, but SPSS will not allow it. Is there another way?
    Thanks
    Nicola

  13. mandy says

    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

  14. Rebecca says

    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

  15. Paul G says

    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

  16. Sarah says

    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?

  17. Malimbolo says

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

  18. Ayush Jain says

    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?

    • Karen says

      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.

  19. Toni says

    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

  20. Jan says

    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.

  21. Dag says

    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.

  22. George says

    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

  23. nasser says

    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

  24. Abdul says

    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

  25. Steve Okeme says

    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

  26. Lna says

    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 !

  27. tom says

    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.

  28. leon says

    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.

  29. Win says

    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 !

    • Karen says

      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.

  30. Abdul Wakeel says

    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?

  31. kathryn says

    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

  32. Gbnega says

    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

  33. Jørgen says

    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?

  34. Francis says

    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.

  35. Adrian says

    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!

  36. ashwin says

    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

    • Karen says

      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.

  37. Jenna says

    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!

  38. Naima Khurshid says

    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

    • Karen says

      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.

  39. tsering says

    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

  40. Rustam says

    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

  41. Aisling Treanor says

    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.

      • Walker says

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

  42. Shereef says

    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.

    • Karen says

      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.

  43. TLC says

    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!

    • Karen says

      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.

  44. Amber says

    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!

  45. Sam says

    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.

  46. Mahmud says

    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

    • Karen says

      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.

  47. GCMuser says

    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?

    • Karen says

      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.

  48. Abdellah Jemal says

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

    • Karen says

      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.

  49. Iyke says

    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.

    • Karen says

      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.

  50. noah says

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

    • Karen says

      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.

  51. CW says

    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??

    • Karen says

      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

    • Huseyin says

      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.

  52. gary says

    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?

    • Karen says

      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

  53. dhaf says

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

    • Karen says

      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

  54. amy says

    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!!!

    • Karen says

      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

  55. TSS says

    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!

    • Karen says

      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.


Leave a Reply

Your email address will not be published. Required fields are marked *

Please note that, due to the large number of comments submitted, any questions 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.