# gagerr

Gage repeatability and reproducibility study

## Syntax

`gagerr(y,{part,operator})`

gagerr(y,GROUP)

gagerr(y,part)

gagerr(...,* param1*,

*,*

`val1`

*,*

`param2`

*,...)*

`val2`

gagerr(ax,___)

[TABLE, stats] = gagerr(...)

## Description

`gagerr(y,{part,operator})`

performs a gage repeatability and
reproducibility study on measurements in `y`

collected by
`operator`

on `part`

. `y`

is a
column vector containing the measurements on different parts. `part`

and `operator`

are categorical variables, numeric vectors, character
matrices, string arrays, or cell arrays of character vectors. The number of elements in
`part`

and `operator`

should be the same as in
`y`

.

`gagerr`

prints a table in the Command Window in which the decomposition of
variance, standard deviation, study var (5.15 `x`

standard deviation)
are listed with respective percentages for different sources. Summary statistics are
printed below the table giving the number of distinct categories (NDC) and the
percentage of Gage R&R of total variations (PRR).

`gagerr`

also plots a bar graph showing the
percentage of different components of variations. Gage R&R, repeatability,
reproducibility, and part-to-part variations are plotted as four vertical
bars. Variance and study var are plotted as two groups.

To determine the capability of a measurement system using NDC, use the following guidelines:

If NDC > 5, the measurement system is capable.

If NDC < 2, the measurement system is not capable.

Otherwise, the measurement system might be acceptable.

To determine the capability of a measurement system using PRR, use the following guidelines:

If PRR < 10%, the measurement system is capable.

If PRR > 30%, the measurement system is not capable.

Otherwise, the measurement system may be acceptable.

`gagerr(y,GROUP)`

performs a gage R&R
study on measurements in `y`

with `part`

and `operator`

represented
in `GROUP`

. `GROUP`

is a numeric
matrix whose first and second columns specify different parts and
operators, respectively. The number of rows in `GROUP`

should
be the same as the number of elements in `y`

.

`gagerr(y,part)`

performs a gage R&R
study on measurements in `y`

without operator information.
The assumption is that all variability is contributed by `part`

.

`gagerr(...,`

performs a gage R&R study using one or more of the following name-value
arguments:* param1*,

*,*

`val1`

*,*

`param2`

*,...)*

`val2`

`'spec'`

— A two-element vector that defines the lower and upper limit of the process, respectively. In this case, summary statistics printed in the Command Window include Precision-to-Tolerance Ratio (PTR). Also, the bar graph includes an additional group, the percentage of tolerance.To determine the capability of a measurement system using PTR, use the following guidelines:

If PTR < 0.1, the measurement system is capable.

If PTR > 0.3, the measurement system is not capable.

Otherwise, the measurement system might be acceptable.

`'printtable'`

— A value`"on"`

or`"off"`

that indicates whether to print the tabular output in the Command Window. The default value is`"on"`

.`'printgraph'`

— A value`"on"`

or`"off"`

that indicates whether to plot the bar graph. The default value is`"on"`

.`'randomoperator'`

— A logical value,`true`

or`false`

, that indicates whether the effect of`operator`

is random. The default value is`true`

.`'model'`

— The model to use, specified by one of the following:`'linear'`

— Main effects only (default)`'interaction'`

— Main effects plus two-factor interactions`'nested'`

— Nest`operator`

in`part`

The default value is

`'linear'`

.

`gagerr(ax,___)`

plots into the axes specified by `ax`

instead of the current axes
(`gca`

) using any of the input argument
combinations in the previous syntaxes.* (since R2024a)*

`[TABLE, stats] = gagerr(...)`

returns a
6-by-5 matrix `TABLE`

and a structure `stats`

.
The columns of `TABLE`

, from left to right, represent
variance, percentage of variance, standard deviations, study var,
and percentage of study var. The rows of `TABLE`

,
from top to bottom, represent different sources of variations: gage
R&R, repeatability, reproducibility, operator, operator and part
interactions, and part. `stats`

is a structure containing
summary statistics for the performance of the measurement system.
The fields of `stats`

are:

`ndc`

— Number of distinct categories.`prr`

— Percentage of gage R&R of total variations.`ptr`

— Precision-to-tolerance ratio. The value is`NaN`

if the parameter`'spec'`

is not given.

## Examples

## References

[1] Burdick, Richard K., Connie M.
Borror, and Douglas C. Montgomery. *Design and Analysis of Gauge
R&R Studies: Making Decisions with Confidence Intervals in Random and Mixed
ANOVA Models*. Society for Industrial Applied Mathematics: American
Statistical Association, 2005.

## Version History

**Introduced in R2006b**