In 2023, a multivariate normality test based on a chi-square approximation was developed. This method assumes independence among Gaussian random variables, and defines the test statistic, denoted by Q, as the sum of squared values. This study aims to develop R scripts that implement the Q-test for multivariate normality using either the Shapiro-Wilk W statistic (QSWa) or the Shapiro-Francia W’ statistic (QSFa). A bootstrap version of the Q-test (QSWb and QSFb), which does not assume independence, is also included. Additionally, it incorporates Royston’s H-test. The use of the scripts is illustrated with a sample of 50 participants assessed on a variable across four yearly administrations. The sampling distribution generated by the bootstrap method differs from the chi-square distribution and corresponds to a generalized chi-square distribution—namely, the distribution of a sum of squares of correlated variables. This distribution is less peaked and has a heavier right tail than the chi-square distribution. It is concluded that the bootstrap approach is conservative under the null hypothesis of multivariate normality; however, it is theoretically more appropriate than the chi-square approximation. To approximate the distributions of the two versions of the Q-test, it is recommended that the z or z’ values set to zero in the calculation of the Q statistic not be subtracted when determining the degrees of freedom in the chi-square approximation. Moreover, a significance level of 10% is suggested for the bootstrap approach, rather than the conventional 5%.
References
[1]
Rubia, J.M.L. (2023) Proposal and Pilot Study: A Generalization of the W or W’ Statistic for Multivariate Normality. OpenJournalofStatistics, 13, 119-169. https://doi.org/10.4236/ojs.2023.131008
[2]
Royston, J.P. (1983) Some Techniques for Assessing Multivarate Normality Based on the Shapiro-Wilk W. AppliedStatistics, 32, 121-133. https://doi.org/10.2307/2347291
[3]
Royston, P. (1992) Approximating the Shapiro-Wilk W-Test for Non-Normality. StatisticsandComputing, 2, 117-119. https://doi.org/10.1007/bf01891203
[4]
Shapiro, S.S. and Wilk, M.B. (1965) An Analysis of Variance Test for Normality (Complete Samples). Biometrika, 52, 591-611. https://doi.org/10.2307/2333709
[5]
Royston, P. (1993) A Toolkit for Testing for Non-Normality in Complete and Censored Samples. TheStatistician, 42, 37-43. https://doi.org/10.2307/2348109
[6]
Shapiro, S.S. and Francia, R.S. (1972) An Approximate Analysis of Variance Test for Normality. JournaloftheAmericanStatisticalAssociation, 67, 215-216. https://doi.org/10.1080/01621459.1972.10481232
[7]
R Core Team (2025) R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. https://www.R-project.org/
[8]
Bagby, R.M., Parker, J.D.A. and Taylor, G.J. (1994) The Twenty-Item Toronto Alexithymia Scale—I. Item Selection and Cross-Validation of the Factor Structure. JournalofPsychosomaticResearch, 38, 23-32. https://doi.org/10.1016/0022-3999(94)90005-1
[9]
Salminen, J.K., Saarijärvi, S., Äärelä, E., Toikka, T. and Kauhanen, J. (1999) Prevalence of Alexithymia and Its Association with Sociodemographic Variables in the General Population of Finland. JournalofPsychosomaticResearch, 46, 75-82. https://doi.org/10.1016/s0022-3999(98)00053-1
[10]
Franz, M., Popp, K., Schaefer, R., Sitte, W., Schneider, C., Hardt, J., et al. (2007) Alexithymia in the German General Population. SocialPsychiatryandPsychiatricEpidemiology, 43, 54-62. https://doi.org/10.1007/s00127-007-0265-1
[11]
Wilczyński, K.M., Cichoń, L., Stasik, A., Kania, K., Rodak, N., Wizner, M., et al. (2024) An Analysis of the Time Required for the Diagnosis of ASD and the Factors Influencing Its Duration in a Sample of the Pediatric Population from Poland. JournalofClinicalMedicine, 13, Article 6255. https://doi.org/10.3390/jcm13206255
[12]
Braun, W.J. and Murdoch, D.J. (2021) A First Course in Statistical Programming with R. 3rd Edition, Cambridge University Press. https://doi.org/10.1017/9781108993456
[13]
Giorgi, F.M., Ceraolo, C. and Mercatelli, D. (2022) The R Language: An Engine for Bioinformatics and Data Science. Life, 12, Article 648. https://doi.org/10.3390/life12050648
[14]
Anis, W., Kuntoro, K. and Melaniani, S. (2021) Difference of Power Test and Type II Error (β) on Mardia MVN Test, Henze Zikler’s MVN Test, and Royston’s MVN Test Using Multivariate Data Analysis. JurnalBiometrikadanKependudukan, 10, 153-161. https://doi.org/10.20473/jbk.v10i2.2021.153-161
[15]
Khatun, N. (2021) Applications of Normality Test in Statistical Analysis. OpenJournalofStatistics, 11, 113-122. https://doi.org/10.4236/ojs.2021.111006
[16]
Mardia, K.V. (1980) 9 Tests of Unvariate and Multivariate Normality. HandbookofStatistics, 1, 279-320. https://doi.org/10.1016/s0169-7161(80)01011-5
[17]
Rolke, W. and Gongora, C.G. (2020) A Chi-Square Goodness-of-Fit Test for Continuous Distributions against a Known Alternative. ComputationalStatistics, 36, 1885-1900. https://doi.org/10.1007/s00180-020-00997-x
[18]
Chen, T. and Lumley, T. (2019) Numerical Evaluation of Methods Approximating the Distribution of a Large Quadratic Form in Normal Variables. ComputationalStatistics&DataAnalysis, 139, 75-81. https://doi.org/10.1016/j.csda.2019.05.002
[19]
Wald, A. and Wolfowitz, J. (1943) An Exact Test for Randomness in the Non-Parametric Case Based on Serial Correlation. TheAnnalsofMathematicalStatistics, 14, 378-388. https://doi.org/10.1214/aoms/1177731358
[20]
Signorell, A. (2025) DescTools: Tools for Descriptive Statistics. Version 0.99.6. https://doi.org/10.32614/CRAN.package.DescTools
[21]
Ljung, G.M. and Box, G.E.P. (1978) On a Measure of Lack of Fit in Time Series Models. Biometrika, 65, 297-303. https://doi.org/10.1093/biomet/65.2.297
[22]
R Core Team (2025) The R Stats Package (Version 4.6.0). https://stat.ethz.ch/R-manual/R-devel/library/stats/html/00Index.html
[23]
Chan, K.C.G., Han, J., Kennedy, A.P. and Yam, S.C.P. (2022) Testing Network Autocorrelation without Replicates. PLOSONE, 17, e0275532. https://doi.org/10.1371/journal.pone.0275532
[24]
Schmal, W.B. (2024) Quantitative Tools for Time Series Analysis in Natural Language Processing: A Practitioners Guide. arXiv: 2404.18499. https://doi.org/10.48550/arXiv.2404.18499
[25]
Schwert, G.W. (1989) Why Does Stock Market Volatility Change over Time? TheJournalofFinance, 44, 1115-1153. https://doi.org/10.1111/j.1540-6261.1989.tb02647.x
[26]
Egbert, J. and Plonsky, L. (2020) Bootstrapping Techniques. In: Paquot, M. and Gries, S.T., Eds., APracticalHandbookofCorpusLinguistics, Springer, 593-610. https://doi.org/10.1007/978-3-030-46216-1_24
[27]
Rousselet, G., Pernet, C.R. and Wilcox, R.R. (2023) An Introduction to the Bootstrap: A Versatile Method to Make Inferences by Using Data-Driven Simulations. Meta-Psychology, 7, 1-24. https://doi.org/10.15626/mp.2019.2058
[28]
Marchev Jr., A. and Marchev, V. (2023) Automated Algorithm for Multi-Variate Data Synthesis with Cholesky Decomposition. Proceedings of the 7th International Conference on Algorithms, Computing and Systems, Larissa, 19-21 October 2023, 1-6. https://doi.org/10.1145/3631908.3631909
[29]
Ripley, B., Venables, B., Bates, D.M., Hornik, K., Gebhardt, A. and Firth, D. (2025) Support Functions and Datasets for Venables and Ripley’s MASS. Version 7.3-65.
[30]
Götze, F. and Tikhomirov, A. (2002) Asymptotic Distribution of Quadratic Forms and Applications. JournalofTheoreticalProbability, 15, 423-475. https://doi.org/10.1023/a:1014867011101
[31]
Rubia, J.M.D.L. (2024) Rice University Rule to Determine the Number of Bins. OpenJournalofStatistics, 14, 119-149. https://doi.org/10.4236/ojs.2024.141006
[32]
Gross, J. and Ligges, U. (2022) Package ‘Nortest’, Tests for Normality. Version 1.0-4. https://cran.r-project.org/web/packages/nortest/nortest.pdf
[33]
Korkmaz, S. (2025) Package ‘MVN’. Multivariate Normality Tests. https://cran.r-project.org/web/packages/MVN//MVN.pdf
[34]
Ferrari, A. (2019) A Note on Sum and Difference of Correlated Chi-Squared Variables. arXiv: 1906.09982. https://doi.org/10.48550/arXiv.1906.09982
[35]
Jobst, L.J., Bader, M. and Moshagen, M. (2023) A Tutorial on Assessing Statistical Power and Determining Sample Size for Structural Equation Models. PsychologicalMethods, 28, 207-221. https://doi.org/10.1037/met0000423
[36]
Henze, N. and Zirkler, B. (1990) A Class of Invariant Consistent Tests for Multivariate Normality. CommunicationsinStatistics—TheoryandMethfods, 19, 3595-3617. https://doi.org/10.1080/03610929008830400