Hello,
Am fairly new to Stata and haven't been able to find the solution googling around - apologies if this is a really basic question.
I am doing a piece of work using the ELSA dataset.
I have 3 categorical variables:
heacta: How often do you take part in vigorous exercise?
heactb: How often do you take part in moderate exercise?
heactc: How often do you take part in mild exercise?
The responses are:
- more than once a week
- once a week
- one to three times a month
- hardly ever, or never
I would like to plot one bar graph which has these 3 variables next to each other on the x-axis, with 4 separate bars in each variable.
The y-axis to represent the percentage of responses per variable.
Also, I would only like to consider a segment of my sample for this graph - I have separated the respondents into two categories 'below 50 years old' and '50 and older' using a new variable 'newage', where 'newage==1' is the '50 and older' group.
I think I could use catplot, but I haven't used it before and I've not managed to install it.
Running command 'ssc inst catplot' returns 'all files already exist and are up to date.' in the Stata read-out, but when I type 'catplot', the font doesn't come up as blue in the do file. Not sure what this means!
Any help would be appreciated! Thank you in advance.
0 Response to Bar graph of 3 categorical variables which have the same responses
Post a Comment