Stata 15 help for serrbar

[R] serrbar -- Graph standard error bar chart


serrbar mvar svar xvar [if] [in] [, options]

options Description ------------------------------------------------------------------------- Main scale(#) scale length of graph bars; default is scale(1)

Error bars rcap_options affect rendition of capped spikes

Plotted points mvopts(scatter_options) affect rendition of plotted points

Add plots addplot(plot) add other plots to generated graph

Y axis, X axis, Titles, Legend, Overall twoway_options any options other than by() documented in [G-3] twoway_options -------------------------------------------------------------------------


Statistics > Other > Quality control > Standard error bar chart


serrbar is typically used with a dataset containing means, standard deviations or standard errors, and an xvar. serrbar uses this data to create a standard error bar chart. The means are plotted against xvar, and error bars around the means have a width determined by the standard deviation or standard error. While it is most common to use serrbar with this type of data, serrbar may also be used to create a scatterplot with error bars for other types of data.


+------+ ----+ Main +-------------------------------------------------------------

scale(#) controls the length of the bars. The upper and lower limits of the bars will be mvar + scale() * svar and mvar - scale() * svar. The default is scale(1).

+------------+ ----+ Error bars +-------------------------------------------------------

rcap_options affect the rendition of the plotted error bars (the capped spikes). See [G-2] graph twoway rcap.

+----------------+ ----+ Plotted points +---------------------------------------------------

mvopts(scatter_options) affects the rendition of the plotted points (mvar versus xvar). See [G-2] graph twoway scatter.

+-----------+ ----+ Add plots +--------------------------------------------------------

addplot(plot) provides a way to add other plots to the generated graph; see [G-3] addplot_option.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G-3] twoway_options, excluding by(). These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] saving_option).


. webuse assembly . serrbar mean std date, scale(2) yline(195) . serrbar mean std date, scale(2) title("Observed Weight Variation") sub("San Francisco plant, 1/8 to 1/6") yline(195) yaxis(1 2) ylab(195, axis(2)) ytitle("", axis(2))

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index