Easy multi-panel plotting with grcomb � Alex Gamma Swiss Stata User Group meeting Bern, Switzerland 17.11.2016
Content ◦ The problem ◦ Enter grcomb ◦ grcomb in action ◦ grcomb syntax ◦ Limits & improvements
The problem ◦ Quegging (Quick Exploratory Graphing) ◦ Stata’s graph combine too complicated o need to produce single graphs fi rst o combine using graph combine o does not support wildcards in graph names
The problem . hist SCL_01, percent name(scl01) . hist SCL_02, percent name(scl02) . graph combine scl0* . scl0* is not a memory graph r(198);
Enter grcomb . ssc install grcomb ◦ requires ≥ Stata 10
grcomb in action . grcomb hist SCL_0*, percent v(1) 15 20 15 10 Percent Percent 10 5 5 0 0 0 10 20 30 40 0 10 20 30 40 SCL_01 SCL_02
grcomb in action . grcomb sc SCL_01 age SCL_02 age, v(2) o(abab) 40 40 30 30 SCL_01 SCL_02 20 20 10 10 0 0 0 20 40 60 80 0 20 40 60 80 alter alter
grcomb in action . grcomb sc SCL_01 SCL_02 age age, v(2) o(aabb) 40 40 30 30 SCL_01 SCL_02 20 20 10 10 0 0 0 20 40 60 80 0 20 40 60 80 alter alter
grcomb in action . grcomb sc SCL_0* age*2, v(2) o(aabb) 40 40 30 30 SCL_01 SCL_02 20 20 10 10 0 0 0 20 40 60 80 0 20 40 60 80 alter alter
grcomb in action . grcomb lgraph SCL_0* agecat*2 uni*2, v(3) o(aabb) err(iqr) eop(lc(*.5)) nom sep(.01) ylab(0(5)30) xti(Age group) No university University No university University 30 30 25 25 20 20 Mean SCL 01 Mean SCL 02 15 15 10 10 5 5 0 0 20 30 40 50 20 30 40 50 Age group Age group
grcomb syntax . grcomb graph command var1[*#] var2[*#] var3[*#] var4[*#] [...] [if] [in] , varblock( # ) [ order ( abab|aabb ) name ( name[, replace] ) draw feedback graph options ] Draw single Feedback on graphs progress grcomb automatically names your graph uniquely
Limits & improvements ◦ Combined length of variable names cannot exceed 244 abab) is default; should be o ◦ o ( ( aabb) ◦ No options of graph combine ◦ No other luxury ◦ The fi rst two will be addressed in a future update on SSC ◦ The second two are features
Thanks! � alex.gamma@uzh.ch
Recommend
More recommend