# approx.hotelling.diff.test: Approximate Hotelling T^2-Test for One or Two Population... In ergm: Fit, Simulate and Diagnose Exponential-Family Models for Networks

 approx.hotelling.diff.test R Documentation

## Approximate Hotelling T^2-Test for One or Two Population Means

### Description

A multivariate hypothesis test for a single population mean or a difference between them. This version attempts to adjust for multivariate autocorrelation in the samples.

### Usage

``````approx.hotelling.diff.test(
x,
y = NULL,
mu0 = 0,
assume.indep = FALSE,
var.equal = FALSE,
...
)
``````

### Arguments

 `x` a numeric matrix of data values with cases in rows and variables in columns. `y` an optinal matrix of data values with cases in rows and variables in columns for a 2-sample test. `mu0` an optional numeric vector: for a 1-sample test, the poulation mean under the null hypothesis; and for a 2-sample test, the difference between population means under the null hypothesis; defaults to a vector of 0s. `assume.indep` if `TRUE`, performs an ordinary Hotelling's test without attempting to account for autocorrelation. `var.equal` for a 2-sample test, perform the pooled test: assume population variance-covariance matrices of the two variables are equal. `...` additional arguments, passed on to `spectrum0.mvar()`, etc.; in particular, `⁠order.max=⁠` can be used to limit the order of the AR model used to estimate the effective sample size.

### Value

An object of class `htest` with the following information:

 `statistic` The `T^2` statistic. `parameter` Degrees of freedom. `p.value` P-value. `method` Method specifics. `null.value` Null hypothesis mean or mean difference. `alternative` Always `"two.sided"`. `estimate` Sample difference. `covariance` Estimated variance-covariance matrix of the estimate of the difference. `covariance.x` Estimated variance-covariance matrix of the estimate of the mean of `x`. `covariance.y` Estimated variance-covariance matrix of the estimate of the mean of `y`.

It has a print method `print.htest()`.

### Note

For `mcmc.list` input, the variance for this test is estimated with unpooled means. This is not strictly correct.

### References

Hotelling, H. (1947). Multivariate Quality Control. In C. Eisenhart, M. W. Hastay, and W. A. Wallis, eds. Techniques of Statistical Analysis. New York: McGraw-Hill.

`t.test()`