kstest.ANSM {ANSM5} | R Documentation |
Perform Smirnov test and Kolgomorov test
Description
kstest.ANSM()
is a wrapper for ks.test() from the stats
package - performs the Smirnov test and Kolgomorov test and is used in chapters 4, 6 and 9 of "Applied Nonparametric Statistical Methods" (5th edition)
Usage
kstest.ANSM(
x,
y,
...,
alternative = c("two.sided", "less", "greater"),
max.exact.cases = 1000,
do.asymp = FALSE,
do.exact = TRUE
)
Arguments
x |
Numeric vector |
y |
Numeric vector or a character string naming a cumulative distribution function or an actual cumulative distribution function |
... |
For the default method of |
alternative |
Type of alternative hypothesis (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 |
Value
An ANSMtest object with the results from applying the function
Examples
# Exercise 4.3 from "Applied Nonparametric Statistical Methods" (5th edition)
kstest.ANSM(ch4$visiting.supporters, "pexp", rate = 2600)
# Exercise 9.2 from "Applied Nonparametric Statistical Methods" (5th edition)
kstest.ANSM(ch9$boys.toothtime, ch9$girls.toothtime)