# kolmogorov: Kolmogorov In NSM3: Functions and Datasets to Accompany Hollander, Wolfe, and Chicken - Nonparametric Statistical Methods, Third Edition

## Description

Function to compute the asymptotic P-value for the observed Kolmogorov D statistic.

## Usage

 `1` ```kolmogorov(x,fnc,...) ```

## Arguments

 `x` a vector of data of length n `fnc` the functional form of the pdf of F0. The first argument must be the data. `...` all the parameters besides the data that fnc needs to operate. (See below for an example using pnorm and pexp)

## Value

The function returns a list with two elements:

 `D` the value of the Kolmogorov statistic `p` the corresponding probability

Rachel Becvarik

## Examples

 ```1 2 3``` ```velocity<-c(12.8, 12.9, 13.3, 13.4, 13.7, 13.8, 14.5) kolmogorov(velocity,pnorm, mean=14,sd=2) kolmogorov(velocity,pexp,1/2) ```

### Example output

```Loading required package: combinat

Attaching package: 'combinat'

The following object is masked from 'package:utils':

combn

D= 0.4012937
p= 0.157072
\$D
[1] 0.4012937

\$p
[1] 0.157072

D= 0.9983384
p= 6.992576e-20
\$D
[1] 0.9983384

\$p
[1] 6.992576e-20
```

NSM3 documentation built on April 6, 2021, 5:05 p.m.