| tests | R Documentation | 
Compute formal tests based on the Mahalanobis distances and Mahalanobis angles of multivariate normality (including Mardia's kurtosis test and Mardia's skewness test).
maha2_test(x, type = c("ad.test", "ks.test"), dist = c("chi2", "beta"), ...)
mardia_test(x, type = c("kurtosis", "skewness"), method = c("direct", "chol"))
| x | (n, d)-matrix of data. | 
| type | 
 
 | 
| dist | distribution to check against. | 
| method | method for computing the Mahalanobis angles. | 
| ... | additional arguments passed to the underlying
 | 
An htest object (for maha2_test the one returned
by the underlying ad.test() or
ks.test()).
Marius Hofert
set.seed(271)
U <- matrix(runif(3 * 200), ncol = 3)
X <- cbind(qexp(U[,1]), qnorm(U[,2:3]))
maha2_test(X) # at the 'edge' of rejecting
maha2_test(X, type = "ks.test") # at the 'edge', too
mardia_test(X) # clearly rejects at 5%
mardia_test(X, type = "skewness") # clearly rejects at 5%
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.