TransWikia.com

Using the Hotelling package in R

Cross Validated Asked by pitchounet on January 4, 2021

I have two samples of data in $mathbb{R}^2$, assumed drawn from a gaussian distribution, and I would like to test whether the two samples have the same mean. I know that the right test to do this is the Hotelling T2 test and I would like to use the Hotelling package available in R. However, in the documentation of the hotelling.test function in R, I do not see any assumption on the covariance matrices of the two samples. It is implicitly assumed that the two samples must have equal covariance matrices or does that mean that I can use this test even if the two samples do not have equal covariance matrices?

One Answer

What matters is if the two samples comes from populations with the same population covariance matrix, the sample covariance matrices will in practice always differ. If the population covariance matrices differ, there must be some extension of the T2 test as in the case for the univariate t-test. But

I know that the right test to do this is the Hotelling T2 test and I would like to use the Hotelling package available in R.

In which sense the best? Under normality assumptions which in practice is stronger in the multivariate case. So it can pay to look for alternatives, and logistic regression can be a good alternative. This is discussed many places, for instance in section 10.1.4 in F Harrell's Regression Modelling Strategies (second edition). Some links at this site is T-tests, manova or logistic regression - how to compare two groups? or Logistic regression or T test?. Another relevant paper at JSTOR.

If you go with the T2 test, here is a page with code examples.

Answered by kjetil b halvorsen on January 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP