Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

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?

0
Posted

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?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123