Next: mlcrit() Up: Multivariate Macros Help File Previous: hotellval()   Contents

# hotell2val()

Usage:
 ```hotell2val(x1, x2 [, pval:T]), REAL matrices x1 and x2 with no MISSING elements and ncols(x1) = ncols(x2) ```

Keywords: hotelling tsq, hypothesis tests
```hotell2val(x1, x2), where x1 and x2 are REAL matrices with n1 and n2
rows and p columns, returns Hotelling's two-sample T^2 statistic for
testing the null hypothesis that the rows of x1 have the same mean as
the rows of x2 when they are considered as independent random samples
from two multivariate populations.  The statistic assumes that the
variance-covariance matrix is the same in the two populations.

It is an error if n1 + n2 <= p.

hotell2val(x1, x2, pval:T) does the same, except it also computes a
P-value under the assumption that the rows of x1 and of x2 constitute
independent random samples from multivariate normal distributions with
the same variance-covariance matrix.  The result is
structure(hotelling:tsq, pvalue:pval).