Skip to contents

Compute the reference statistics needed by T2.1 and T2.2 from Phase I data. Returns a list with: [[1]] grand mean vector (\(\bar{\bar{x}}\)), [[2]] pooled covariance matrix (\(\bar{S}\)), [[3]] matrix of subgroup means.

Usage

stats(datum, m, n, p)

Arguments

datum

For \(n = 1\): \(m \times p\) matrix. For \(n > 1\): \(n \times p \times m\) array.

m

Number of subgroups.

n

Subgroup size.

p

Dimension.

Value

A list with three components: grand mean (vector), pooled covariance (matrix), subgroup means (\(m \times p\) matrix).

Details

To use this function it is necessary to have the information from data.1.

Phase convention

Designed for Phase I reference data.

See also

Author

Daniela R. Recchia, Emanuel P. Barbosa

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)
#Example with sub-group observations
datum <- data.1(20, 10, mu, Sigma)
estat <- stats(datum, 20, 10, 2)