R/isvarcor.R

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
isvarcor <-
function(t.pval, sigma) {
  
  alpha <- t.pval
  sigmals <- sigma
  
  c <- abs(qnorm(alpha/2))
  
  psi <- pnorm(c) - pnorm(-c) 
  tau <- psi - 2*c*dnorm(c)
  
  xi_sq <- tau/psi
  
  xi <- sqrt(xi_sq)
  corrxi <- 1/xi
  
  sigmacorr <- sigmals * corrxi
  
  object <-  data.frame(cbind(sigmacorr, corrxi))
  names(object) <- c("sigma.cor", "corxi")
  return(object)
}

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.