Computes the z-statistic and the corresponding p-value for a given test.
Arguments
- value1
(numeric): The first value or sample mean.
- value2
(numeric): The second value or sample mean.
- std_diff
(numeric): The standard error of the difference between the two values.
- alternative
(character): The alternative hypothesis. Can be one of "two-sided" (or "2-sided", "2s"), "larger" (or "l"), or "smaller" (or "s").
- diff
(numeric, optional): The hypothesized difference between the two values. Default is 0.