HHINCOME recodes (eg camb_hhinc1, acs 2010-2) not working. query collapses to a single row.

A series of 3 recodes of HHIMCOME appeared to work based on the results returned for the recode (eg, camb_hhinc1, ACS 2010-2) but when used in a query with NUMPREC the results collapse to a single row, sometimes the first category specified, sometimes not. I need to use specific ranges that vary in size, so collapsing the variable in the query specifications is not an option for me. I am filtering using statefip(25),puma(03200,0506),gqtype(0),pernum(1). Suggestions?

Another option would be to produce the ranges on the query line using the ‘r:’ to define groups. Based on camb_hhinc1 this would look like hhincome(r: 0-18900; 18910-20550; 20551-23500; 23501-26450). More information on recoding variables on the query line can be found in the help text here.

I hope this helps.

The staff answer from Joe Grover certainly works.

I was able to to determine the source of my problem The top and bottom ranges in my original recode were hard wired to specific values. When I rerwote these ranges using a wildcard (*) as the topmost and bottommost values ( eg *-100 instead of 0-100) the query worked properly. I don’t find any mention of this in the user documentation, which as written seems to imply that any values not explicitly incldued in a recoded range are placed in an MD category:

" Convert to the system missing-data code

If there are no user-specified missing-data codes, and if the option to assign the value of an input variable was not selected, the system missing-data code will be assigned to the new variable for that case