22LLP 207 Research Methods
Practical 1
SPSS 1 Basics - coding exercise
S Panayi
April 2025
Starting SPSS
I’ve prepared this lesson using SPSS version 23, the one available to use at Loughborough. Let us start by learning SPSS by using SPSS. Find SPSS icon on your desktop or start menu . Now that you have found the SPSS icon on your desktop, double-click it. If the “IBM SPSS Statistics” dialog window appears (see figure 1), tell SPSS you want to create “New Dataset” and click OK. You can supress the appearance of this window by clicking the box “Don’t show this dialogue in the future.”
Figure 1: The “IBM SPSS Statistics” dialog window
The data editor window
You should now see the SPSS Data Editor window (see figure 2). This is where you enter the data you wish to analyse. Each column represents a variable and each row represents an individual-respondent or observation (also called a case).
Figure 2: The data editor window
The Variable view: Coding the data
Click the little tab (lower left of window) that says “variable view,” see figure 2. In the variable view window the rows are now the variables (see figure 3).
Figure 3: The variable view window
Now we are ready to start coding our data and decide on their format. In the first column of the variable view window coding sheet (Column: Name) enter your variables’ name. In the “Type” Column you can select your variables’ type (remember lecture 2). As you can see in figure 4 there are eight types of variables that can be coded in SPSS: 1) Numeric, 2) Comma, 3) Scientific notation, 4) Date, 5) Dollar, 6) Custom currency, 7) String, 8) Restricted Numeric. Most of the times you will be using numeric variables (i.e., numbers-e.g., 7, 0, 120).
Figure 4: Variable type dialogue window
Let’s start naming the variable. The name of each variable should contain no spaces, dots, or commas. It is always advisable to encode each respondent with a particular subject’s identification number. How about naming “respondent” your first variable then? OK so it’s not creative, but at least we all know what it means, and when it comes to coding, interpretability is important! Type “respondent” in the first empty box under the “Name” column, and select numeric from the options available under the column labelled “Type.” You should now have a row of entries in the sheet which identifies the default coding information for the participant identification number. We don’t need to change any of the other options since the participant code is a simple numeric value representing little more than order of entry of the participant data.
Figure 5: Coding respondents
The subject’s identifier was straight forward as the data does not represent categorical information. Now let’s make an entry for one more variable. For example, what if your next variable was respondent’s gender? When numbers are used to represent categories of events such as gender it is useful to be able to associate meaningful labels with those categories. SPSS allows us to do that in the variable view mode specifying values of categorical data. Let’s use a 0 to represent males and a 1 to represent females. This may seem tedious but it helps us during data entry. The more variables you have to enter the more you will appreciate a coding sheet. For example, to code participants’ gender, start as you did for the participant ID number by clicking on the box at the head of the column you wish to label. This will bring up the variable view window. Type variable name “gender” in the first column, and then move your cursor along to the column labelled values and click on that box associated with the gender variable (shown in figure 6 below).
This brings up the dialog box shown in figure 6. Now it is simply a matter of entering a value, and an associated label. If we decided to code males with a 0 and females with a 1, we enter that information into the value labels box, as shown below pressing the “Add” button after each value, once the value label pair has been entered then press OK.
Figure 6: Defining category labels
Now return to the Data View using the tab at the foot (left) of the page, and then enter some subjects’ data. For example imagine that you had a total of ten respondents, the first three were males and the rest females. The data view window would look like figure 7.
Figure 7: The final data editor window
Saving the data
After coding all your variables and entering your data, to the SPSS, you are ready to save the file on the hard drive of the computer on which you are working or the flash drive you brought to class with you.
Click FILE on the command bar at the top of the window. From the drop-down menu that appears, select SAVE AS. The save as dialog window appears (figure 8).
Figure 8: The save as dialog window
Navigate your way to the location where you wish to save the file. In the FILE NAME box, enter “coding exercise.” Save as type should read SPSS Statistics (*.sav) – if it does not, change it to that from the drop-down menu there. Click Save and the data file is saved to your medium. Having completed the first part of this lesson, you can now close SPSS – just click the X in the upper right hand corner.
Exercise on data coding and data entry
In the following pages some illustrative closed questions from a highly structure questionnaire are provided.
a. Have a go and code them in SPSS
b. After coding all the questions enter your own responses to the SPSS data sheet.
1) Which types of pre-purchase information sources do you normally use during new car purchase (in this question you can choose more than one options)?
Friends/relatives/acquaintances
Brochures/pamphlets
Showrooms/car salesmen ˜
Car magazines/newspapers
Car TV shows ˜
Internet
Use of personal knowledge on cars ˜
Other source, please specify……………………
2) Please allocate 100 points across the following eight composite car characteristics, so as to reflect the relative importance you place on each of them during new car purchase (allocate more points to more important composite characteristics).
a. Cost related characteristics ……¼…
b. Technical characteristics …………
c. Performance characteristics …………
d. Image related characteristics …………
e. Quality related characteristics …………
f. Interior characteristics …………
g. Driving related characteristics …………
h. Equipment features …………
100
3) Rank the 12 manufacturing countries from the most preferred (1) to the least preferred (12), based on your preferences for the cars they produce, if you were about to buy a new car in the near future.
UK ¾
USA ¾
France ¾
Germany ¾
Japan ¾
Spain ¾
Italy ¾
Korea ¾
Rumania ¾
Russia ¾
Sweden ¾
Czech ¾
(PTO)
4) The following set of questions measures respondents’ level of attachment to his/her currently owned car. Please rate your level of agreement with each of the following statements, on a 5-point scale ranging from disagree (1) to agree (5).
i) Imagine for a moment someone making fun of your car. How much would you agree with the statement, “If someone ridiculed my car, I would feel irritated”
|
1
|
2
|
3
|
4
|
5
|
ii) How much do you agree with the statement, “My car reminds me of who I am”
|
1
|
2
|
3
|
4
|
5
|
iii) Picture yourself encountering someone who would like to get to know you. How much do you think you would agree with the statement, “If I were describing myself, my car would like be something I mentioned”
|
1
|
2
|
3
|
4
|
5
|
iv) Suppose someone managed to destroy your car. Think about how you would feel. How much do you agree with the statement “If someone destroys my car, I would feel a little bit personally attacked”
|
1
|
2
|
3
|
4
|
5
|
v) Imagine for a moment that you lost your car. Think of the feelings after such an event. How much do you agree with the statement, “If I lost my car, I would feel like I’ve lost a little bit of myself”
|
1
|
2
|
3
|
4
|
5
|
vi) How much do you agree with the statement, “I don’t really have too many feelings about my car”
|
1
|
2
|
3
|
4
|
5
|
vii) Imagine for a moment someone admiring your car. How much mould you agree with the statement, “If someone praised my car, I would feel somewhat praised myself”
|
1
|
2
|
3
|
4
|
5
|
viii) Think for a moment about whether or not people who may know you might think of your car when they think of you. How much do you agree with the statement, “Probably people who know me might sometimes think of my car when they think of me”
|
1
|
2
|
3
|
4
|
5
|
ix) Imagine for a moment that you have lost your car. Think about going through your daily activities knowing that it is gone. How much do you agree with the statement, “If I didn’t have my car, I would feel a little bit less like myself”
|
1
|
2
|
3
|
4
|
5
|
5) The following set of questions measures respondents’ level of involvement with cars. Please rate your level of agreement with each of the following statements, on a 5-point scale ranging from disagree (1) to agree (5).
i) It is worth the extra cost to drive an attractive and attention-getting car
|
1
|
2
|
3
|
4
|
5
|
ii) I prefer to drive a car with a strong personality of its own
|
1
|
2
|
3
|
4
|
5
|
iii) I have sometimes imagined being a racing driver
|
1
|
2
|
3
|
4
|
5
|
vi) Cars offer me relaxation and fun when life’s pressure build up
|
1
|
2
|
3
|
4
|
5
|
v) Sometimes I get too wrapped up in my car
|
1
|
2
|
3
|
4
|
5
|
vi) Cars are nothing more than appliances
|
1
|
2
|
3
|
4
|
5
|
vii) I generally feel sentimental attachment to the cars I own
|
1
|
2
|
3
|
4
|
5
|
viii) Driving my car is one way I often use to relieve daily pressure
|
1
|
2
|
3
|
4
|
5
|
ix) I do not pay much attention to car advertisements in magazines or on TV
|
1
|
2
|
3
|
4
|
5
|
x) I get bored when other people talk to me about their cars
|
1
|
2
|
3
|
4
|
5
|
xi) I have little or no interest in car races
|
1
|
2
|
3
|
4
|
5
|
xii) Driving along an open stretch of road seems to “recharge” me in body, mind and spirit
|
1
|
2
|
3
|
4
|
5
|
xiii) It is natural that young people become interested in cars
|
1
|
2
|
3
|
4
|
5
|
xiv) When I’m with a friend, we often end up talking about cars
|
1
|
2
|
3
|
4
|
5
|
xv) I don’t like to think of my car as being ordinary
|
1
|
2
|
3
|
4
|
5
|
xvi) Driving my car is one of the most satisfying and enjoyable things to do
|
1
|
2
|
3
|
4
|
5
|
xvii) I enjoy discussing cars with my friends
|
1
|
2
|
3
|
4
|
5
|