Using SPSS and PASW/Understanding the Variable View labels
Creating Labels for Variables and Values
[edit | edit source]Variable Labels
[edit | edit source]SPSS variable names are restricted as to length and allowable characters. The length available is dependent upon the value of the UNICODE parameter. Most users will probably not wish to change this themselves and since the default allows 64 character variable names for English and other single byte languages and 32 characters for two byte languages, this is generally enough. Bit it is not always convenient to give variables human friendly names, however long. For this reason SPSS allows the users to create labels for variables. A label is created by filling in the appropriate label row in variable view. The label rather than the variable name will be used by default for output and can be set as the display for variable view by selecting view → value labels from the menus.
Value Labels
[edit | edit source]Let us suppose that we have a variable representing eye colour. We have called the variable iColour, given it the lable Eye Colour and we have coded observations as follows
iColour | Code |
---|---|
Brown | 1 |
Blue | 2 |
Green | 3 |
Other | 4 |
Coding categorical data as numbers is elegant but the user may find it easier for data entry and reading data to have the lexical values available. This can be done using the values dialog. In the appropriate row, put the cursor in the values cell and click on the expand dialog button (three dots). In this dialog you enter pairs of values and labels for values. After adding a value and its label, remember to click add before you add another or close the dialog. When you have done, SPSS saves a list of {value,label} pairs that you have specified and can apply them for output and display. As a bonus, after creating variable names you automatically create a drop down data entry menu for the variable if you are in vale labels view.