zstat_generic | R Documentation |
Computes the z-statistic and the corresponding p-value for a given test.
zstat_generic(value1, value2, std_diff, alternative, diff = 0)
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. |
(list): A list containing the following:
(numeric): The computed z-statistic.
(numeric): The corresponding p-value for the test.
value1 <- 1.5
value2 <- 1.0
std_diff <- 0.2
alternative <- "two-sided"
result <- zstat_generic(value1, value2, std_diff, alternative)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.