Dear all,
I have observational data in a variable called taskcompletionrate. This variable contains informations on the percentage of tasks completed by healthworkers. I have 10 categories in this variable (1= 0.10%, 2=10-20% and so on). I want to create a bar graph displaying the percentages of observations within each category, but I would like the x-axis to also show the categories that do not have observations in them (in my case there are only observations in categories 8,9, and 10).
but this does only show a bar graph with the categories 8,9, and 10. Is there an option or modification in Stata to display all categories?
Thanks a lot
Best
Theresa
I have observational data in a variable called taskcompletionrate. This variable contains informations on the percentage of tasks completed by healthworkers. I have 10 categories in this variable (1= 0.10%, 2=10-20% and so on). I want to create a bar graph displaying the percentages of observations within each category, but I would like the x-axis to also show the categories that do not have observations in them (in my case there are only observations in categories 8,9, and 10).
Code:
gen taskcompletionrate=summated_score_stand recode taskcompletionrate 0/9.99=1 10/19.99=2 20/29.99=3 30/39.99=4 40/49.99=5 50/59.99=6 60/69.99=7 70/79.99=8 80/89.99=9 90/100=10 tab taskcompletionrate graph bar (percent), over (taskcompletionrate) allcategories
Thanks a lot
Best
Theresa
Comment