Stata Graph
-graph- renders a visual graph.
Usage
graph hbar foo, over(bar) over(baz) asyvars graph save foo // native Stata graphic graph export foo.png // rendered graphic
Plotting Aggregated Statistics
Consider a time series dataset that includes a time period indicator (t) that ranges from 3 to 9, an estimated population proportion (p), and upper/lower confidence interval bounds (ci_upper and ci_lower). This time series can be plotted like:
tsset t graph twoway (rarea ci_lower ci_upper t, color(gs15)) (tsline p, ylabel(0(0.05)0.25 tlabel(3(1)9))
It may be helpful to also plot a horizontal line for the overall mean. Try:
quietly summ p generate m = r(mean) graph twoway ... (tsline m)
