Help for betterbar

Description

betterbar and betterbarci produce bar graphs with standard error bars and cross-group comparisons.

Syntax

betterbar varlist [if] [in] [weight], [options] [twoway_options]

Options

by(varname) Produces top-level grouping of bars by specified variable.

over(varname) Produces bottom-level grouping of bars.

Graph Options
n Adds group sizes to legend.

ci Includes 95% confidence intervals around the means. Alternately specify betterbarci.

vce(vcetype) Adjusts confidence intervals for any standard VCE type.

barlab Labels the bars with the mean values.

barcolor(list) List of fill colors for bars.

pct Labels the bars with the mean values expressed as percentages (when binary variables are used).

format(format) Format the bar labels.

vertical Produces vertical bars. The default is horizontal.

Example

sysuse auto.dta , clear
xtile temp = rnormal() , n(4)
label def temp 1 "1" 2 "Two" 3 "Tres" 4 "IV"
label val temp temp
replace price = . if temp == 1
betterbarci price mpg, over(foreign) n by(temp) bar format(%9.2f)

Author

Benjamin Daniels
bbdaniels@gmail.com

Contributing

betterbar is open for development on GitHub.
Submit bugs and feature requests here.
If you like betterbar, be sure to visit my homepage.