R/fisher_z_transform.R

Defines functions fisher_z_transform

Documented in fisher_z_transform

#' Fisher's Z transformation
#'
#' Perform Fisher's r-to-Z transformation for given correlation coefficient(s).
#'
#' @param r a (vector of) correlation coefficient(s)
#' @return the output will be a vector of Z values which were transformed
#' from the given r values.
#' @examples
#' fisher_z_transform(0.99)
#' fisher_z_transform(r = seq(0.1, 0.5, 0.1))
#' @export
fisher_z_transform <- function(r = NULL) {
  return(1/2 * log((1 + r) / (1 - r)))
}

Try the kim package in your browser

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

kim documentation built on Oct. 9, 2023, 5:08 p.m.