Learn R Programming

NCmisc (version 1.1.5)

Z.to.p: Convert Z-scores to p-values

Description

Simple conversion of Z-scores to two-tailed p-values. Written in a way that allows maximum precision for small p-values.

Usage

Z.to.p(Z, warn = FALSE)

Arguments

Z

Z score, numeric, scalar, vector or matrix, or other types coercible using as.numeric()

warn

logical, whether to give a warning for very low p-values when precision limits are exceeded.

Value

p-valuues with the same dimension as the input

See Also

p.to.Z

Examples

Run this code
# NOT RUN {
Z.to.p("1.96")
Z.to.p(p.to.Z(0.0001))
Z.to.p(37, TRUE)
Z.to.p(39, TRUE) # maximum precision exceeded, warnings on
Z.to.p(39) # maximum precision exceeded, warnings off
# }

Run the code above in your browser using DataLab