pingouin.multivariate_normality

pingouin.
multivariate_normality
(X, alpha=0.05)[source] HenzeZirkler multivariate normality test.
 Parameters
 Xnp.array
Data matrix of shape (n_samples, n_features).
 alphafloat
Significance level.
 Returns
 hzfloat
The HenzeZirkler test statistic.
 pvalfloat
Pvalue.
 normalboolean
True if X comes from a multivariate normal distribution.
See also
normality
Test the univariate normality of one or more variables.
homoscedasticity
Test equality of variance.
sphericity
Mauchly’s test for sphericity.
Notes
The HenzeZirkler test [1] has a good overall power against alternatives to normality and works for any dimension and sample size.
Adapted to Python from a Matlab code [2] by Antonio TrujilloOrtiz and tested against the MVN R package.
Rows with missing values are automatically removed.
References
 1
Henze, N., & Zirkler, B. (1990). A class of invariant consistent tests for multivariate normality. Communications in StatisticsTheory and Methods, 19(10), 35953617.
 2
TrujilloOrtiz, A., R. HernandezWalls, K. BarbaRojo and L. CupulMagana. (2007). HZmvntest: HenzeZirkler’s Multivariate Normality Test. A MATLAB file.
Examples
>>> import pingouin as pg >>> data = pg.read_dataset('multivariate') >>> X = data[['Fever', 'Pressure', 'Aches']] >>> pg.multivariate_normality(X, alpha=.05) HZResults(hz=0.5400861018514641, pval=0.7173686509624891, normal=True)