This function is used to compute statistics required by the Multivariate Cumulative Sum (MCUSUM) chart.
Usage
mqcs.mcusum(x, ...)
# S3 method for default
mqcs.mcusum(
x,
data.name = NULL,
limits = NULL,
Xmv = NULL,
S = NULL,
k = 0.5,
h = 5.5,
method = "sw",
plot = FALSE,
...
)
# S3 method for mqcd
mqcs.mcusum(
x,
limits = NULL,
Xmv = NULL,
S = NULL,
k = 0.5,
h = 5.5,
method = "sw",
plot = FALSE,
...
)
Arguments
- x
An object of class 'mqcd'.
- ...
Arguments passed to or from methods.
- data.name
A string that specifies the title displayed on the plots. If not provided it is taken from the name of the object
x
.- limits
A two-values vector specifying the control limits.
- Xmv
The mean vector. It is only specified for Phase II or when the parameters of the distribution are known.
- S
The sample covariance matrix. It is only used for Phase II or when the parameters of the distribution are known.
- k
A constant used in MCUSUM chart. Frequently k = 0.5
- h
A constant used in MCUSUM chart. Usually h = 5.5
- method
The method employed to compute the covariance matrix in the individual observation case. Two methods are used "sw" for compute according to (Sullivan,Woodall 1996a) and "hm" by (Holmes,Mergen 1993)
- plot
Logical value. If
TRUE
a mcusum chart should be plotted.
Examples
##
## Continuous data
##
library(qcr)
data(dowel1)
str(dowel1)
#> 'data.frame': 40 obs. of 2 variables:
#> $ diameter: num 0.492 0.501 0.491 0.492 0.505 0.5 0.497 0.509 0.49 0.499 ...
#> $ length : num 0.988 1.011 1.008 0.97 1.003 ...
data.mqcd <- mqcd(dowel1)
res.mqcs <- mqcs.mcusum(data.mqcd)
summary(res.mqcs)
#>
#> Summary of group statistics:
#> V1
#> Min. :0.0000
#> 1st Qu.:0.7749
#> Median :1.1501
#> Mean :1.3818
#> 3rd Qu.:1.9987
#> Max. :3.8409
#>
#> Number of quality characteristics: 2
#> Number of samples or observations: 40
#> Number of observations or sample size: 1
#>
#> Mean Vector:
#> 0.500875 1.001825
#> Covariance Matrix:
#> diameter length
#> [1,] 4.908654e-05 8.584936e-05
#> [2,] 8.584936e-05 4.199429e-04
#>
#> Control limits:
#> lcl ucl
#> 0.0 5.5
#>
#> Number beyond limits: 0
plot(res.mqcs, title =" MCUSUM Control Chart for dowel1")