Skip to contents

One-sample Kolmogorov-Smirnov test

Usage

ks_test_one_sample(x, cdf = "pnorm", args = list())

Arguments

x

Numeric vector.

cdf

Name of a CDF function (e.g. "pnorm", "pexp"). Defaults to "pnorm". A bare distribution name like "norm" is auto-prefixed.

args

List of extra arguments to pass to cdf.

Value

An object of class "morie_test_result".

Examples

set.seed(1)
res <- ks_test_one_sample(rnorm(40), cdf = "norm")
res
#> KS test (1-sample, pnorm)
#> -------------------------
#>   statistic = 0.138097
#>   p-value   = 0.3945
#>   n         = 40