Computes the test statistic shared by the post-clustering inference
functions test.clusters.hc, test.clusters.km, and
test.clusters.MC: the V-norm of the difference between the means
of two selected clusters, \(\|\nu^\top X\|_V = \sqrt{(\nu^\top X)^\top V^{-1} (\nu^\top X)}\),
where \(\nu^\top X\) is the difference of cluster means and
\(V = (\nu^\top U \nu)\,\Sigma\), with \(\nu\) the contrast vector
between the two selected clusters.
Arguments
- cl
Integer (or factor) vector of length \(n\) giving the cluster assignment of each observation.
- clusters
Integer vector of length 2 specifying the pair of clusters to compare. Both entries must be present in
cl.- X
A numeric \(n \times p\) data matrix.
- U
An \(n \times n\) positive-definite matrix describing the dependence structure between the rows of
X.- Sigma
A \(p \times p\) positive-definite matrix describing the dependence structure between the columns of
X.