2
votes

I have categorical variables like "Household income", "Urban/rural", "Gender", "Age". I want to find out how many people are all of (for example): Low household income, urban, male, and in age category two.

That is, I don't want to calculate the frequencies of each of these variables separately, but rather, I want to see how many people lie at the intersections of them.

Basically: How do I use SPSS to find out how many people in my dataset are low income urban males between ages 25-33?

2

2 Answers

2
votes

Aggregating by the categorical variables can give you all the possible intersections:

dataset declare agg.
aggregate /out = agg /break = Household income Urban_rural Gender AgeGroup /Nintersect = n .
dataset activate agg.

The new dataset now has the count of cases in each intersection of all the categorical variables used as break in the aggregate command.

1
votes

You could use the crosstab command, from Analyze/Descriptive statistics menu. This wor works best when you want to intersect 2 variables. You may also use the Layer, in you have a 3rd variable

For more than 3 variables, use an if recode:

if age=2 and gender=1... Recodevar=1'. Fre recodevar.

Mind the overlapping scenarios, so you don't overwrite your recodevar