Learn R Programming

HydroPortailStats (version 1.1.0)

KS: Kolmogorov-Smirnov Test

Description

Applies a one-sample Kolmogorov-Smirnov test (see ?stats::ks.test)

Usage

KS(y, dist, par)

Value

A list with the following components:

pval

numeric, p-value of the test

stat

numeric, test statistics

xtra

numeric, xtra information: empty for this test

Arguments

y

numeric vector, data

dist

character, distribution name

par

numeric vector, parameter vector

Examples

Run this code
y=stats::rnorm(20)
KS(y,'Normal',c(0,1))
KS(y,'Normal',c(1,1))
KS(y,'Gumbel',c(0,1))

Run the code above in your browser using DataLab