Skip to content

Instantly share code, notes, and snippets.

@bbdaniels
Created December 20, 2022 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbdaniels/a70a88a56d535a5e3c38c79fbb63e4aa to your computer and use it in GitHub Desktop.
Save bbdaniels/a70a88a56d535a5e3c38c79fbb63e4aa to your computer and use it in GitHub Desktop.
Graph combine with tempfiles
local graphs ""
local x = 1
foreach var of varlist ///
diarrhea_history_duration tb_history_sputum ///
malaria_history_fevertype pph_history_pph ///
diabetes_history_numblimb {
local title : var lab `var'
local graphs `"`graphs' "\``var''" "'
tempfile `var'
binsreg `var' theta_mle , polyreg(3) ///
dotsplotopt(mc(black)) polyregplotopt(lc(red) lw(thick)) ///
ylab(0 "0%" .5 "50%" 1 "100%" , notick) yline(0 .5 1 , lc(black)) ///
yscale(noline) xscale(noline) ytit(" ") title("`title'") ///
xlab(0 "" 5 "+5" -5 "-5" -1 " " -2 " " -3 " " -4 " " 1 " " 2 " " 3 " " 4 " ") ///
note("Provider competence score {&rarr}" , ring(0)) xtit("") ///
saving(``var'') nodraw
}
graph combine `graphs'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment