R/utils.R

Defines functions chiprod

chiprod <- function(dimension, degrees, iterations = 1) {
  A <- matrix(stats::rchisq(dimension * iterations, (degrees - dimension + 1):degrees),
    nrow = dimension, ncol = iterations
  )
  product <- apply(A, 2, prod)
  return(product)
}

Try the PSinference package in your browser

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

PSinference documentation built on April 4, 2025, 2:08 a.m.