Histogram inquiry
I am handicapped here as a novice Stata user. I am attempting to create, as part of a graduate writing task, a histogram figure to project 14 West African countries’ respective percentages of public service governing malfeasance using panel data. My setup is as follows:
gen niger_total = nigert1 + nigert2 + nigert3 + nigert4 + nigert5 + nigert6 + nigert7 + nigert8
gen niger_average = niger_total / 8
gen niger_percentage = niger_average / 1199
gen niger_perc_report = niger_percentage * 100
format niger_perc_report %2.0f
The above coding is similarly done for the other 13 countries.
The attached figure was created with the command:
histogram niger_perc_report, discrete addlabels xtitle("") ylabel(,grid) percent start(9) by(country_code, row(1)) xlabel(, ang(45))

Again, all this information is resident in a panel dataset. Does anyone have suggestions for my situation? Thanks in advance.
Yarh
I am handicapped here as a novice Stata user. I am attempting to create, as part of a graduate writing task, a histogram figure to project 14 West African countries’ respective percentages of public service governing malfeasance using panel data. My setup is as follows:
- Each country has 8 ordinal trust level variables I created on the dataset to generate a combined total.
- The combined total for each of the 14 countries is what I would like to display in the histogram figure.
- Percentages should be displayed on the y-axis.
- The countries should be in alphabetical order on the x-axis.
gen niger_total = nigert1 + nigert2 + nigert3 + nigert4 + nigert5 + nigert6 + nigert7 + nigert8
gen niger_average = niger_total / 8
gen niger_percentage = niger_average / 1199
gen niger_perc_report = niger_percentage * 100
format niger_perc_report %2.0f
The above coding is similarly done for the other 13 countries.
The attached figure was created with the command:
histogram niger_perc_report, discrete addlabels xtitle("") ylabel(,grid) percent start(9) by(country_code, row(1)) xlabel(, ang(45))
Again, all this information is resident in a panel dataset. Does anyone have suggestions for my situation? Thanks in advance.
Yarh
Comment