Nov 13, 2017

Random graphs (117): Scatterplots

cls
clear 
input str25 country cf grades attainment gini
"Germany"           .46  .    .51  31.4
"Norway"            .45  .48  .41  26.8
"Sweden"            .48  .52  .44  27.2
"Finland"           .    .    .36  26.8
"United Kingdom"    .    .    .42  34.1
"USA (Add Health)"  .57  .42  .    41.0
"USA (PSID)"        .55  .    .51  41.0
end


twoway scatter cf gini, mlabel(country) ytitle("Cognitive skills" "sibling correlation") ///
                        xtitle("Income inequality" "(Gini coefficient, World Bank)") ///
                        xlabel(25 (5) 45) ylabel(, format(%6.2f)) name(A, replace)
twoway scatter grades gini, mlabel(country)  ytitle("School grades" "sibling correlation") ///
                            xtitle("Income inequality" "(Gini coefficient, World Bank)") ///
                            xlabel(25 (5) 45) ylabel(, format(%6.2f)) name(B, replace)
twoway scatter attainment gini, mlabel(country)  ytitle("Final educational attainment" "sibling correlation") ///
                                xtitle("Income inequality" "(Gini coefficient, World Bank)") ///
                                xlabel(25 (5) 45) ylabel(, format(%6.2f)) name(C, replace)
graph combine A B C, col(1) ysize(6) xsize(4) xcommon ycommon