R/intnorm.R

Defines functions intnorm

Documented in intnorm

# Inverse Normal Transformation (INT)
intnorm <- function(x) {
  if (is.vector(x) && is.numeric(x)) {
    xrank <- rank(x, na.last = "keep")
    xnorm <- qnorm((xrank-0.5) / sum(!is.na(x)))
  } else {
    stop("A numeric vector is required to transform!")
  }
  return(xnorm)
}

Try the groupcompare package in your browser

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

groupcompare documentation built on June 26, 2025, 1:08 a.m.