runs.2cat {ANSM5} | R Documentation |
Perform Runs test for two categories
Description
runs.2cat()
performs the Runs test for two categories and is used in chapters 4, 5 and 6 of "Applied Nonparametric Statistical Methods" (5th edition)
Usage
runs.2cat(
x,
alternative = c("two.sided", "less", "greater"),
cont.corr = TRUE,
do.asymp = FALSE,
do.exact = TRUE
)
Arguments
x |
Vector with two unique values |
alternative |
Type of alternative hypothesis (defaults to |
cont.corr |
Boolean indicating whether or not to use continuity correction (defaults to |
do.asymp |
Boolean indicating whether or not to perform asymptotic calculations (defaults to |
do.exact |
Boolean indicating whether or not to perform exact calculations (defaults to |
Value
An ANSMtest object with the results from applying the function
Examples
# Example 4.14 from "Applied Nonparametric Statistical Methods" (5th edition)
runs.2cat(ch4$tosses1, do.exact = FALSE, do.asymp = TRUE)
# Exercise 6.17 from "Applied Nonparametric Statistical Methods" (5th edition)
runs.2cat(ch6$twins, alternative = "greater")
[Package ANSM5 version 1.1.0 Index]