## The function is currently defined as
function (E, rho)
{
H <- mhalf(solve(matrix(c(1, rho, rho, 1), 2, 2)))
EM <- cbind(E[upper.tri(E)], t(E)[upper.tri(E)]) %*% H
1/rgamma(1, (length(EM) + 1)/2, (sum(EM^2) + 1)/2)
}
Run the code above in your browser using DataLab