Skip to content

Instantly share code, notes, and snippets.

@vikjam
Last active March 3, 2016 21:45
Show Gist options
  • Save vikjam/84235bf989da758ec982 to your computer and use it in GitHub Desktop.
Save vikjam/84235bf989da758ec982 to your computer and use it in GitHub Desktop.
Fixed bins for binscatter
webuse nlswork, clear
gen grade_bin = floor(grade/2) * 2 + 1
levelsof year, local(years)
foreach yr of local years {
binscatter ln_wage grade if year == `yr', linetype(connect) xq(grade_bin) msymbol(none) title("`yr'")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment