Methods of Communication Research and Statistics Online Workbook
|
SPSS exercise 1.13
Open the McoData3.sav database. In addition to 'age' (V3), this database includes the variable 'year of birth' (V61). Please note: This survey was conducted in 2007. Bear this in mind when answering the following questions.
a. Use the 'year of birth' variable (V61) to calculate a new variable for age in years. Name the new variable 'v61re'. Compare your syntax to the correct answer.
b. Then create a variable for the difference between V3 (age) and the new variable. Compare your syntax to the correct answer.
c. Generate a frequency distribution for the difference variable (see b). Describe what findings you would expect and draw a conclusion on the basis of the frequency table. How could you explain the actual findings?
Hints
1 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.
2 Creating a new variable based on multiple existing variables
When you want to convert two or more variables into one variable, use the Compute function in SPSS. Compute is SPSS's 'calculator'; it can be used to add, subtract and multiply variables, etc.
Compute can only be used when the level of measurement of the variable is at least ordinal.
In the Transform menu, click Compute. This will open a screen: 'Compute variable'. In the 'Target variable' field, enter the name of the new variable that you want to create. You now need to define the formula for calculating the values of the new variable. The 'numeric expression' field now contains the formula. You can do this by typing or using the mouse to select the variables and symbols. When you have finished, click OK.
|