Learn R Programming

fBasics (version 4021.93)

ks2Test: Two sample Kolmogorov-Smirnov test

Description

Tests if two series are distributionally equivalent.

Usage

ks2Test(x, y, title = NULL, description = NULL)

Value

an object from class fHTEST

Arguments

x, y

numeric vectors of data values.

title

an optional title string, if not specified the inputs data name is deparsed.

description

optional description string, or a vector of character strings.

Author

R-core team for hypothesis tests implemented from R's package ctest.

Details

The test ks2Test performs a Kolmogorov-Smirnov two sample test that the two data samples, x and y, come from the same distribution, not necessarily a normal distribution. That means that it is not specified what that common distribution is.

References

Conover, W. J. (1971); Practical nonparametric statistics, New York: John Wiley & Sons.

Lehmann E.L. (1986); Testing Statistical Hypotheses, John Wiley and Sons, New York.

Examples

Run this code
set.seed(1234)
## rnorm - 
   # Generate Series:
   x = rnorm(50)
   y = rnorm(50)
  
## ks2Test - 
   ks2Test(x, y)

Run the code above in your browser using DataLab