- x
A data frame that can be coerced into a tibble.
- formula
A formula with the response variable on the left and the
explanatory on the right, where an explanatory variable NULL indicates
a test of a single proportion.
- response
The variable name in x
that will serve as the response.
This is alternative to using the formula
argument. This is an alternative
to the formula interface.
- explanatory
The variable name in x
that will serve as the
explanatory variable. Optional. This is an alternative to the formula
interface.
- p
A numeric vector giving the hypothesized null proportion of
success for each group.
- order
A string vector specifying the order in which the proportions
should be subtracted, where order = c("first", "second")
means
"first" - "second"
. Ignored for one-sample tests, and optional for two
sample tests.
- alternative
Character string giving the direction of the alternative
hypothesis. Options are "two-sided"
(default), "greater"
, or "less"
.
Only used when testing the null that a single proportion equals a given
value, or that two proportions are equal; ignored otherwise.
- conf_int
A logical value for whether to report the confidence
interval or not. TRUE
by default, ignored if p
is specified for a
two-sample test. Only used when testing the null that a single
proportion equals a given value, or that two proportions are equal;
ignored otherwise.
- conf_level
A numeric value between 0 and 1. Default value is 0.95.
Only used when testing the null that a single proportion equals a given
value, or that two proportions are equal; ignored otherwise.
- success
The level of response
that will be considered a success, as
a string. Only used when testing the null that a single
proportion equals a given value, or that two proportions are equal;
ignored otherwise.
- correct
A logical indicating whether Yates' continuity correction
should be applied where possible. If z = TRUE
, the correct
argument will
be overwritten as FALSE
. Otherwise defaults to correct = TRUE
.
- z
A logical value for whether to report the statistic as a standard
normal deviate or a Pearson's chi-square statistic. \(z^2\) is distributed
chi-square with 1 degree of freedom, though note that the user will likely
need to turn off Yates' continuity correction by setting correct = FALSE
to see this connection.
- ...
Additional arguments for prop.test().