tech tips: count occurrences within a case in ibm spss statistics
TRANSCRIPT
![Page 1: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/1.jpg)
Count Occurrences within a
case in IBM SPSS Statistics
![Page 2: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/2.jpg)
Why count occurrences of values within cases ?
You might have a satisfaction survey that contains a lot of
questions with the same scale
• You can use this procedure to calculate the total number of “Very
Satisfied” responses a respondent gave across a number of questions
You might have a survey that contains a list of magazines where
each magazine is a variable and each respondent indicates Yes or
No for each magazine
• You can use this procedure to calculate the total number of magazines
each person reads
2
![Page 3: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/3.jpg)
• We will use the sample file “satisf.sav”
• Located in C:\Program Files\IBM\SPSS\Statistics\*Version\Samples\English
*Version: Your SPSS Statistics Version,
e.g. 20, 21, 22,…
• The last 6 variables price,
numitems, org, service, quality & overall all have the same scale
• 1 = Strongly Negative
• 2=Somewhat Negative
• 3= Neutral
• 4=Somewhat Positive
• 5=Strongly Positive
Counting occurrences example
3
![Page 4: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/4.jpg)
• Let’s count the number of occurrences of “Strongly Positive” across the 5 variables
• To create this count variable: Transform -> Count Values within cases
Counting occurrences: Strongly Positive
4
![Page 5: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/5.jpg)
• In Target Variable type “Count_Strongly_Positive”
• In the Target Label type “Count of Strongly Positive Responses
• Select the six variables from the variable list on the left hand side and place them in the Numeric_Variables: list
Counting occurrences example
5
![Page 6: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/6.jpg)
• As we want to count the number of “Strongly Positive” responses for each respondent and this label corresponds to 5, we will specify 5 in the value and click Add
• Other options include specifying a range of values or specifying missing values as the values to count
• Select Continue and select OK in the main dialog
Counting occurrences: Define Values
6
![Page 7: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/7.jpg)
New variable: Count_Strongly_Positive
7
![Page 8: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/8.jpg)
The If cases dialog box allows you to count occurrences of
values for a subset of cases using conditional expressions
• If the result of a conditional expression is true, the case is
included in the selected subset
• If the result of a conditional expression is false or missing, the
case is not included in the selected subset
Count Cases – other options
8
![Page 9: Tech Tips: Count Occurrences within a case in IBM SPSS Statistics](https://reader037.vdocuments.us/reader037/viewer/2022092623/58732cd71a28ab596c8b5e41/html5/thumbnails/9.jpg)
www.presidion.com
Talk to us
[email protected] +44 (0)208 757 8820 (UK) +353 (0)1 415 0234 (IRL)
www.presidion.com/ibm-spss-technical-tips
For more Tech Tips
visit