R: Cramer-Von Mises Test of Goodness-of-Fit

cvm.test {goftest} | R Documentation

## Cramer-Von Mises Test of Goodness-of-Fit

### Description

Performs the Cramer-von Mises test of goodness-of-fit to a specified continuous univariate probability distribution.

### Usage

    cvm.test(x, null = "punif", ..., nullname)

### Arguments

`x` | Numeric vector of data values.
`null` | A function, or a character string giving the name of a function, to compute the cumulative distribution function for the null distribution.
`...` | Additional arguments for the cumulative distribution function.
`nullname` | Optional character string describing the null distribution. The default is `"uniform distribution"`.

### Details

This command performs the Cramer-von Mises test of goodness-of-fit to the distribution specified by the argument `null`. It is assumed that the values in `x` are independent and identically distributed random values, with some cumulative distribution function F. The null hypothesis is that F is the function specified by the argument `null`, while the alternative hypothesis is that F is some other function.

### Value

An object of class `"htest"` representing the result of the hypothesis test.

### Author(s)

Adrian Baddeley.

### References

Csorgo, S. and Faraway, J.J. (1996) The exact and asymptotic distributions of Cramer-von Mises statistics. Journal of the Royal Statistical Society, Series B 58, 221–234.

### See Also

`pCvM` for the null distribution of the test statistic.

### Examples

    x <- rnorm(10, mean=2, sd=1)
    cvm.test(x, "pnorm", mean=2, sd=1)

[Package goftest version 1.1-1 Index]