Hi
I think this question has a really simple answer but I can't for the life of me work it out or find one online.
I'm trying to create a bar chart displaying values of a continuous variable stratified by age group (three categories) and by two comparison groups. The comparison groups I'm interested in are:
I can't seem to find a way to specify this using syntax. If I use if, I only get one category. If I use by/over, I get all of them. I've tried creating a dummy variable for SIMD=1 with SIMD~=1 set to missing and using total, but this leaves out the missing from the total.
I'm sure I'm missing something really obvious - any advice as to how to write this in syntax would be very gratefully received
Many thanks
Emily
I think this question has a really simple answer but I can't for the life of me work it out or find one online.
I'm trying to create a bar chart displaying values of a continuous variable stratified by age group (three categories) and by two comparison groups. The comparison groups I'm interested in are:
- (A) all those in one category of an ordinal variable, and
- (B) everyone in dataset, regardless of their value for this variable.
- (A) those living in most deprived area (IMD=1)
- (B) the entire population (IMD=1-5)
I can't seem to find a way to specify this using syntax. If I use if, I only get one category. If I use by/over, I get all of them. I've tried creating a dummy variable for SIMD=1 with SIMD~=1 set to missing and using total, but this leaves out the missing from the total.
I'm sure I'm missing something really obvious - any advice as to how to write this in syntax would be very gratefully received
Many thanks
Emily
Comment