R/p2z.R

Defines functions p2z

Documented in p2z

p2z <- function(p, type="two.sided"){
  if(min(p) <=0 || max(p) >1)
    stop("All elements of p must lie in (0,1]!")
  if(type=="two.sided")
    z <- qnorm(p/2, lower.tail=FALSE)
  if(type=="one.sided")
    z <- qnorm(p, lower.tail=FALSE)
  return(z)
}

Try the pCalibrate package in your browser

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

pCalibrate documentation built on March 20, 2020, 1:09 a.m.