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

View source: R/NCmisc.R

Z.to.pR Documentation

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

Author(s)

Nicholas Cooper njcooper@gmx.co.uk

See Also

p.to.Z

Examples

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

NCmisc documentation built on Oct. 17, 2022, 5:09 p.m.