mshewhart: Multivariate Shewhart-type control charts

View source: R/mshewhart.R

mshewhartR Documentation

Multivariate Shewhart-type control charts

Description

mshewhart computes, and, optionally, plots, several Shewhart-type Phase I control charts for detecting location and scale changes in multivariate subgrouped data.

mshewhart.normal.limits pre-computes the corresponding control limits when the in-control distribution is multivariate normal.

Usage

mshewhart(x, subset, stat = c("T2Var", "T2", "Var", "Depth Ranks"), score = c("Identity",
  "Signed Ranks",  "Spatial Signs", "Spatial Ranks", "Marginal Ranks"),
  loc.scatter = c("Classic", "Robust"), plot = TRUE, FAP = 0.05,
  seed = 11642257, L = 1000, limits = NA)

mshewhart.normal.limits(p, n, m, stat = c("T2Var", "T2", "Var", "Depth Ranks"),
  score = c("Identity", "Signed Ranks",  "Spatial Signs", "Spatial Ranks",
  "Marginal Ranks"), loc.scatter = c("Classic", "Robust"),
  FAP = 0.05, seed = 11642257, L = 100000) 

Arguments

x

a pxnxm data numeric array (n observations gathered at m time points on p variables).

p

integer: number of monitored variables.

n

integer: size of each subgroup (number of observations gathered at each time point).

m

integer: number of subgroups (time points).

subset

an optional vector specifying a subset of subgroups/time points to be used

stat

character: control statistic[s] to use; see Details.

score

character: transformation to use; unused when stat=Depth Ranks; see Details.

loc.scatter

character: estimates of the multivariate location and scatter to use when no preliminary rank transformation is applied. Unused when stat is equal to Depth Ranks or score is Marginal Ranks. See Details.

plot

logical; if TRUE, control statistic[s] is[are] displayed.

FAP

numeric (between 0 and 1): desired false alarm probability.

seed

positive integer; if not NA, the RNG's state is resetted using seed. The current .Random.seed will be preserved. Unused by mshewhart when limits is not NA.

L

positive integer: number of Monte Carlo replications used to compute the control limits. Unused by mshewhart when limits is not NA.

limits

numeric: pre-computed vector of control limits. This vector should contain (A,B) when stat=T2Var, (A) when stat=T2, (B) when stat=Var and (C) when stat=Depth Ranks. See Details for the definition of the critical values A, B and C.

Details

The implemented control statistics are

  • T2Var: combination of the T2 and Var statistics described below.

  • T2: Hotelling's T^2 control statistics (see Montgomery, 2009, equation 11.19, or Qiu, 2013, equation 7.7) with control limit equal to A.

  • Var: normal likelihood ratio control statistics for detecting changes in the multivariate dispersion (see Montgomery, 2009, equation 11.34), with control limit equal to B.

  • Depth Ranks: control statistics based on the rank of the Mahalanobis depths, proposed by Bell et. al.. As suggested Bell et al., the Mahalanobis depths are computed using the BACON estimates of the multivariate mean vector and the mean of the subgroups sample covariance matrices. An alarm is signalled if any of the statistics is greater than a positive control limit C.

The T2 and Var control statistics are computed

  • score=Identical: from the original data standardized using either the classical pooled estimates of the mean vector and dispersion matrix (Montgomery, 2009, equations 11.14–11.18; Qiu, 2013, equations at page 269) or the highly robust minimum covariance determinant (MCD) estimate when argument loc.scatter is equal to Classic or Robust, respectively.

  • score=Signed Ranks, Spatial Signs, Spatial Ranks, Marginal Ranks: from a “rank” transformation of the original data. In particular, see Hallin and Paindaveine (2005) for the definition of the multivariate signed ranks and Oja (2010) for those of the spatial signs, spatial ranks, and marginal ranks. Multivariate signed ranks, spatial signs and ranks are “inner” standardized while marginal ranks are “outer” standardized (see Oja (2010) for the definition of “inner” and “outer” standardization). When loc.scatter is equal to Classic, inner standardization takes into account the subgroup structure of the data imposing that the average of the within-group covariances of the transformed data is proportional to the identity matrix. Otherwise, i.e., when loc.scatter is equal to Robust, it is based on a standard Hettmansperger-Randles-like scatter estimate. Note that the T^2 control statistics based on the spatial signs corresponds to the control charts suggested by Cheng and Shiau (2015) when loc.scatter is equal to Robust.

Value

mshewhart returns an invisible list with elements:

T2

T^2 control statistic; this element is present only if stat is T2Var or T2.

Var

Var control statistic; this element is present only if stat is T2Var or Var.

DepthRanks

control statistic based on the rank of the Mahalanobis depths; this element is present only if stat is Depth Ranks.

center, scatter

estimates of the multivariate location and scatter used to standardized the observations.

limits

control limits.

stat, score, loc.scatter, FAP, L, seed

input arguments.

mshewhart.normal.limits returns a numeric vector containing the control limits.

Note

  1. When limits is NA, mshewhart computes the control limits by permutation. Then, the resulting control chart is distribution-free.

  2. Pre-computed limits, such as those computed by using mshewhart.normal.limits, are not recommended. Indeed, the resulting control chart will not be distribution-free.

  3. However, when score is Signed Ranks, Spatial Signs, Spatial Ranks or stat is Depth Ranks, the computed control limits are distribution-free in the class of all multivariate elliptical distributions.

Author(s)

Giovanna Capizzi and Guido Masarotto.

References

R. C. Bell, L. A. Jones-Farmer, N. Billor (2014) “A distribution-free multivariate Phase I location control chart for subgrouped data from elliptical distributions”. Technometrics, 56, pp. 528–538, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/00401706.2013.879264")}.

C. R. Cheng, J. J. H. Shiau JJH (2015) “A distribution-free multivariate control chart for Phase I applications”. Quality and Reliability Engineering International, 31, pp. 97–111, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/qre.1751")}.

M. Hallin and D. Paindaveine (2005) “Affine-Invariant Aligned Rank Tests for the Multivariate General Linear Model with VARMA Errors”. Journal of Multivariate Analysis, 93, pp. 122–163, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jmva.2004.01.005")}.

D. C. Montgomery (2009) Introduction to Statistical Quality Control, 6th edn. Wiley.

H. Oja (2010) Multivariate Nonparametric Methods with R. An Approach Based on Spatial Signs and Ranks. Springer.

P. Qiu (2013) Introduction to Statistical Process Control. Chapman & Hall/CRC Press.

Examples

data(ryan)
mshewhart(ryan)
mshewhart(ryan,subset=-10)
mshewhart(ryan,subset=-c(10,20))
mshewhart(ryan,score="Signed Ranks")
mshewhart(ryan,subset=-10,score="Signed Ranks")
mshewhart(ryan,subset=-c(10,20),score="Signed Ranks")

dfphase1 documentation built on July 9, 2023, 7:29 p.m.