Calculate the Hotelling T2 statistic for multivariate observations at phase I , to be used to build the corresponding control chart.
T2.1(estat, m, n)
estat | The values of the auxiliary statistics. Should be a list with a matrix with the means, mean of the means and mean of the standard deviation. |
---|---|
m | The number of samples generated previously in data.1. |
n | The size of each samples used previously in data.1. |
Return a vector with the Hotelling T2 statistics.
Before using this function it is necessary to execute the function "stats"(that calculate the auxiliary statistics involved in the T2 formula) and the function "data.1" (or other way to supply the data).
Montgomery, D.C.,(2008)."Introduction to Statistical Quality Control". Chapter 11. Wiley.
mu <- c(5.682, 88.22) Sigma <- symMatrix(c(3.770, -5.495, 13.53), 2) #Example with individual observations datum <- data.1(50, 1, mu, Sigma) estat <- stats(datum, 50, 1, 2) T2.1(estat, 50, 1)#> [1] 1.70393616 1.52603545 4.57424631 2.57167580 1.45946116 2.04823327 #> [7] 2.07626184 0.96368073 0.14469419 9.09865562 0.95385386 1.80933984 #> [13] 0.84601182 0.57352583 0.56879522 6.78878839 2.93346288 3.49626961 #> [19] 1.32341297 2.22732447 2.01866974 0.85121105 1.13773160 2.53454461 #> [25] 2.36659026 0.39034679 0.35035500 0.35366399 0.28283926 4.26857131 #> [31] 0.14336397 0.09096052 1.24569750 2.37577823 4.30412683 4.40488812 #> [37] 4.45329732 1.18773117 3.39876837 0.67088358 0.70556054 5.55012695 #> [43] 3.05520524 2.06204127 0.65397581 2.01775536 1.16778982 1.08142986 #> [49] 0.35547845 0.51986641#Example with sub group observations datum <- data.1(20, 10, mu, Sigma) estat <- stats(datum, 20, 10, 2) T2.1(estat, 20, 10)#> [1] 0.708320560 0.915680366 1.539475141 1.734386418 1.711439513 0.379427775 #> [7] 0.086175376 2.339775303 0.597399552 0.949059906 4.556532587 1.894171365 #> [13] 0.444928010 3.586527522 1.354118921 1.446144483 0.254988883 0.184741689 #> [19] 0.008514039 0.441329212