R/Pillai.R

#copied from car package
# which itself has a note that that was a copy of an unexported function from the stats package
Pillai <- function (eig, q, df.res) {
  test <- sum(eig/(1 + eig))
  p <- length(eig)
  s <- min(p, q)
  n <- 0.5 * (df.res - p - 1)
  m <- 0.5 * (abs(p - q) - 1)
  tmp1 <- 2 * m + s + 1
  tmp2 <- 2 * n + s + 1
  c(test, (tmp2/tmp1 * test)/(s - test), s * tmp1, s * tmp2)
}
rohan-shah/mpMap2 documentation built on July 21, 2020, 8:58 p.m.