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.
Related Posts with Bar graph of 3 categorical variables which have the same responses
How to do a correlation between two variables for each unit of a panel?Hi, I have age-specific suicide rates (1992-2000) for Russia grouped by 5 year age groups from 15-1…
color/line pattern for graph?Dear All, I found the following code Code: sysuse auto, clear regress price c.length##c.mpg est s…
Ppmlhdfe returns r3203Dear All, I am using ppmlhfe command with Code: ppmlhdfe sales post, a(timeFE itemFE) vce(cluster…
Can I run a Pseudo-Poisson Maximum Likelihood in panel data when not using a Gravity Model? What is the STATA command?I want to run the Pseudo-Poisson Maximum Likelihood (PPML) in a panel data framework as my dependent…
Excluding leading zeros when exporting output to WORDHi folks, can you recommend a command that could help me export regression output without including …
Subscribe to:
Post Comments (Atom)
0 Response to Bar graph of 3 categorical variables which have the same responses
Post a Comment