Learn R Programming

QuantPsyc (version 1.6)

mult.norm: Tests for Multivariate Normality

Description

Returns tests for multivariate Skewness and kurtosis as well as Mahalanobis' D-squared.

Usage

mult.norm(x, s = var(x), chicrit = 0.005)

Arguments

x

A multivariate data object as in columns from a data.frame

s

Covariance matrix of x (not necessary to specify)

chicrit

p-value corresponding to critical value of chi-square distribution for detecting multivariate outliers

Value

A list containing the following:

mult.test

Values for multivariate skeweness and kurtosis and their significance

Dsq

Mahalanobis' distances

CriticalDsq

Critical value of chi-sq distribution based on df and specified critical level

Details

Tests for multivariate skewness and kurtosis were adapted from SAS macros in Khatree & Naik (1999). They attribute the formula to Mardia (1970; 1974). Mahalanobis' Dsq is based on Mahalanobis (1936). Dsq is multivariate analogue to z scores, but based on the chi-sq distribution rather than normal distribution. Once can specify at what level one wishes to define multivariate outliers (e.g., .005, .001)

References

Khattree, R. & Naik, D. N. (1999). Applied multivariate statistics with SAS software (2nd ed.). Cary, NC: SAS Institute Inc.

See Also

mahalanobis, qqplot

Examples

Run this code
# NOT RUN {
# assess the multivariate normality of variables 4,5,6 in USJudgeRatings
data(USJudgeRatings)	
mn <- mult.norm(USJudgeRatings[,4:6],chicrit=.001)
mn

mn$Dsq > mn$CriticalDsq

# }

Run the code above in your browser using DataLab