Stata 15 help for shewhart

[R] qc -- Quality control charts

Syntax

Draw a c chart

cchart defect_var unit_var [, cchart_options]

Draw a p (fraction-defective) chart

pchart reject_var unit_var ssize_var [, pchart_options]

Draw an R (range or dispersion) chart

rchart varlist [if] [in] [, rchart_options]

Draw an X-bar (control line) chart

xchart varlist [if] [in] [, xchart_options]

Draw vertically aligned X-bar and R charts

shewhart varlist [if] [in] [, shewhart_options]

cchart_options Description ------------------------------------------------------------------------- Main nograph suppress graph

Plot connect_options affect rendition of the plotted points marker_options change look of markers (color, size, etc.) marker_label_options add marker labels; change look or position

Control limits clopts(cline_options) affect rendition of the control limits

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

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

pchart_options Description ------------------------------------------------------------------------- Main stabilized stabilize the p chart when sample sizes are unequal nograph suppress graph generate(newvar_f newvar_lcl newvar_ucl) store the fractions of defective elements and the lower and upper control limits

Plot connect_options affect rendition of the plotted points marker_options change look of markers (color, size, etc.) marker_label_options add marker labels; change look or position

Control limits clopts(cline_options) affect rendition of the control limits

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

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

rchart_options Description ------------------------------------------------------------------------- Main std(#) user-specified standard deviation nograph suppress graph

Plot connect_options affect rendition of the plotted points marker_options change look of markers (color, size, etc.) marker_label_options add marker labels; change look or position

Control limits clopts(cline_options) affect rendition of the control limits

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

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

xchart_options Description ------------------------------------------------------------------------- Main std(#) user-specified standard deviation mean(#) user-specified mean lower(#) upper(#) lower and upper limits of the X-bar limits nograph suppress graph

Plot connect_options affect rendition of the plotted points marker_options change look of markers (color, size, etc.) marker_label_options add marker labels; change look or position

Control limits clopts(cline_options) affect rendition of the control limits

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

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

shewhart_options Description ------------------------------------------------------------------------- Main std(#) user-specified standard deviation mean(#) user-specified mean nograph suppress graph

Plot connect_options affect rendition of the plotted points marker_options change look of markers (color, size, etc.) marker_label_options add marker labels; change look or position

Control limits clopts(cline_options) affect rendition of the control limits

Y axis, X axis, Titles, Legend, Overall combine_options any options documented in [G-2] graph combine -------------------------------------------------------------------------

Menu

cchart

Statistics > Other > Quality control > C chart

pchart

Statistics > Other > Quality control > P chart

rchart

Statistics > Other > Quality control > R chart

xchart

Statistics > Other > Quality control > X-bar chart

shewhart

Statistics > Other > Quality control > Vertically aligned X-bar and R chart

Description

These commands provide standard quality-control charts. cchart draws a c chart; pchart, a p (fraction-defective) chart; rchart, an R (range or dispersion) chart; xchart, an X-bar (control line) chart; and shewhart, vertically aligned X-bar and R charts.

Options

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

stabilized stabilizes the p chart when sample sizes are unequal.

std(#) specifies the standard deviation of the process. The R chart is calculated (based on the range) if this option is not specified.

mean(#) specifies the grand mean, which is calculated if not specified.

lower(#) and upper(#) must be specified together or not at all. They specify the lower and upper limits of the X-bar chart. Calculations based on the mean and standard deviation (whether specified by option or calculated) are used otherwise.

nograph suppresses the graph.

generate(newvar_f newvar_lcl newvar_ucl) stores the plotted values in the p chart. newvar_f will contain the fractions of defective elements; newvar_lcl and newvar_ucl will contain the lower and upper control limits, respectively.

+------+ ----+ Plot +-------------------------------------------------------------

connect_options affect whether lines connect the plotted points and the rendition of those lines; see [G-3] connect_options.

marker_options affect the rendition of markers drawn at the plotted points, including their shape, size, color, and outline; see [G-3] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G-3] marker_label_options.

+----------------+ ----+ Control limits +---------------------------------------------------

clopts(cline_options) affect the rendition of the control limits; see [G-3] cline_options.

+-----------+ ----+ 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).

combine_options (shewhart only) are any of the options documented in [G-2] graph combine. These include options for titling the graph (see [G-3] title_options) and for saving the graph to disk (see [G-3] saving_option).

Example: cchart

Assume that the variable day contains the sample identification number and defects contains the number of defects in the sample:

. webuse ncu . cchart defects day, title(c Chart for Subassemblies)

Example: pchart

Assume that the variable day contains the day of the inspection (1, 2, ...), rejects contains the number rejected, and ssize contains the number inspected:

. webuse ncu2 . pchart rejects day ssize

Example: rchart

Assume that we take five samples of 5 observations each. Variables m1 through m5 contain the measurements for each sample:

. webuse rchartxmpl . rchart m1-m5, connect(l)

Example: xchart

Using the same data as for rchart:

. xchart m1-m5, connect(l)

Example: shewhart

Using the same data as for rchart:

. shewhart m1-m5, connect(l)

Stored results

cchart stores the following in r():

Scalars r(cbar) expected number of nonconformities r(lcl_c) lower control limit r(ucl_c) upper control limit r(N) number of observations r(out_c) number of units out of control r(below_c) number of units below the lower limit r(above_c) number of units above the upper limit

pchart stores the following in r():

Scalars r(pbar) average fraction of nonconformities r(lcl_p) lower control limit r(ucl_p) upper control limit r(N) number of observations r(out_p) number of units out of control r(below_p) number of units below the lower limit r(above_p) number of units above the upper limit

rchart stores the following in r():

Scalars r(central_line) ordinate of the central line r(lcl_r) lower control limit r(ucl_r) upper control limit r(N) number of observations r(out_r) number of units out of control r(below_r) number of units below the lower limit r(above_r) number of units above the upper limit

xchart stores the following in r():

Scalars r(xbar) grand mean r(lcl_x) lower control limit r(ucl_x) upper control limit r(N) number of observations r(out_x) number of units out of control r(below_x) number of units below the lower limit r(above_x) number of units above the upper limit

shewhart stores in r() the combination of stored results from xchart and rchart.


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