Hello Sir
Have some issues with including titles in histograms in a loop.
The code is running but no output.
Even when I got output in some other method, I am unable to get the way I want.
I want the block names as headings (ex. Achalpur)
Please help
-------------------------------------------------------------------------------------------The code is-------------------------
local districts Amhednagar Amravati Dhule Jalna Yavatmal
levels district, local(districts)
local blocks Achalpur Akole Ambad Amravati "Anjangaon S" Arni Babhulgaon Badnapur ///
Bhatkuli Bhokardan "Chandur Bz" "Chandur Ril" Chikhaldara ///
Darwha Daryapur "Dhamangaon Ril" Dharni Dhule Digras Ghansawangi ///
Ghatanji Jafrabad Jalna Jamkhed Kalamb ///
Karjat Kelapur Kopargaon Mahagaon Mantha Maregaon Morshi ///
Nagar "Nandgaon Kh" Nevasa Parner ///
Partur Pathardi Rahata Rahuri Sakri Sangamner Shevgaon Shindkhede ///
Shirpur Shrigonda Tiwsa Umarkhed Wani ///
Warud Yavatmal "Zari Jamni"
levels block, local(blocks)
foreach c of local districts {
local i=1
*di `"`: var label `dist''"'
di `"`: label (districts) `"'
histogram soc if district=="`c'" , frequency barwidth(0.05) title(`=strtoname("`c'")') xtitle(SOC)
graph save "`c'"_dt , replace
graph export `district'_dt.wmf, replace
local i=`i'+1
}
Related Posts with Histograms in loop
Replacing observations with conditions using loopHi, I need some help I'm working with migration data and I'd like to replace the values of the vari…
Residual assumptions for spxtregress, feDoes anyone know the assumptions that need to be met to use spxtregress, fe? In looking through the …
ignore insufficient observations and run the loop without breakingHi, I would like to calculate cumulative security residual return, which is residual in a regression…
How To Count Identical Values As One Without DroppingDear Stata Community, I'm trying to 'count the number of years each person attended the conference …
Test for heteroskedasticity after spxtregressThe spatial Stata manual (https://www.stata.com/manuals/sp.pdf) makes clear that heteroskedasticity …
Subscribe to:
Post Comments (Atom)
0 Response to Histograms in loop
Post a Comment