R/probout.R

Defines functions probout

Documented in probout

probout <- function(mu, su, a) {
  n <- 1e+7 
  z <- Rfast::rmvnorm(n, mu, su)
  D <- dim(z)[2]
  z1 <- z %*% helm(D + 1)
  mi <- abs(a) * Rfast::rowMins(z1, value = TRUE)
  p1 <- mean( mi <  - 1)
  z <- Rfast::rmvnorm(n, mu, su)
  z1 <- z %*% helm(D + 1)
  mi <- abs(a) * Rfast::rowMins(z1, value = TRUE)
  p2 <- mean( mi <  - 1)
  0.5 * (p1 + p2)
}
 

Try the Compositional package in your browser

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

Compositional documentation built on Oct. 23, 2023, 5:09 p.m.