SPSS question: count households by variable

I apologize that this is an SPSS question more than a data question.

I’m working the the ACS microdata (2012, 3-yr). How do I count households with kids under a certain age?

A frequency analysis gives me the number of kids after I select my cases and weight them by household. I need the equivalent of a count distinct command in MySQL. I want a count of households, regardless of how many kids there are in each.

Thanks for any help.

Jack

I am not an expert in SPSS but I will try to provide a workable answer. I think you will want to create a few new indicator variables based on person level data. Specifically, you will want to create a variable that takes the value of 1 for a child under the age you are interested in. Then use the AGGREGATE command to collapse the data to household level (here is a good tutorial on collapsing data), creating a summation of children under ‘X’ age in the household. You could then create a new household level variable that takes a value of 1 if a household has any children under ‘X’ age. Then get the frequency of that new variable.

As I said, this may not be the most efficient method, but it should work. You may still want to search through some SPSS user forums to see if there is a better approach.

I hope this helps.