p2z {ReplicationSuccess} | R Documentation |
Transforms one- or two-sided p-values to z-values.
p2z(p, alternative = "two.sided")
p |
a vector of p-values |
alternative |
Specifies direction of the alternative of the p-value.
Either |
A numeric vector of z-values
p2z(p = c(0.005, 0.01, 0.05)) p2z(p = c(0.005, 0.01, 0.05), alternative = "greater") p2z(p = c(0.005, 0.01, 0.05), alternative = "less") p <- seq(0.001, 0.05, 0.0001) plot(p, p2z(p), type = "l", ylim = c(0, 3.5), ylab = "z") lines(p, p2z(p, alternative = "greater"), lty = 2) legend("bottomleft", c("two-sided", "greater"), lty = c(1, 2), bty = "n")