Hi,
I want to create a bar graph for multiple variables and combine them in a graph using a loop. But my code only generates a bar graph for the first variable. How can I adjust my code to fix this problem?
My code is:
foreach var of varlist merge1 merge2 merge3 {
foreach var of varlist Beschäftigungsanteil_1 Beschäftigungsanteil_2 Beschäftigungsanteil_3 Beschäftigungsanteil_4 {
graph bar, over (ˋvar') saving (Stellendaten2, replace)
graph bar, over (ˋvar') saving (BHP2, replace)
graph bar, over (ˋvar') saving (Beide2, replace)
graph combine Stellendaten2.gph BHP2.gph Beide2.gph, xcommon ycommon rows(1)
graph export ˋvar'bar.png
}
}
Related Posts with Bar Graph with loop
Probit estimation with survey dataHello, I am dealing with a primary, cross-sectional data set that contains 360 observations and 26 v…
Create local including next month's nameI am working on a project that involves re-randomizing our sample every month. As could be expected,…
Categorisation of Explanatory Variables in Dynamic Panel EstimationsHi, I am trying to model determinants of corporate cash holdings for ~700 firms across 16 years. I …
Instruments Specification xtabond2/xtdpdgmmHi, I am trying to estimate determinants of corporate cash holdings for ~700 firms across 16 years …
Deflating a Series in a panelHello, I'm trying to create an deflator of the investment for every company in my panel, based of t…
Subscribe to:
Post Comments (Atom)
0 Response to Bar Graph with loop
Post a Comment