shewhart {dfphase1} | R Documentation |
Univariate Shewhart-type control charts
Description
shewhart
computes, and, optionally, plots,
Shewhart-type Phase I control charts for detecting
changes in location and scale of univariate subgrouped data.
shewhart.normal.limits
pre-computes
the corresponding control limits when the in-control distribution is normal.
Usage
shewhart(x, subset,
stat = c("XbarS", "Xbar", "S",
"Rank", "lRank", "sRank",
"Lepage", "Cucconi"),
aggregation = c("mean", "median"),
plot = TRUE,
FAP = 0.05,
seed = 11642257,
L = 1000,
limits = NA)
shewhart.normal.limits(n, m,
stat = c("XbarS", "Xbar", "S",
"Rank", "lRank", "sRank",
"Lepage", "Cucconi"),
aggregation = c("mean", "median"),
FAP = 0.05,
seed = 11642257,
L = 100000)
Arguments
x |
a nxm data numeric matrix (n observations gathered at m time points). |
subset |
an optional vector specifying a subset of subgroups/time points to be used |
stat |
character: the control statistic[s] to use; see Details. |
aggregation |
character:
it specify how to aggregate the subgroup means and standard deviations.
Used only when |
plot |
logical; if |
FAP |
numeric (between 0 and 1): desired false alarm probability.
Unused by |
seed |
positive integer; if not |
L |
positive integer: number of random permutations used to
compute the control limits. Unused by |
limits |
numeric: a precomputed vector of control limits.
The vector should contain |
n |
integer: size of each subgroup (number of observations gathered at each time point). |
m |
integer: number of subgroups (time points). |
Details
The implemented control charts are:
XbarS
: combination of theXbar
andS
control charts described in the following.Xbar
: chart based on plotting the subgroup means with control limits\hat{\mu}\pm A\frac{\hat{\sigma}}{\sqrt{n}}
where
\hat{\mu}
(\hat{\sigma}
) denotes the estimate of the in-control mean (standard deviation) computed as the mean or median of the subgroup means (standard deviations).S
: chart based on plotting the (unbiased) subgroup standard deviations with lower control limitB_1\hat{\sigma}
and upper control limitB_2\hat{\sigma}
.Rank
: combination of thelRank
andsRank
control charts described in the following.lRank
: control chart based on the standardized rank-sum control statistic suggested by Jones-Farmer et al. (2009) for detecting changes in the location parameter. Control limits are of the type\pm C
.sRank
: chart based on the standardized rank-sum control statistic suggested by Jones-Farmer and Champ (2010) for detecting changes in the scale parameter. Control limits are of the type\pm D
.Lepage
: chart based on the Lepage control statistic suggested by Li et al. (2019) for detecting changes in location and/or scale. There is only a upper control limit equal toE
.Cucconi
: chart based on the Cucconi control statistic suggested by Li et al. (2020) for detecting changes in location and/or scale. There is only a upper control limit equal toE
.
Value
shewhart
returns an invisible list with elements
Xbar |
subgroup means; this element is present only if
|
S |
subgroup standard deviation; this element is present only if
|
lRank |
rank-based control statistics for detecting
changes in location; this element is present only if
|
sRank |
rank-based control-statistics for detecting
changes in scale; this element is present only if
|
Lepage , W2 , AB2 |
Lepage, squared Wilcoxon
and squared Ansari-Bradley statistics; these elements are present
only if |
Cucconi , lCucconi , sCucconi |
Cucconi control statistic and
its location and scale components;
these elements are present only if |
limits |
control limits. |
center , scale |
estimates
|
stat , L , aggregation , FAP , seed |
input arguments. |
shewhart.normal.limits
returns a numeric vector
containing the limits.
Note
-
If argument
limits
isNA
,shewhart
computes the control limits by permutation. The resulting control chart are distribution-free. -
Pre-computed limits, such as those computed using
shewhart.normal.limits
, are not recommended whenstat
isXbarS
,Xbar
orS
. Indeed, the resulting control chart will not be distribution-free. -
When
stat
isRank
,lRank
,sRank
,Lepage
orCucconi
the control limits computed byshewhart.normal.limits
are distribution-free in the class of all univariate continuous distributions. So, if user plan to apply rank-based control charts on a repeated number of samples of the same size, pre-computing the control limits usingmshewhart.normal.limits
can reduce the overall computing time.
Author(s)
Giovanna Capizzi and Guido Masarotto.
References
L. A. Jones-Farmer, V. Jordan, C. W. Champs (2009) “Distribution-free Phase I control charts for subgroup location”, Journal of Quality Technology, 41, pp. 304–316, doi:10.1080/00224065.2009.11917784.
L. A. Jones-Farmer, C. W. Champ (2010) “A distribution-free Phase I control chart for subgroup scale”. Journal of Quality Technology, 42, pp. 373–387, doi:10.1080/00224065.2010.11917834
C. Li, A. Mukherjee, Q. Su (2019) “A distribution-free Phase I monitoring scheme for subgroup location and scale based on the multi-sample Lepage statistic”, Computers & Industrial Engineering, 129, pp. 259–273, doi:10.1016/j.cie.2019.01.013
C. Li, A. Mukherjee, M. Marozzi (2020) “A new distribution-free Phase-I procedure for bi-aspect monitoring based on the multi-sample Cucconi statistic”, Computers & Industrial Engineering, 149, doi:10.1016/j.cie.2020.106760
D. C. Montgomery (2009) Introduction to Statistical Quality Control, 6th edn. Wiley.
P. Qiu (2013) Introduction to Statistical Process Control. Chapman & Hall/CRC Press.
Examples
# A simulated example
set.seed(12345)
y <- matrix(rt(100,3),5)
y[,20] <- y[,20]+3
shewhart(y)
shewhart(y, stat="Rank")
shewhart(y, stat="Lepage")
shewhart(y, stat="Cucconi")
# Reproduction of the control chart shown
# by Jones-Farmer et. al. (2009)
data(colonscopy)
u <- shewhart.normal.limits(NROW(colonscopy),NCOL(colonscopy),
stat="lRank", FAP=0.1, L=10000)
# In Jones-Farmer et al. (2009) is estimated as 2.748
u
shewhart(colonscopy,stat="lRank",limits=u)
# Examples of control limits for comparisons
# with Li et al. (2019) and (2020) but
# using a limited number of Monte Carlo
# replications
# Lepage: in Li et al. (2019) is estimated as 11.539
shewhart.normal.limits(5, 25, stat="Lepage", L=10000)
# Cucconi: in Li et al. (2020) is estimated as 0.266
shewhart.normal.limits(5, 25, stat="Cucconi", L=10000)