|Weighting Cases Print Page|
What does weighting cases do? There are two situations where weighting cases can be useful.
Weighting cases in SPSS works the same way for both situations. Click Data > Weight Cases.
The Weight Cases window appears.
Suppose you are helping a friend with his statistics homework, and see that he has included the following write-up in his report:
You immediately notice several things wrong with this report so far:
You get the feeling that he may have used the Chi-square test of independence, but want to verify this for yourself.
Whenever you want to re-create a frequency table or crosstab, you first need to figure out how many unique combinations of the factors there are, and how many observations there were for each factor combination. In this situation, we have two variables: ClassRank (which has three levels) and PickedAMajor (which has two levels). So there are 3*2 = 6 unique factor combinations. They are:
When we go to enter our data in SPSS, we will need to create three new variables: ClassRank, PickedAMajor, and a frequency variable (let's name it "Freq"). After entering the data, your Data View window should look like this:
Now we need to weight the cases with respect to Freq (which has been labeled Count in the example image below). Click Data > Weight Cases.
Click Weight cases by, then double-click Freq to move it to the Frequency Variable field. Click OK.
Now we can run our crosstab and verify your friend's results. Click Analyze > Descriptive Statistics > Crosstabs.
When the Crosstabs window opens, select the variable ClassRank in the left column and move it to the Row(s) field using the first arrow button, then select variable PickedAMajor in the left column and transfer it to the Column(s) field using the second arrow button. Doing this will reproduce the 3x2 table that your friend made.
To produce a Chi-square test of independence, click Statistics. This will open the Crosstabs: Statistics window. Select the Chi-square check box in the upper left-hand corner, then click Continue.
Click OK to run the crosstab. Within your output, you should see the following two tables:
The 3x2 table matches your friend's output. From the Chi-square Tests table, we see that this test result was significant at the 5% level (p < .001). From this result, we infer that there is a significant association between a student's class rank and whether or not they have picked a major.