Hello! I have a dataset (simplified example) containing the following variables; Data salary; input age_group$ gender$ year$ salary; 25-29 M 2017 25000 25-29 M 2018 30000 25-29 W 2017 30000 25-29 W 2018 35000 30-34 M 2017 25000 30-34 M 2018 50000 30-34 W 2017 25000 30-34 W 2018 75000 I would like to create a table looking like this: 25-29 (age_group) 30-34 (age_group) Gender Gender M W M W Salary Salary Salary Salary Sum Sum Sum Sum 2018 64000 35000 50000 75000 2017 34000 30000 25000 25000 M and W should be under agegroup and gender, not separeted ( there was an error in the HTML when I made this post). Same table but from notepad; 25-29 (age_group) 30-34 (age_group) Gender Gender M W M W Salary Salary Salary Salary Sum Sum Sum Sum 2018 64000 35000 50000 75000 2017 34000 30000 25000 25000 I have tried proc tabulate and proc transpose, but probably I am doing somethin wrong as I don't get the result I want. Would be super if someone could provide a code for this.
... View more