ks.test: Kolmogorov-Smirnov test

Description Usage Arguments Value Constraints See Also Examples

Description

Perform a one- or two-sample Kolmogorov-Smirnov test.

Usage

1
2
ks.test(x, y = NULL, mean = NULL, sd = NULL, ...,
  alternative = "two.sided", exact = NULL)

Arguments

x

a FLVector of data values.

y

either a FLVector of data values, or a character string naming a cumulative distribution function or an actual cumulative distribution function such as pnorm. Only continuous CDFs are valid.

Value

A list with class "htest".

Constraints

As of now only supports normal disctribution, alternative and exact isn't supported for FL objects

See Also

ks.test for corresponding R function reference.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(100)
p <- as.FLVector(rnorm(50))
q <- as.FLVector(runif(30))
ks.test(p, y= "NORMAL" , mean=0, sd=1)
         ## One sample K-S test.
res <- ks.test(p, q)
         ## Two sample K-S Test.

#If y is a FLVector, a two-sample test of the null hypothesis that x and y were drawn from the 
#same continuous distribution is performed. Alternatively, y can be a character string naming 
#a continuous (cumulative) distribution function, or such a function. In this case, a one-sample 
#test is carried out of the null that the distribution function which generated x is distribution
#y with parameters.

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.