mardia {mvnormalTest} | R Documentation |
Mardia Test (Skewness and Kurtosis) for Multivariate Normality
Description
It computes Mardia (1970)'s multivariate skewness and kurtosis statistics and their corresponding
p-value. Both p-values of skewness and kurtosis statistics should be greater than 0.05 to conclude
multivariate normality. The skewness statistic will be adjusted for sample size n < 20
.
Usage
mardia(X, std = TRUE)
Arguments
X |
an |
std |
if |
Value
Returns a list with two objects:
mv.test
results of the Mardia test, i.e., test statistic, p-value, and multivariate normality summary (YES, if both skewness and kurtosis p-value>0.05).
uv.shapiro
a dataframe with
p
rows detailing univariate Shapiro-Wilk tests. Columns in the dataframe contain test statistics W, p-value,and univariate normality summary (YES, if p-value>0.05).
References
Mardia, K. V. (1970). Measures of multivariate skewness and kurtosis with applications. Biometrika, 57(3), 519-530.
Shapiro, S. S., & Wilk, M. B. (1965). An analysis of variance test for normality (complete samples). Biometrika, 52(3/4), 591-611.
Doornik, J. A., & Hansen, H. (2008). An omnibus test for univariate and multivariate normality. Oxford Bulletin of Economics and Statistics, 70, 927-939.
Zhou, M., & Shao, Y. (2014). A powerful test for multivariate normality. Journal of applied statistics, 41(2), 351-363.
See Also
mvnTest
, faTest
, msw
, msk
, mhz
, mvn
Examples
set.seed(12345)
## Data from gamma distribution
X = matrix(rgamma(50*4,shape = 2),50)
mardia(X)
## Data from normal distribution
X = matrix(rnorm(50*4,mean = 2 , sd = 1),50)
mardia(X)
## load the ubiquitous multivariate iris data ##
## (first 50 observations of columns 1:4) ##
iris.df = iris[1:50, 1:4]
mardia(iris.df)