mardia: The Mardia's test of normality

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/mardia.R

Description

Performs the Mardia's test to check for multivariate normality

Usage

1

Arguments

data

The dataset containing the features for which multivariate normality is going to be tested. The last column contains the class. In case of unsupervised data add a dummy colummn of ones. In case of regression data, transform the response column in a column of ones

Value

Returns the p-values for the corresponding third and fourth moments of the multivariate normal distribution.

Author(s)

Edgar Acuna

References

Mardia, K.V. (1985). "Mardia's Test of Multinormality," in S. Kotz and N.L. Johnson, eds., Encyclopedia of Statistical Sciences, vol. 5 (NY: Wiley), pp. 217-221.

See Also

vvalen

Examples

1
2
3
#-----Mardia test for supervised data-----
data(iris)
mardia(iris)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
[1] 3
Mardia's test for class 1 
mard1= 24.15508 
pvalue for m3= 0.2356838 
mard2= 0.7587116 
p-value for m4= 0.4480251 
There is statistical evidence for normality 
Mardia's test for class 2 
mard1= 23.70393 
pvalue for m3= 0.2555643 
mard2= -1.034219 
p-value for m4= 0.3010336 
There is statistical evidence for normality 
Mardia's test for class 3 
mard1= 24.72568 
pvalue for m3= 0.2121282 
mard2= -0.3384283 
p-value for m4= 0.7350404 
There is statistical evidence for normality 

dprep documentation built on May 29, 2017, 11:01 a.m.