https://github.com/cran/mvtBinaryEP
Tip revision: bd876c4c9cc813f7c7b610832fa2793c250504d0 authored by Kunthel By on 25 January 2011, 00:00:00 UTC
version 1.0.1
version 1.0.1
Tip revision: bd876c4
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)
}