Collapsing variables

I’m trying to get the number of households in a PUMA by income summed in $5,000 segments (0-5000, 5001-10000, etc) by using hhincome(c: 5000,0) for rows. And when run the table I get the error message that the number of rows exceeds the allowed max of 250. I know there are not 250 rows of 5000 increment, I even filtered for hhincome < $300,000 and no luck. What can I do to get the these sums? [Adding that when I set the increment to $50,000 – hhincome(c:50000,0) – it works just fine and I get the numbers of households summed into about 6 rows.]

This appears to be a function of the online analysis tool assuming that the variable includes all values between the minimum (-$19,998) and the N/A value of 9999999, rather than recognizing that there is a large gap between the top-codes and the N/A code. I suspect that the system makes the assessment about how many rows would result before reviewing the selection filters that would limit your output, but am not certain. I will ask my colleagues who know more about the behind the scenes aspects of the SDA tool if they have any insight on this.

In the meantime, the best solution I have for this is to use the recode option rather than collapse (see below); I appreciate that this is comparatively quite cumbersome. Unfortunately, the values assigned to the N/A and NIU codes differ by variable, so I don’t think there is a way to systematically exclude them.
hhincome(r: 0-4999; 5000-9999; 10000-14999; 15000-19999, etc.)

Thank you very much for your response, Kari. I have tried the recode alternative… but that gets pretty tedious when I want to separate incomes between 0 and $1,000,000 in $5,000 segments. Hope at some point there will be a way to make collapse work.

1 Like