Methods of Communication Research and Statistics Online Workbook
|
SPSS exercise 1.7
For this exercise, use the MediaUse.sav database. Some variables have a lot of different values. To put them in some sort of order, we can re-categorise the values in groups.
a. In exercise 1.5, you created the new variable 'v6tot' ('total number of minutes spent watching television on a weekend day'). If you generate a frequency table of this, you get a big table. Use this variable to make a new variable, making a distinction between people who 'watch little' (0 to 120 minutes), 'watch average' (121 to 180 minutes), and 'watch a lot' (181 minutes or longer). Name this new variable 'v6totre'. Compare your syntax to the correct answer. Don't forget to run the syntax first.
b. Use Define Variable Properties to give this new variable the variable label 'watching TV in categories' and value labels (see exercise a.). Compare your syntax to the correct answer. Don't forget to run the syntax first.
c. Generate a frequency table of the new variable 'v6other'. Compare your syntax to the correct answer.
d. What percentage of the respondents fall into the 'watch a lot' group?
Hints
1 How do I recode?
Some variables have a lot of values. For example, if you ask a random person how old they are, you would hypothetically get a value between 0 and 117. But if you ask 1,000 people how old they are, you would get a whole range of different values, of which it might prove tricky to get any kind of overview. In such cases, it would be useful to group the values, and to make a new category of that variable. First, list a number of categories on paper, such as:
Then in SPSS select the procedure Transform -> Recode -> Into different variables. A dialogue screen now appears (see illustration below) in which you first have to select the variable: select the variable in the left-hand list and send it to the right-hand list using the arrow button. You then have to give the new variable a name with the recodes (categories), in the line under Output Variable. You can also create a label here. Don't forget to click Change in order to link the old variable to the new one.
Finally, you need to indicate which old values you want to convert into which new ones. Click the Old and New Values button and a new dialogue screen will appear (see below). This is where you enter your categories. On the left, indicate the categories of the old values (e.g. under Range, the old values from 0 to 20), at the top right you can indicate the new value (e.g. 1, so the old values of 0 to 20 now form category 1). Don't forget to click Add in order to add the recodes to the list to be implemented shortly. When you enter values under Range, fill in the lowest value in the top section, and the highest value in the section beneath that (under 'through'). Here, 'through' means 'up to and including'.
When you have filled in every category in this screen, click Continue and OK in the first screen. SPSS then runs the recode and adds the new variable to the data matrix.
2 What are value labels?
Values: Every variable can have a certain value. The variable gender can, for example, have the value 'male' or 'female', and be assigned the code 'm' or 'f' or two different numbers, such as '1' and '2'.
Value labels: Using the Value Labels command, you can attach an explanatory note, or 'label', to a variable's values or codes. In the example of gender, it could be indicated that 'm' means 'male' and 'f' means female. The data matrix automatically shows the value labels (instead of the values or codes entered) whenever you click the button with the label (see below).
3 How do you create values and value labels?
There are two ways of creating values and value labels. We will show you both. Since the 'first method' also enables you to generate a syntax for making the labels, this is the one we prefer.
The first method runs via Data -> Define Variable Properties. This way also enables you to list various values as 'missing' and to store their syntax. It is also quicker and less complicated.
When you open the Define Variable Properties menu, select the variable(s) for which you would like to add value labels. After clicking OK, a screen appears in which we can edit the variables:
Here you can enter the variable name and label, and the value labels. When you add a label, SPSS automatically checks the box next to it to indicate that you have changed it. Now, click Paste to generate a syntax of this process, run it, and store it. For the sake of completeness, we will also show you another way of attaching value labels. Select the Variable View in the main SPSS screen. You can now enter values and value labels, using the button in the Values column. When you click this button, the following dialogue screen will appear.
Suppose you have coded the genres in the data matrix as follows:
Code/Value |
Value label |
1 |
Action/Thriller |
2 |
Comedy |
3 |
Science Fiction |
4 |
Romance |
5 |
Other |
You can enter a code in the top line of the dialogue screen. Below that, you can provide a description of the code (value), e.g. 'Action/thriller' for code '1'. Once you have entered a code and a description, click on the Add button. The code and description will then appear in the bottom field. You can now fill in another pair, such as code '2' with the description 'Comedy', and add them. When you have finished listing the labels, click OK in order to return to the previous dialogue screen.
4 What is a syntax?
A syntax contains the SPSS commands. You do not have to work with syntaxes yet on this course. The only thing you need to know is how to paste a syntax into an answer field, so that we can check whether you have carried out a valid analysis and taken the right steps to arrive at your analysis. When you carry out an analysis in SPSS and confirmed it by clicking on OK or Continue, the results of your analysis will appear in the output screen. In some versions of SPSS (depending on the settings), the syntax appears at the top of the output screen as standard.
Copy the text that appears at the top to the answer field of the exercise for which the syntax is required. In other words, only copy the text - the syntax - to the answer field, and not the tables!
There is another way of generating the syntax. The main advantage of this method is that you can store the syntaxes separately and make notes in them for a subsequent occasion. Normally, you confirm every analysis that you carry out in SPSS by clicking OK (or Continue). Next to or under the OK button, there is also a Paste button. If you click Paste instead of OK, then a separate syntax window will appear automatically containing the syntax of the command you have given.
Note: You have not yet given the command to SPSS to conduct the analysis! You can now copy the syntax and paste it in the answer field in the interactive workbook (select the syntax and press Ctrl+C, and paste by using Ctrl+V).For SPSS to conduct the analysis, you must first click Run.
5 How do I generate a frequency table?
You generate a frequency table by selecting in the menu Analyse for the option Descriptive Statistics -> Frequencies. This then opens the following dialogue screen. You can move the variables for which you would like a frequency distribution from the left to the right column by selecting the variable (click on it with the mouse) and clicking the arrow between the columns. You can also move the variables from the right to the left column. Again, select the variable and click on the arrow. The arrow now points towards the left-hand column. If you want to move every variable from the left to the right column in one go, select all the variables (hold down the Shift button and move the cursor downwards). Conversely, you can move all the variables from the right to the left column by pressing Re-set.
6 How do I read a frequency table?
In addition to the absolute frequency and the percentage, SPSS gives the valid percentage and the cumulative percentage. In the first column (valid), you can spot the values attached to a certain variable. The second column (frequency) displays the absolute frequencies - the number of times that a particular value occurs. In some cases, the percentages in the fourth column (valid percentage) are identical to the those in the third column (percentage). However, if there are any missing values in your data, there will be a difference between the percentage and the valid percentage.
|