R/cortocov.R

"cortocov" <-
function(cor.mat, sd){
 dc <- diag(cor.mat)
 ds <- diag(sd)
 Mo <- ds %*% cor.mat %*% ds
 Mo <- Mo - 0.5 * (Mo-t(Mo)) # Correct any round-off error
 Mo <- Mo - diag(diag(Mo)-sd * sd)
 return(Mo)
}

Try the hapsim package in your browser

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

hapsim documentation built on May 1, 2019, 9:11 p.m.