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
rho.to.rootS2.R
`rho.to.rootS2` <-
function(mu, p, rho, crit=1e-6, maxiter=20)
{
tc.cor <- tetra1(c(mu,mu), rho, crit=crit, maxiter=maxiter);
if (tc.cor[[2]])
{
return( list( rootSigma=NULL, sigma=NULL, pd=NA, sp=F, i=NA, j=NA ) )
}
pd <- as.logical( tc.cor[[1]] > ( -1/(p-1) ) )
if (pd) { return( list( rootSigma = sqrt( tc.cor[[1]] ), sigma = NULL, pd=T, sp=T, i=NA, j=NA ) ) }
else { return( list( rootSigma=NULL, sigma=tc.cor[[1]], pd=F, sp=T, i=NA, j=NA ) ) }
}