z2p {ReplicationSuccess} | R Documentation |
Transforms z-values to the corresponding one- or two-sided p-values.
z2p(z, alternative = "two.sided")
z |
a vector of z-values |
alternative |
Specifies direction of the alternative of p-value.
Either |
A numeric vector of p-values
z2p(z = c(1, 2, 5)) z2p(z = c(1, 2, 5), alternative = "less") z2p(z = c(1, 2, 5), alternative = "greater") z <- seq(-3, 3, by = 0.01) plot(z, z2p(z), type = "l", xlab = "z", ylab = "p", ylim = c(0, 1)) lines(z, z2p(z, alternative = "greater"), lty = 2) legend("topright", c("two-sided", "greater"), lty = c(1, 2), bty = "n")