| iscamtwopropztest | R Documentation |
iscamtwopropztest calculates a two-proportion z-test and/or a corresponding confidence interval.
iscamtwopropztest(
observed1,
n1,
observed2,
n2,
hypothesized = 0,
alternative = NULL,
conf.level = NULL,
datatable = NULL,
verbose = TRUE
)
observed1 |
The observed number of successes in group 1. If a value less than 1 is provided, it is assumed to be the sample proportion. |
n1 |
The sample size for group 1. |
observed2 |
The observed number of successes in group 2. If a value less than 1 is provided, it is assumed to be the sample proportion. |
n2 |
The sample size for group 2. |
hypothesized |
(optional) hypothesized difference in probability of success under the null hypothesis. |
alternative |
(optional) character string specifying the form of the alternative hypothesis. Must be one of "less", "greater", or "two.sided". |
conf.level |
(optional) confidence level(s) for a two-sided confidence interval. |
datatable |
(optional) two-way table of counts as an alternative input method. |
verbose |
Logical, defaults to |
This function prints the results of the two-proportion z-test and/or the confidence interval. It also generates plots to visualize the test and interval.
iscamtwopropztest(observed1 = 35, n1 = 50, observed2 = 28, n2 = 45)
iscamtwopropztest(
observed1 = 0.8,
n1 = 100,
observed2 = 0.6,
n2 = 80,
hypothesized = 0,
alternative = "greater",
conf.level = 0.95
)
iscamtwopropztest(observed1 = 60, n1 = 100, observed2 = 45, n2 = 90, conf.level = 0.90)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.