https://github.com/cran/mvtBinaryEP
Tip revision: e03023db232593f436717e7be27d1c52d9865644 authored by Kunthel By on 18 February 2009, 00:00:00 UTC
version 1.0
version 1.0
Tip revision: e03023d
ranMvBinEp2.R
`ranMvBinEp2` <-
function(rootS, u, nReps, seed)
{
if (missing(seed)){z <- ranMVN2(nRep=nReps, rootS)}
else {z <- ranMVN2(nRep=nReps, rootS,seed=seed)}
cuts <- matrix(rep(qnorm(u),nReps),nReps,byrow=T)
y <- ifelse(z <= cuts, 1 ,0)
return(y)
}