R/r.con.R

"r.con" <- 
  function(rho,n,p=.95,twotailed=TRUE) {
   z <- fisherz(rho)
   if(n<4) {stop("number of subjects must be greater than 3")}
   se <- 1/sqrt(n-3)
   p <- 1-p 
   if(twotailed) p<- p/2
   dif <- qnorm(p)
   zlow <- z + dif*se
   zhigh <- z - dif*se
   ci <- c(zlow,zhigh)
   ci <- fisherz2r(ci)
   return(ci)
   }
 
 
   
"r2t" <- 
   function(rho,n) {
   return( rho*sqrt((n-2)/(1-rho^2))) }
   

Try the psych package in your browser

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

psych documentation built on Sept. 26, 2023, 1:06 a.m.