hotel2T2: Hotelling's multivariate version of the 2 sample t-test for...

View source: R/hotel2T2.R

Hotelling's multivariate version of the 2 sample t-test for Euclidean dataR Documentation

Hotelling's multivariate version of the 2 sample t-test for Euclidean data

Description

Hotelling's test for testing the equality of two Euclidean population mean vectors.

Usage

hotel2T2(x1, x2, a = 0.05, R = 999, graph = FALSE)

Arguments

x1

A matrix containing the Euclidean data of the first group.

x2

A matrix containing the Euclidean data of the second group.

a

The significance level, set to 0.05 by default.

R

If R is 1 no bootstrap calibration is performed and the classical p-value via the F distribution is returned. If R is greater than 1, the bootstrap p-value is returned.

graph

A boolean variable which is taken into consideration only when bootstrap calibration is performed. IF TRUE the histogram of the bootstrap test statistic values is plotted.

Details

Multivariate analysis of variance assuming equality of the covariance matrices. The p-value can be calculated either asymptotically or via bootstrap.

Value

A list including:

mesoi

The two mean vectors.

info

The test statistic, the p-value, the critical value and the degrees of freedom of the F distribution (numerator and denominator). This is given if no bootstrap calibration is employed.

pvalue

The bootstrap p-value is bootstrap is employed.

note

A message informing the user that bootstrap calibration has been employed.

runtime

The runtime of the bootstrap calibration.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Everitt B. (2005). An R and S-Plus Companion to Multivariate Analysis p. 139-140. Springer.

See Also

james, maov, el.test2, eel.test2, comp.test

Examples

hotel2T2( as.matrix(iris[1:25, 1:4]), as.matrix(iris[26:50, 1:4]) )
hotel2T2( as.matrix(iris[1:25, 1:4]), as.matrix(iris[26:50, 1:4]), R = 1 )
james( as.matrix(iris[1:25, 1:4]), as.matrix(iris[26:50, 1:4]) )
james( as.matrix(iris[1:25, 1:4]), as.matrix(iris[26:50, 1:4]), R = 1 )

Compositional documentation built on Oct. 23, 2023, 5:09 p.m.