I am a beginner Stata user. For a research project, whose information I must unfortunately keep confidential, I am trying to adjust a bar graph so that the order of the bars are "Increase", "Same", "Decrease" instead of the default alphabetical "Decrease", "Increase", "Same".
To create this graph, I load in my cleaned dataset and run:
graph bar, by(byvar) over(groupvar) .
In an attempt to try to re-order the bars, I ran:
gen order=1 if groupvar=="Increase"
replace order=2 if groupvar=="Same"
replace order=3 if groupvar=="Decrease"
graph bar, by(byvar) over(groupvar, sort(order)) .
I get the error message "variable mean not found".
How should I fix this?
(Apologies if this is too difficult to answer without being able to see the graph and data.)
Related Posts with How can I change the order of the bars in this bar graph?
Drawing random sample from a large data set for each observationHi, I have a large dataset on course enrollment. Individual students take courses in different semes…
outreg2 after tab1Using the below code, I generate several one-way frequency tables. I would like to send all the tabl…
Can esttab produce percent change results for mixed models with log-transformed dependent variable?Hi Statalist, Is it possible to create a coefficients table that produces percent change instead of…
encode a string variable according to subsrtHi, I have a string variable, vq9_breakupdivorce, which has only 2 string values. Code: * Example …
multilevel ordinal probit model_meoprobit_iccI am intending to establish a multilevel ordinal probit model. The dependent variables is injury sev…
Subscribe to:
Post Comments (Atom)
0 Response to How can I change the order of the bars in this bar graph?
Post a Comment