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 ks.test, parameters of the distribution specified (as a character string) by y. Otherwise, further arguments to be passed to or from methods

alternative

Type of alternative hypothesis (defaults to two.sided)

max.exact.cases

Maximum number of cases allowed for exact calculations (defaults to 1000)

do.asymp

Boolean indicating whether or not to perform asymptotic calculations (defaults to FALSE)

do.exact

Boolean indicating whether or not to perform exact calculations (defaults to TRUE)

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)


[Package ANSM5 version 1.1.0 Index]