This function calculates p-values from given z-scores using a two-tailed normal distribution. It supports vector input to process multiple z-scores simultaneously.
Details
The function uses the following formula to calculate p-values: p-value = 2 * Φ(-|z|) Where Φ is the cumulative distribution function of the standard normal distribution.
Note
This function assumes that the input z-scores are from a two-tailed test and are normally distributed. It calculates two-sided p-values. For extremely large absolute z-scores, the resulting p-values may be computed as zero due to floating-point limitations in R. This occurs when the absolute z-score > 37.