SPSS Tutorial
Part I - Part II
- Setting up the data file ________________________________________You are going to create a simple data file in SPSS and learn to manipulate the data. This procedure is very step-by-step as not too lose those who have never been this way before.
Let's assume we've completed a survey of twelve people who have completed a weight reduction program. Each person is sequentially assigned an ID number. We've asked them their height, original weight, sex, political party, weight after the weight reduction program, and eight questions from an extroversion questionnaire. First, you'll need to open SPSS from the desktop. It should look something like Figure 1 below. You've got a blank slate. It's always best to plan your data set before you just randomly plug in variables. We're going to enter the data for each person as follows:
________________________________________
Table 1
• ID number (id)
• sex (sex)
• height, inches (height)
• weight before the program (before)
• weight after the program (after)
• political party affiliation (party)
• eight questions about extroversion (e1 through e8)
________________________________________
Since SPSS is rather specific about what you name your variables (variables are limited to certain alphanumeric characters and a length of eight characters), we're going to use the names in parenthesis as our variable names.
Figure 1:
(Note: The numbers are going to coincide with the numbers in the figures so you'll know exactly where you should be as you follow this guide.)
1) Double-click on the "var" at the top of the column. A dialog box will appear like in Figure 2.
2) Change the default text in the field that the arrow is pointing to ("VAR00001") to "id", the first of our variable names.
Figure 2:
3) Click on the "Type" button. This brings up the box in Figure 3.
4) Notice that the type is "Numeric."
5) Change the "Width" to 3 and the "Decimal Places" to 0. Click on Continue for this box. Then click on the OK for the first box. You've now defined the first variable.
Figure 3:
6) (See Figure 1) Click into the first white box under the "id" column. Type "1." This is the ID number of the first subject. Proceed down the column entering ID numbers from "1" to "12."
7) Double click on the top of the next column to the right of id to name it "sex." Under "Type" set the width to 1 and "Decimal Places" to 0. After you're done with that, click on the "Labels" button (see Figure 2); this will bring up a dialog box like the one in Figure 4.
8) Set the "Variable Label" to "Sex."
Figure 4:
9) Under "Value" type a 1, and under "Value Label" type "Male." Click the "Add" button. Now make "Value" 2 and "Value Label" "Female." Click the "Add" button again. Click Continue. Click OK. What we just did here is use numbers to represent the values for sex.
You'll need to put in twelve values under the sex column. Use the following data: 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2.
Now, using what you've learned so far, create the remaining variables with the data given below:
3. Variable Name: height
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 76, 59, 67, 65, 63, 72, 70, 68, 69, 74, 68, 63.
4. Variable Name: before
o Type: Numeric, Width = 3, Decimal Places = 0
o Labels: Variable Label = "Weight before"
o Enter these data: 185, 113, 145, 156, 106, 191, 155, 165, 175, 180, 135, 118.
5. Variable Name: after
o Type: Numeric, Width = 3, Decimal Places = 0
o Labels: Variable Label = "Weight after"
o Enter these data: 176, 90, 140, 135, 100, 184, 130, 158, 165, 172, 120, 102.
6. Variable Name: party
o Type: Numeric, Width = 1, Decimal Places = 0
o Labels: Variable Label = "Political party"
o Labels: Value Labels: "1" = "Democrat", "2" = "Republican", "3" = "Other"
o Enter these data: 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 2.
7. Variable Name: e1
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 5, 6, 5, 5, 5, 5, 3, 4, 6, 5, 7, 5.
8. Variable Name: e2
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 3, 7, 5, 6, 4, 4, 6, 4, 4, 2, 5, 3.
9. Variable Name: e3
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 5, 5, 6, 4, 5, 4, 7, 6, 3, 3, 6, 5.
10. Variable Name: e4
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 4, 6, 7, 7, 6, 5, 5, 6, 5, 5, 4, 7.
11. Variable Name: e5
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 6, 5, 6, 7, 6, 3, 6, 5, 6, 7, 6, 4.
12. Variable Name: e6
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 4, 6, 4, 6, 5, 2, 4, 5, 5, 7, 5, 6.
13. Variable Name: e7
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 3, 7, 3, 5, 4, 6, 3, 2, 3, 4, 3, 3.
14. Variable Name: e8
o Type: Numeric, Width = 2, Decimal Places = 0
o Enter these data: 3, 6, 3, 5, 5, 1, 3, 3, 2, 3, 5, 2.
Your file should look like Figure 5. You can save your file under the pulldown menu File: Save.
Figure 5:
Go to Part II.
6) These are your descriptive statistics; as you can see, SPSS will give you the mean, standard deviation, and number of each variable.
7) This is the main matrix of the Pearson's output. Variables have been arranged in a matrix such that where their columns/rows intersect there are numbers that tell about the statistical interaction between the variables. Three pieces of information are provided in each cell -- the Pearson correlation, the significance, and number of cases. When a variable interacts with itself, the correlation will obviously be 1.00. No significance is given in these cases.
8) Notice that the -.774 has asterisks by it. As is indicated at the bottom of the output this is how SPSS indicates significant interactions for you. Notice the significance is under 0.05 (.003).
________________________________________
That's it for Pearson's
SPSS Tutorial
- How to do an Independent T-test -
________________________________________
The independent t-test is used to test for a difference between two independent groups (like males and females) on the means of a continuous variable.
1) Select Statistics: Compare Means: Independent Samples T-Test (Figure 1). A menu like that in Figure 2 should be displayed.
Figure 1:
Figure 2:
2) Select continuous variables that you want to test from the list.
3) Click on the arrow that will send them to the "Test Variable(s)" box.
2) Select the categorical variable from which you are going to extract the groups for comparison and send it to the "Grouping Variable" box by pressing the appropriate arrow.
4) Click on the "Define Groups" button. You are confronted with a small dialog box asking you for two groups. In this case, I'm using 1 and 2 (males and females). Click Continue when you're done. Then click OK when you're ready to get the output.
Figure 3:
5) These are descriptive statistics concerning your variables.
6) This first part is important. You see, there is a possibility for two t-tests to occur here. You have to know which one to use. When comparing groups like this, their variances must be relatively similar for the first t-test to be used. Levene's test checks for this. If the significance for Levene's test is 0.05 or below, then the "Equal Variances Not Assumed" test (the one on the bottom) is used. Otherwise you'll use the "Equal Variances Assumed" test (the one on the top). In this case the significance is 0.287, so we'll be using the "Equal Variances" one.
7) Here's your t statistic.
8) These are the degrees of freedom (df).
9) Here's your significance (two-tailed).
SPSS Tutorial
- How to do a Paired Samples T-test -
________________________________________
1) Select Statistics: Compare Means: Paired Samples T-Test (Figure 1). A menu like that in Figure 2 should be displayed.
Figure 1:
2) Highlight the two variables upon which you want to run your analysis. When you have the two highlighted, send them over to the right column with the arrow button. You can then define more variable pairs if you wish, but if that's all you want, then just click on OK.
Figure 2:
3) This table is some relevant descriptive data concerning your variables.
Figure 3:
4) This is the T statistic.
5) This is the p-value (significance) of the T statistic.
SPSS Tutorial
- How to do a Chi Square -
________________________________________
1) Select Statistics: Summarize: Crosstabs. (Figure 1). A menu like that in Figure 2 should be displayed.
Figure 1:
Figure 2:
2) From the variable list you now choose your variables.
3) Send them to the appropriate place, either rows or columns boxes.
4) Now we still have to tell SPSS that we want a chi square done. Click on "Statistics." This should bring up the menu in Figure 3
Figure 3:
5) Check "Chi-square" and "Correlations." Click Continue. Then click OK. We're ready to get some output.
Figure 4:
6) Output. Figure 4.This is a crosstabulation table that tells you how many of which of your categories are related to the other category(s).
7) This is the value of the chi-square statistic.
8) This is your degrees of freedom.
9) Here is your significance (p-value).
No comments:
Post a Comment