sgn.test {ANSM5} | R Documentation |
Perform Sign test
Description
sgn.test()
performs the Sign test and is used in chapters 3, 4, 5 and 6 of "Applied Nonparametric Statistical Methods" (5th edition)
Usage
sgn.test(
x,
H0 = NULL,
alternative = c("two.sided", "less", "greater"),
cont.corr = TRUE,
CI.width = 0.95,
max.exact.cases = 1e+06,
do.asymp = FALSE,
do.exact = TRUE,
do.CI = TRUE
)
Arguments
x |
Numeric vector, or binary factor and H0 is NULL |
H0 |
Null hypothesis value (defaults to |
alternative |
Type of alternative hypothesis (defaults to |
cont.corr |
Boolean indicating whether or not to use continuity correction (defaults to |
CI.width |
Confidence interval width (defaults to |
max.exact.cases |
Maximum number of cases allowed for exact calculations (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 |
do.CI |
Boolean indicating whether or not to perform confidence interval calculations (defaults to |
Value
An ANSMtest object with the results from applying the function
Examples
# Example 3.1 from "Applied Nonparametric Statistical Methods" (5th edition)
sgn.test(ch3$sampleI, 110)
# Exercise 6.2 from "Applied Nonparametric Statistical Methods" (5th edition)
sgn.test(ch5$LVF - ch5$RVF, 0)