simpleCvMgof {Dogoftest} | R Documentation |
Perform a Simple Cramer-von Mises Goodness-of-Fit Test
Description
This function performs a simple Cramer-von Mises goodness-of-fit test to assess whether a given sample comes from a uniform distribution. The test statistic and p-value are calculated based on the sorted sample data.
Usage
simpleCvMgof(X)
Arguments
X |
A numeric vector containing the sample data. |
Value
statistic |
The value of the Cramer-von Mises test statistic. |
pvalue |
The p-value for the test. |
statname |
The name of the test statistic. |
Examples
# Example usage:
set.seed(123)
X <- runif(100) # Generate a sample from a uniform distribution
result <- simpleCvMgof(X)
print(result)
# Example with non-uniform data:
Y <- rnorm(100) # Generate a sample from a normal distribution
result <- simpleCvMgof(Y)
print(result)
[Package Dogoftest version 0.2 Index]