R/aeS.R

Defines functions aeS

aeS = function(ft, Sn, W, M, alpha){
  p = dim(ft)[1]
  n = dim(ft)[2]
  xi = t(mvrnorm(n = M, mu = rep(0, n), Sn))/sqrt(n)
  G1 = ft %*% xi
  G = W*G1
  rrr <- apply(abs(G),2, max)
  cv = quantile(rrr, 1-alpha)
  return(list(cv = cv, stat = rrr))
}

Try the HDtest package in your browser

Any scripts or data that you put into this service are public.

HDtest documentation built on May 2, 2019, 11:53 a.m.