Description Usage Arguments Examples
This function calculates a two proportion z-test and/or interval.
1 2 | iscam_twopropztest(observed1, n1, observed2, n2, hypothesized = 0,
alternative = NULL, conf.level = NULL, datatable = NULL)
|
observed1 |
observed number of successes or sample proportions (assumed if value is less than one) |
n1 |
sample size |
observed2 |
observed number of successes (assumed if value is less than one) |
n2 |
sample size |
hypothesized |
hypothesized difference in probability of success/population proportions (default is zero) |
alternative |
form of alternative hypothesis ("less", "greater", or "two.sided") |
conf.level |
Input confidence level(s) for a two-sided confidence interval. |
datatable |
Instead of entering the four individual numbers, you can pass in the two-way table of counts. Be sure to label the datatable in this case. |
1 2 3 | iscam_twopropztest(6, 17, 12, 20, alternative = "less")
iscam_twopropztest(10, 20, 17, 22, conf.level = .95)
iscam_twopropztest(10, 20, 17, 22, conf.level = c(.90, .95))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.