Calculate T² for new (Phase II) observations using Phase I reference parameters. For individual observations: \(T^2 = (x_{new} - \bar{\bar{x}})' S^{-1} (x_{new} - \bar{\bar{x}})\). For subgroups: \(T^2 = n (\bar{x}_{new} - \bar{\bar{x}})' S^{-1} (\bar{x}_{new} - \bar{\bar{x}})\).
Arguments
- datum2
Phase II data. For \(n = 1\): a numeric vector of length \(p\). For \(n > 1\): an \(n \times p\) matrix.
- estat
List from
stats(Phase I estimates).- n
Subgroup size. Use \(n = 1\) for individual observations, \(n > 1\) for subgroups.
Details
Before using this function it is necessary to execute stats
(that calculates the auxiliary statistics involved in the T² formula) and
the function data.2 (or other way to supply the data).
References
Montgomery, D.C., (2009). "Introduction to Statistical Quality Control". Chapter 11. Wiley.
Examples
mu <- c(5.682, 88.22)
Sigma <- miscTools::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)
datum2 <- data.2(estat, 1, p = 2)
T2II <- T2.2(datum2, estat, 1)
#Example with subgroup observations
datum <- data.1(20, 10, mu, Sigma)
estat <- stats(datum, 20, 10, 2)
datum2 <- data.2(estat, 10, p = 2)
T2II <- T2.2(datum2, estat, 10)