I want to use an Age variable as one of the points in a banner table, but age was entered as the actual age instead of being coded into categories. How can I make it work in a banner table?
ANSWER – There are many different solutions to this problem. In order to do this, you need to define age groups. The first solution is to recode the Age variable, and then assign value labels to the recoded data. Two lines are required. RECODE Age (LO-20=1)(21-30=2)(31-40=3)(41-HI=4) LABELS Age (1=Under 21)(2=21-30)(3=31-40)(4=Over 40) The recoded and newly labeled Age variable could then be used in a banners or crosstabs table. If you wanted access to both the raw data and the recoded data, you could create a new variable and have it contain the recoded age data. This technique has the added advantage that the original data remains intact even when the SAVE command is used. Here are three more solutions to this problem: LET Age-Group=Age RECODE Age-Group (LO-20=1)(21-30=2)(31-40=3)(41-HI=4) LABELS Age-Group (1=Under 21)(2=21-30)(3=31-40)(4=Over 40) .. COMPUTE (N2) Age-Group=Age RECODE Age-Group (LO-20=1)(21-30=2)(31-40=3)(41-HI=4) LABELS Age-Group (1=Under 21)(2=21-30)(3=31-40)(4=Over
Related Questions
- I want to use an Age variable as one of the points in a banner table, but age was entered as the actual age instead of being coded into categories. How can I make it work in a banner table?
- What are 3 main points illegal immigration negatively affects the economy?
- What is the actual, legal drinking age in London, England?