Skip to content

Instantly share code, notes, and snippets.

@carbocation
Last active September 16, 2021 13:49
Show Gist options
  • Save carbocation/504d88d7a16e014455df3aacd759fc0f to your computer and use it in GitHub Desktop.
Save carbocation/504d88d7a16e014455df3aacd759fc0f to your computer and use it in GitHub Desktop.
invnorm
# See Yang et al Nature 2012 https://www.nature.com/articles/nature11401
# supplement page 18
invnorm <- function(x) {
qnorm((rank(x, na.last="keep")-0.5)/sum(!is.na(x)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment