honeyBunchesOfFloats - 1 year ago 67

R Question

I have a T^2 statistic for a partitioned multivariate dataset with 2 variables, found by calculating a paired comparison test. I want to compare my T^2 number with the T^2_{.95, p, n-1} value, without using a table.

Is there a function or package in R that allows me to find these values?

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Answer Source

According to wikipedia, the T^2 statistic is related to the F statistic via

where .

From this it follows that (and is also written in the article)

In order to calculate a p-value, multiply the t2 statistic by the above constant and use the F-distribution.

Ie if you isolate $t^2$ above, you can just find `qf(.95, p, n - p) * (n-1) * p / (n - p)`

and it should be the relevant T^2 quantile.

Just be careful to read the article and make sure your degrees of freedom match up appropriately.

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**