Skip to content

Instantly share code, notes, and snippets.

@bbdaniels
Created March 26, 2021 18:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bbdaniels/2f408ebe0e1e41e3bdd4c4c453c3599a to your computer and use it in GitHub Desktop.
Compare discrete distributions using bar graphs in Stata
sysuse auto.dta, clear
local style "s(0) w(1) lc(none) discrete frac"
tw ///
(histogram rep78 if foreign == 1 ///
, fc(black%50) barwidth(0.9) `style') ///
(histogram rep78 if foreign == 0 ///
, fc(red%50) barwidth(0.8) `style')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment