mardiatest {MVET}R Documentation

Mardia Test for Multivariate Normality Test

Description

Performs a multivariate normality test by conducting a mardia test using skewness and kurtosis. If both skewness and kurtosis are satisfied, multivariate normality is satisfied.

Usage

mardiatest(data,
           level = 0.05,
           showplot = FALSE,
           showoutlier = FALSE,
           outlieropt = "all",
           shownewdata = FALSE)

Arguments

data

A numeric matrix or data frame.

level

The significance level of the skewness and kurtosis statistics. (default = 0.05)

showplot

If TRUE, show a chi-square Q-Q plot using ggplot2. If 'showoutlier' is TRUE, outliers are also displayed. (default = FALSE)

showoutlier

If TRUE, show the outliers number and count. (default = FALSE)

outlieropt

An "option" in the outlier function. (default = "all")

shownewdata

If TRUE Shows the new data with outliers removed. (default = FALSE)

Value

mult.nomality

Calculate statistics and p-values for skewness and kurtosis to ultimately determine whether multivariate normality is satisfied.

QQPlot

Shows Chi-Square Q-Q plot.

...

Same as the result of outlier

References

Mardia, K. V. (1970), Measures of multivariate skewness and kurtosis with applications. Biometrika, 57(3), 519-530.

Mardia, K. V. (1974), Applications of Some Measures of Multivariate Skewness and Kurtosis in Testing Normality and Robustness Studies. Sankhya, 36, 115-128.

See Also

outlier

Examples

## Simple Mardia Test
data(wine)
class2.wine <- subset(wine, class == 2)[, -1]
mardiatest(class2.wine, level = 0.05, showplot = TRUE)

## Mardia Test and Outlier Detection
data(wine)
class2.wine <- subset(wine, class == 2)[, -1]
mardiatest(class2.wine, level = 0.05, showplot = TRUE,
           showoutlier = TRUE, outlieropt = "all", shownewdata = TRUE)



[Package MVET version 0.1.0 Index]