title: Power for Hotelling's T^2 test
body: <p>I am trying to estimate the performance of the hotelling's T^2 test. I simulate various test from assumptions of normality and also equal covariance matrix. I succeed in computing the level of the test with the following formula.</p>
  <pre><code>#Generate two groups with equal multivariate vector of means but different covariances
  ## From the multivariate normal distributions
  library(MASS)
  set.seed(123)
  X&lt;-mvrnorm(50,rep(0,10),diag(rep(1,10)))
  Y&lt;-mvrnorm(50,rep(0,10),diag(rep(3,10)))
  
  #Two sample Hotelling T^2 test
  library(ICSNP)
  HotellingsT2(X, Y)
  
  # Performance of the test
  ## Significant level
  n=10000 # testing 10,000 times
  t1err=0
  for (i in 1:n){
     X&lt;-mvrnorm(50,rep(0,10),diag(rep(1,10)))
     Y&lt;-mvrnorm(50,rep(0,10),diag(rep(3,10)))
     if (((HotellingsT2(X, Y))$p.value)&lt;=0.05) (t1err=t1err+1) 
  }
  cat(&quot;The significance level in percentage is&quot;, (t1err/n)*100,&quot;%&quot;)
  </code></pre>
  <p>Now my aim is to compute the power of the test. I notice there is no option for hotelling's T^2 in the power package.
  So how can I compute the power of that test manually or any tips to compute a type II error of the test?</p>