Learn R Programming

Dogoftest (version 0.3)

cvmgof: Perform the Cramer-von Mises Goodness-of-Fit Test for Normality

Description

Perform the Cramer-von Mises Goodness-of-Fit Test for Normality

Usage

cvmgof(x)

Value

statistic

The value of the Cramer-von Mises test statistic.

p.value

The p-value for the test.

method

A character string describing the test.

Arguments

x

A numeric vector containing the sample data.

Examples

Run this code
# Example usage:
set.seed(123)
x <- rnorm(100)  # Generate a sample from a normal distribution
result <- cvmgof(x)
print(result)

# Example with non-normal data:
y <- rexp(100)  # Generate a sample from an exponential distribution
result <- cvmgof(y)
print(result)

Run the code above in your browser using DataLab