DH.test: Doornik-Hansen test for multivariate normality.

View source: R/DH.test.R

DH.testR Documentation

Doornik-Hansen test for multivariate normality.

Description

The Doornik-Hansen test for multivariate normality is a powerful alternative to the Shapiro-Wilk test.

Usage


DH.test(Y, Y.names = NULL)

Arguments

Y

An n x p a dataframe of dependent variables.

Y.names

Names of Y variables; should be a 1 x p character string.

Details

An assumption of multivariate normality is exceedingly difficult to verify. Hypothesis tests tend to be too stringent, and multivariate diagnostic plots only allow viewing of two variables at a time. Univariate normality of course can be verified using normal probability plots. However while marginal non-normality indicates multivariate non-normality, marginal normality does not insure that Y variables collectively follow a multivariate normal distribution.

The Doornik-Hansen test for multivariate normality (Doornik and Hansen 2008) is based on the skewness and kurtosis of multivariate data that is transformed to insure independence. The DH test is more powerful than the Shapiro-Wilk test for most tested multivariate distributions (Doornik and Hansen 2008). The function DH.test also runs the Doornik-Hansen test for both multivariate and univariate normality. The later test follows directly from the work of Bowman and Shenton (1975), Shenton and Bowman (1977) and D'Agostino (1970).

Value

Returns a list with two objects.

multi

A dataframe containing multivariate results, i.e. the test statistic, E, the degrees of freedom and the p-value.

comp2

A dataframe with p rows detailing univariate tests. Columns in the dataframe contain the test statistics, degrees of freedom and P-values.

Note

As with all inferential normality tests our null hypothesis is that the underlying population is normal, in this case multivariate normal.

Author(s)

Ken Aho

References

D'Agostino, R. B. (1970). Transformation to normality of the null distribution of g1, Biometrika 57: 679-681.

Doornik, J.A. and Hansen, H. (2008). An Omnibus test for univariate and multivariate normality. Oxford Bulletin of Economics and Statistics 70, 927-939.

Shenton, L. R. and Bowman, K. O. (1977). A bivariate model for the distribution of b1 and b2, Journal of the American Statistical Association 72: 206.211.

See Also

shapiro.test, bv.boxplot

Examples

data(iris)#The ubiquitous multivariate iris data.
DH.test(iris[,1:4],Y.names=names(iris[,1:4]))

asbio documentation built on May 29, 2024, 5:57 a.m.