Hi everyone,
I would like to create a bar graph of in which I graph a variable (median_age) by region and time and also by all regions combined. So far, I could only graph by region and time, but would like a last (new) set of bars to be one of all the regions combined. Any help is highly appreciated. I couldn't find this issue addressed anywhere else, after some thorough search already
Data and code to replicate my graph
-----------------------------------------------------
webuse emd, clear
gen region = "Region 4" if fips > 400000
replace region = "Region 3" if fips > 300000 & region == ""
replace region = "Region 2" if fips > 200000 & region ==""
replace region = "Region 1" if region ==""
gen time = runiformint(0, 1)
label define time 1 "Time1" 0 "Time0", replace
label values time time
graph bar median_age, over(time) over(region)
I would like to create a bar graph of in which I graph a variable (median_age) by region and time and also by all regions combined. So far, I could only graph by region and time, but would like a last (new) set of bars to be one of all the regions combined. Any help is highly appreciated. I couldn't find this issue addressed anywhere else, after some thorough search already
Data and code to replicate my graph
-----------------------------------------------------
webuse emd, clear
gen region = "Region 4" if fips > 400000
replace region = "Region 3" if fips > 300000 & region == ""
replace region = "Region 2" if fips > 200000 & region ==""
replace region = "Region 1" if region ==""
gen time = runiformint(0, 1)
label define time 1 "Time1" 0 "Time0", replace
label values time time
graph bar median_age, over(time) over(region)

Comment