// Open Allbus data
use V388 V151 using "ZA4602_v1-0-0.dta", clear
// Income
recode V388 (99997 = .a "Refused") (99999 = .b "No answer"), gen(personal_income)
label var personal_income "Personal net income"
// Sex
recode V151 (1 = 0 "Men") (2 = 1 "Women"), gen(sex)
label var sex "Gender"
// Dotplot stratified by grouping variable
dotplot personal_income, over(sex) center msymbol(oh) ///
ytitle("Personal net income in Euro") xtitle("") ///
note(" " "{it:Source:} German General Social Survey Allbus 2008, doi:10.4232/1.12345", span) ///
name(figure1, replace)
// Open EQLS data
use Y11_Q40b Y11_Q40e Y11_Q40f Y11_Q40g Y11_Q30 using "7348_F1.dta", clear
// Relabel variables
label var Y11_Q40b "Job"
label var Y11_Q40e "Family life"
label var Y11_Q40f "Health"
label var Y11_Q40g "Social life"
label var Y11_Q30 "Life overall"
// Dotplot for several variables
dotplot Y11_Q40b Y11_Q40e Y11_Q40f Y11_Q40g Y11_Q30, ///
ylabel(1 "Very dissatisfied 1" 2 3 4 5 6 7 8 9 10 "Very satisfied 10") ///
xtitle("How satisfied with ...") ///
note("{it:Source:} European Quality of Life Survey 2003-12", span) ///
name(figure2, replace)
Jul 22, 2017
Random graphs (103): Dot plots
Labels:
Allbus,
dotplot,
EQLS,
Random graphs

