Roystest

Royston's Multivariate Normality Test.
2.5K 次下载
更新时间 2007/12/3

查看许可证

It is well known that many multivariate statistical procedures call upon the assumption of multivariate normality (MVN). At least 50 different procedures have been proposed for this problem. Unfortunately, different conclusions about the MVN of a data set can be reached by different procedures (Mecklin and Mundfrom, 2005).

The Shapiro-Wilk test (Shapiro and Wilk, 1965), is generally considered to be an excellent test of univariate normality. It is only natural to extend it to the multivariate case, as done by Royston (1982). Simulation results have show Royston’s test to have very good Type I error control and power against many different alternative distributions. Further, Royston’s test involves a rather ingenious correction for the correlation between the variables in the sample.

Royston’s (1983) marginal method first tests each of the p variates for univariate normality with a Shapiro-Wilk statistic, then combines the p dependent tests into one omnibus test statistic for multivariate normality. Royston transforms the p-Shapiro-Wilk statistics into what he claims is an approximately Chi-squared random variable, with e (1< e <p) degrees of freedom. The degrees of freedom are estimated by taking into account possible correlation structures between the original p test statistics. This test has been found to behave well when the sample size is small and the variates are relatively uncorrelated (Mecklin and Mundfrom, 2005).

This m-file has a function to generate the Shapiro-Wilk's W statistic needed to feed the Royston's test for multivariate normality. It was taken from the Fortran Algorithm AS R94 (Royston, 1995) [URL address http://lib.stat.cmu.edu/apstat/181]. Here, we present both the options for the sample kurtosis type: 1) Shapiro-Francia for leptokurtic, and 2) Shapiro-Wilk for the platykurtic ones.

Syntax: function Roystest(X,alpha)

Inputs:
X - data matrix (Size of matrix must be n-by-p; data=rows,
indepent variable=columns)
alpha - significance level (default = 0.05)

Output:
- Royston's Multivariate Normality Test

引用格式

Antonio Trujillo-Ortiz (2024). Roystest (https://www.mathworks.com/matlabcentral/fileexchange/17811-roystest), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Hypothesis Tests 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Roystest/

版本 已发布 发行说明
1.0.0.0

It was added an appropriate format to cite this file.