Functions z2p()
and p2z()
functions are the inverse of each other.
Arguments
- p
A numerical vector with centiles.
- scale
The maximum of the scale. The default (100
) returns for
percentiles. Set scale = 1
to obtain probabilities.
Value
A vector with length(p)
elements containing centiles.
Author
Stef van Buuren, 2021
Examples
p <- c(2.5, 10, 50, 90, 97.5)
p2z(p)
#> [1] -1.959964 -1.281552 0.000000 1.281552 1.959964