R/mean_cor.R

#' Mean correlation using Fisher-Z-transformation
#'
#' @param ... correlation coefficients to average (either as single numeric,
#'   a numeric vector or a list)
#' @examples
#' mean_cor(.45, .33, .36)
#'
#' @export
mean_cor <- function(...)
{
  dots <- list(...)

  tanh(mean(atanh(unlist(dots))))
}
dgromer/psymisc documentation built on May 15, 2019, 7:22 a.m.