iscam_twopropztest: iscam_twopropztest Function

Description Usage Arguments Examples

Description

This function calculates a two proportion z-test and/or interval.

Usage

1
2
iscam_twopropztest(observed1, n1, observed2, n2, hypothesized = 0,
  alternative = NULL, conf.level = NULL, datatable = NULL)

Arguments

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.

Examples

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))

apjacobson/iscam documentation built on May 6, 2019, 12:08 p.m.