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
Stochastic Frontier AnalysisI conducted Stochastic Frontier Analysis (SFA) using the command 'frontier' with the natural log of …
TWFE: Different results between Stata and RHi, We are running two-way fixed effects on R and Stata using the same data, and they are giving di…
Count frequencies of (binary) variable and merge these to original datasetThe following provides one solution to the problem. However, it seems unnecessarily complicated to m…
Showing values that exist in a value label but are not taken on by a variable in a table/tabulation?Hi All, I have a variable that represents the answers to the following question on a survey: Do you…
Descriptive Statistics by SegmentHi all, I have ratings data (ratings are 0-5) and I am trying to see what what % of users never rat…
Subscribe to:
Post Comments (Atom)
0 Response to Bar graph of 3 categorical variables which have the same responses
Post a Comment