<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jdaip
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Data Analysis and Information Processing
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2327-7211
   </issn>
   <issn publication-format="print">
    2327-7203
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jdaip.2025.134024
   </article-id>
   <article-id pub-id-type="publisher-id">
    jdaip-145868
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications, Physics 
     </subject>
     <subject>
       Mathematics
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    MVN Q-Test I: A Bootstrap-Based Implementation in R
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       José Moral de la
      </surname>
      <given-names>
       Rubia
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aSchool of Psychology, Universidad Autónoma de Nuevo León, Monterrey, Mexico
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     23
    </day> 
    <month>
     09
    </month>
    <year>
     2025
    </year>
   </pub-date> 
   <volume>
    13
   </volume> 
   <issue>
    04
   </issue>
   <fpage>
    389
   </fpage>
   <lpage>
    424
   </lpage>
   <history>
    <date date-type="received">
     <day>
      2,
     </day>
     <month>
      August
     </month>
     <year>
      2025
     </year>
    </date>
    <date date-type="published">
     <day>
      20,
     </day>
     <month>
      August
     </month>
     <year>
      2025
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      20,
     </day>
     <month>
      September
     </month>
     <year>
      2025
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    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%.
   </abstract>
   <kwd-group> 
    <kwd>
     Multivariate Normality Tests
    </kwd> 
    <kwd>
      Sampling Distribution
    </kwd> 
    <kwd>
      Bootstrap Methods
    </kwd> 
    <kwd>
      R Program
    </kwd> 
    <kwd>
      Computational Statistics
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>In 2023, Moral developed the multivariate normality Q-test, which demonstrated adequate power and efficiency compared with Royston’s H-test , a well-known test for assessing multivariate normality. In its original formulation, the Q-test’s p-value and statistical power were approximated using the chi-square distribution. However, a more flexible bootstrap approach was recommended to relax the test’s assumptions . The Q-test comprises two variants: one based on Royston’s standardization <xref ref-type="bibr" rid="scirp.145868-3">
     [3]
    </xref> of the Shapiro-Wilk W statistic <xref ref-type="bibr" rid="scirp.145868-4">
     [4]
    </xref>, and another based on Royston’s standardization <xref ref-type="bibr" rid="scirp.145868-5">
     [5]
    </xref> of the Shapiro-Francia W’ statistic <xref ref-type="bibr" rid="scirp.145868-6">
     [6]
    </xref>. These are referred to as QSWa and QSFa, respectively. In the original simulation study , QSWa was found to be slightly more advantageous than QSFa, and its performance closely resembled that of Royston’s H-test .</p>
   <p>The first objective of this article is to develop a script in the R programming language <xref ref-type="bibr" rid="scirp.145868-7">
     [7]
    </xref> that facilitates the application of the Q-test. The script implements both the chi-square approach of the original proposal (QSWa and QSFa) and the suggested bootstrap approach (QSWb and QSFb). It also includes a test of the serial independence of the sequence of standardized univariate normality statistics for the 2<sup>k</sup> − 1 possible unweighted linear combinations of the original k variables (an assumption of the asymptotic approach), as well as Royston’s H-test <xref ref-type="bibr" rid="scirp.145868-2">
     [2]
    </xref>. Additionally, the script computes statistical power estimates using both the chi-square approximation and the bootstrap method.</p>
   <p>The use of the script is illustrated with a dataset comprising fifty 4-tuples. The four variables in this convenience sample are correlated, as they represent total scores on the Toronto Alexithymia Scale <xref ref-type="bibr" rid="scirp.145868-8">
     [8]
    </xref>—ranging from 20 to 100—collected across four annual administrations. Assessments were conducted online with a cohort of 50 Mexican university students (25 women and 25 men) between 2019 and 2023. The null hypothesis of multivariate normality is expected to be supported by all four Q-test variants and the H-test <xref ref-type="bibr" rid="scirp.145868-9">
     [9]
    </xref>-<xref ref-type="bibr" rid="scirp.145868-11">
     [11]
    </xref>.</p>
   <p>The R programming language was selected because it is one of the most comprehensive statistical software environments, open-access, and continuously developed and reviewed by the mathematical community <xref ref-type="bibr" rid="scirp.145868-12">
     [12]
    </xref> <xref ref-type="bibr" rid="scirp.145868-13">
     [13]
    </xref>. The H-test developed by Royston <xref ref-type="bibr" rid="scirp.145868-2">
     [2]
    </xref> was included as a supplementary test because it is one of the most widely used and powerful tests for assessing multivariate normality <xref ref-type="bibr" rid="scirp.145868-14">
     [14]
    </xref> <xref ref-type="bibr" rid="scirp.145868-15">
     [15]
    </xref>. In contrast, Mardia’s K<sup>2</sup> test <xref ref-type="bibr" rid="scirp.145868-16">
     [16]
    </xref> was excluded, as a previous study <xref ref-type="bibr" rid="scirp.145868-1">
     [1]
    </xref> found that the Q-test outperformed it in terms of hit rate and mean power, particularly when the Q-test’s performance closely approximated that of Royston’s H-test.</p>
  </sec><sec id="s2">
   <title>
    <xref ref-type="bibr" rid="scirp.145868-"></xref>2. The Q-Test for Multivariate Normality and the Development of Its Script</title>
   <p>To obtain the test statistic for the MVN Q-test <xref ref-type="bibr" rid="scirp.145868-1">
     [1]
    </xref>, the standardized statistics of the Shapiro-Wilk univariate normality test <xref ref-type="bibr" rid="scirp.145868-4">
     [4]
    </xref> (Equation (1)) or the Shapiro-Francia test <xref ref-type="bibr" rid="scirp.145868-6">
     [6]
    </xref> (Equation (2)) are computed, using Royston’s (1992, 1993) standardization <xref ref-type="bibr" rid="scirp.145868-3">
     [3]
    </xref> <xref ref-type="bibr" rid="scirp.145868-5">
     [5]
    </xref>, for all possible unweighted linear combinations of the k variables. The number of such combinations is given by nc = 2<sup>k</sup> − 1 (Equation (3)). In the first variant, the test statistic is denoted by Q<sub>SW</sub> as a random variable and q as a specific observed value. In the second variant, it is denoted by Q<sub>SF</sub> as a random variable and q’ as its observed value.</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          Z 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mn>
              1 
            </mn> 
            <mo>
              − 
            </mo> 
            <mi>
              W 
            </mi> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <mi>
            W 
          </mi> 
          <mo>
            − 
          </mo> 
          <mi>
            μ 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              ln 
            </mi> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mn>
                1 
              </mn> 
              <mo>
                − 
              </mo> 
              <mi>
                W 
              </mi> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mrow> 
          <mi>
            σ 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              ln 
            </mi> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mn>
                1 
              </mn> 
              <mo>
                − 
              </mo> 
              <mi>
                W 
              </mi> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </mfrac> 
        <mo>
          = 
        </mo> 
        <mi>
          z 
        </mi> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          μ 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mn>
              1 
            </mn> 
            <mo>
              − 
            </mo> 
            <mi>
              W 
            </mi> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mn>
          0.0038915 
        </mn> 
        <mo>
          × 
        </mo> 
        <msup> 
         <mi>
           ln 
         </mi> 
         <mn>
           3 
         </mn> 
        </msup> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mn>
          0.083751 
        </mn> 
        <mo>
          × 
        </mo> 
        <msup> 
         <mi>
           ln 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mo>
          − 
        </mo> 
        <mn>
          0.31082 
        </mn> 
        <mo>
          × 
        </mo> 
        <mi>
          ln 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mn>
          1.5861 
        </mn> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          σ 
        </mi> 
        <mo> 
        </mo> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mn>
              1 
            </mn> 
            <mo>
              − 
            </mo> 
            <mi>
              W 
            </mi> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <msup> 
         <mi>
           e 
         </mi> 
         <mrow> 
          <mn>
            0.0030302 
          </mn> 
          <mo>
            × 
          </mo> 
          <msup> 
           <mrow> 
            <mi>
              ln 
            </mi> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             n 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            − 
          </mo> 
          <mn>
            0.082676 
          </mn> 
          <mo>
            × 
          </mo> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             n 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            − 
          </mo> 
          <mn>
            0.4803 
          </mn> 
         </mrow> 
        </msup> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math> (1)</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mtable columnalign="left"> 
      <mtr> 
       <mtd> 
        <mi>
          Z 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mn>
              1 
            </mn> 
            <mo>
              − 
            </mo> 
            <msup> 
             <mi>
               W 
             </mi> 
             <mo>
               ′ 
             </mo> 
            </msup> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             W 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mo>
            − 
          </mo> 
          <mi>
            μ 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              ln 
            </mi> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mn>
                1 
              </mn> 
              <mo>
                − 
              </mo> 
              <msup> 
               <mi>
                 W 
               </mi> 
               <mo>
                 ′ 
               </mo> 
              </msup> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mrow> 
          <mi>
            σ 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              ln 
            </mi> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mn>
                1 
              </mn> 
              <mo>
                − 
              </mo> 
              <msup> 
               <mi>
                 W 
               </mi> 
               <mo>
                 ′ 
               </mo> 
              </msup> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </mfrac> 
        <mo>
          = 
        </mo> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          u 
        </mi> 
        <mo> 
        </mo> 
        <mo>
          = 
        </mo> 
        <mo> 
        </mo> 
        <mi>
          ln 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             n 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mi>
          ln 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          μ 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mn>
              1 
            </mn> 
            <mo>
              − 
            </mo> 
            <msup> 
             <mi>
               W 
             </mi> 
             <mo>
               ′ 
             </mo> 
            </msup> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mn>
          1.0521 
        </mn> 
        <mo>
          × 
        </mo> 
        <mi>
          u 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1.2725 
        </mn> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          v 
        </mi> 
        <mo> 
        </mo> 
        <mo>
          = 
        </mo> 
        <mo> 
        </mo> 
        <mi>
          ln 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             n 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mrow> 
         <mn>
           2 
         </mn> 
         <mo>
           / 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             n 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          σ 
        </mi> 
        <mo> 
        </mo> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            ln 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mn>
              1 
            </mn> 
            <mo>
              − 
            </mo> 
            <msup> 
             <mi>
               W 
             </mi> 
             <mo>
               ′ 
             </mo> 
            </msup> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mo>
          − 
        </mo> 
        <mn>
          0.26758 
        </mn> 
        <mo>
          × 
        </mo> 
        <mi>
          v 
        </mi> 
        <mo>
          + 
        </mo> 
        <mn>
          1.0308 
        </mn> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math> (2)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        n 
      </mi> 
      <mi>
        c 
      </mi> 
      <mo>
        = 
      </mo> 
      <munderover> 
       <mstyle mathsize="140%" displaystyle="true"> 
        <mo>
          ∑ 
        </mo> 
       </mstyle> 
       <mrow> 
        <mi>
          j 
        </mi> 
        <mo>
          = 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mi>
         k 
       </mi> 
      </munderover> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mi>
             k 
           </mi> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mi>
             j 
           </mi> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mi>
             k 
           </mi> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mn>
             1 
           </mn> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mi>
             k 
           </mi> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mn>
             2 
           </mn> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mo>
        ⋯ 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mi>
             k 
           </mi> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mi>
             k 
           </mi> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <msup> 
       <mn>
         2 
       </mn> 
       <mi>
         k 
       </mi> 
      </msup> 
      <mo>
        − 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math> (3)</p>
   <p>Negative values of z or z′ are truncated to zero to avoid overestimating Q<sub>SW</sub> or Q<sub>SF</sub>, as negative z or z′ values indicate a good fit to normality when calculating the right-tailed p-value under a standard normal distribution. See Equations (4) and (5).</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        Z 
      </mi> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         { 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mi>
                 z 
               </mi> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mi>
                  Z 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mi>
                    ln 
                  </mi> 
                  <mrow> 
                   <mo>
                     ( 
                   </mo> 
                   <mrow> 
                    <mn>
                      1 
                    </mn> 
                    <mo>
                      − 
                    </mo> 
                    <mi>
                      W 
                    </mi> 
                   </mrow> 
                   <mo>
                     ) 
                   </mo> 
                  </mrow> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
                <mo>
                  &gt; 
                </mo> 
                <mn>
                  0 
                </mn> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mi>
                  Z 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mi>
                    ln 
                  </mi> 
                  <mrow> 
                   <mo>
                     ( 
                   </mo> 
                   <mrow> 
                    <mn>
                      1 
                    </mn> 
                    <mo>
                      − 
                    </mo> 
                    <mi>
                      W 
                    </mi> 
                   </mrow> 
                   <mo>
                     ) 
                   </mo> 
                  </mrow> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
                <mo>
                  ≤ 
                </mo> 
                <mn>
                  0 
                </mn> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
      </mrow> 
     </mrow> 
    </math> (4)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         Z 
       </mi> 
       <mo>
         ′ 
       </mo> 
      </msup> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         { 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <msup> 
                <mi>
                  z 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mi>
                  Z 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mi>
                    ln 
                  </mi> 
                  <mrow> 
                   <mo>
                     ( 
                   </mo> 
                   <mrow> 
                    <mn>
                      1 
                    </mn> 
                    <mo>
                      − 
                    </mo> 
                    <msup> 
                     <mi>
                       W 
                     </mi> 
                     <mo>
                       ′ 
                     </mo> 
                    </msup> 
                   </mrow> 
                   <mo>
                     ) 
                   </mo> 
                  </mrow> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
                <mo>
                  &gt; 
                </mo> 
                <mn>
                  0 
                </mn> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mi>
                  Z 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mi>
                    ln 
                  </mi> 
                  <mrow> 
                   <mo>
                     ( 
                   </mo> 
                   <mrow> 
                    <mn>
                      1 
                    </mn> 
                    <mo>
                      − 
                    </mo> 
                    <msup> 
                     <mi>
                       W 
                     </mi> 
                     <mo>
                       ′ 
                     </mo> 
                    </msup> 
                   </mrow> 
                   <mo>
                     ) 
                   </mo> 
                  </mrow> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
                <mo>
                  ≤ 
                </mo> 
                <mn>
                  0 
                </mn> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
      </mrow> 
     </mrow> 
    </math> (5)</p>
   <p>Once the 2<sup>k</sup> − 1 standardized statistics are obtained and the negative ones have been truncated to zero, the sum of squares (Q statistic) is computed, and the right-tailed p-value is derived from a chi-square distribution. The degrees of freedom (df) correspond to the number of summed values (nc) minus the number of truncated values (a): df = nc − a, as per the original proposal. See Equation (6).</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable columnalign="left"> 
      <mtr> 
       <mtd> 
        <msub> 
         <mi>
           Q 
         </mi> 
         <mrow> 
          <mi>
            S 
          </mi> 
          <mi>
            W 
          </mi> 
         </mrow> 
        </msub> 
        <mo>
          = 
        </mo> 
        <munderover> 
         <mstyle mathsize="140%" displaystyle="true"> 
          <mo>
            ∑ 
          </mo> 
         </mstyle> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mrow> 
          <mi>
            n 
          </mi> 
          <mi>
            c 
          </mi> 
         </mrow> 
        </munderover> 
        <msubsup> 
         <mi>
           z 
         </mi> 
         <mi>
           i 
         </mi> 
         <mn>
           2 
         </mn> 
        </msubsup> 
        <mo>
          = 
        </mo> 
        <mi>
          q 
        </mi> 
        <mo>
          ; 
        </mo> 
        <msub> 
         <mi>
           Q 
         </mi> 
         <mrow> 
          <mi>
            S 
          </mi> 
          <mi>
            W 
          </mi> 
         </mrow> 
        </msub> 
        <mo>
          ∼ 
        </mo> 
        <msubsup> 
         <mi>
           χ 
         </mi> 
         <mrow> 
          <mi>
            n 
          </mi> 
          <mi>
            c 
          </mi> 
          <mo>
            − 
          </mo> 
          <mi>
            a 
          </mi> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </msubsup> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <msub> 
         <mi>
           Q 
         </mi> 
         <mrow> 
          <mi>
            S 
          </mi> 
          <mi>
            F 
          </mi> 
         </mrow> 
        </msub> 
        <mo>
          = 
        </mo> 
        <munderover> 
         <mstyle mathsize="140%" displaystyle="true"> 
          <mo>
            ∑ 
          </mo> 
         </mstyle> 
         <mrow> 
          <mi>
            i 
          </mi> 
          <mo>
            = 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mrow> 
          <mi>
            n 
          </mi> 
          <mi>
            c 
          </mi> 
         </mrow> 
        </munderover> 
        <msubsup> 
         <msup> 
          <mi>
            z 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
         <mi>
           i 
         </mi> 
         <mn>
           2 
         </mn> 
        </msubsup> 
        <mo>
          = 
        </mo> 
        <msup> 
         <mi>
           q 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
        <mo>
          ; 
        </mo> 
        <msub> 
         <mi>
           Q 
         </mi> 
         <mrow> 
          <mi>
            S 
          </mi> 
          <mi>
            F 
          </mi> 
         </mrow> 
        </msub> 
        <mo>
          ∼ 
        </mo> 
        <msubsup> 
         <mi>
           χ 
         </mi> 
         <mrow> 
          <mi>
            n 
          </mi> 
          <mi>
            c 
          </mi> 
          <mo>
            − 
          </mo> 
          <mi>
            a 
          </mi> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </msubsup> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math> (6)</p>
   <p>In the script, subtracting truncated values is optional. In the simulation study, this option was not applied; therefore, the default is to set the degrees of freedom equal to the number of combinations (nc). The true distribution of the test statistic is a generalized chi-square distribution, which is less peaked and more positively skewed than a chi-square distribution <xref ref-type="bibr" rid="scirp.145868-17">
     [17]
    </xref>. For this reason, it was considered the preferable choice.</p>
   <p>Since the asymptotic approach based on the chi-square distribution for the Q statistic assumes not only the normality of the sum variable but also the independence of the variables being summed <xref ref-type="bibr" rid="scirp.145868-18">
     [18]
    </xref>, their serial independence is assessed using the Wald-Wolfowitz runs test <xref ref-type="bibr" rid="scirp.145868-19">
     [19]
    </xref> via the DescTools package in R <xref ref-type="bibr" rid="scirp.145868-20">
     [20]
    </xref>, and the Ljung-Box test <xref ref-type="bibr" rid="scirp.145868-21">
     [21]
    </xref> via R’s stats package <xref ref-type="bibr" rid="scirp.145868-22">
     [22]
    </xref>. The latter is included because it allows the specification of a maximum lag (h) over which the analysis is conducted (from 1 to h), whereas the Wald-Wolfowitz test corresponds to a lag of one. For non-seasonal series or those without an expected temporal pattern, it is recommended to examine lags from 1 to the smaller of 10 or one-fifth of the sample size <xref ref-type="bibr" rid="scirp.145868-23">
     [23]
    </xref>. Schwert’s rule <xref ref-type="bibr" rid="scirp.145868-24">
     [24]
    </xref>, which is widely used to determine the maximum lag, is also provided as an option <xref ref-type="bibr" rid="scirp.145868-25">
     [25]
    </xref>. See Equation (7).</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        h 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        12 
      </mn> 
      <mo>
        × 
      </mo> 
      <msup> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mrow> 
           <mi>
             n 
           </mi> 
           <mo>
             / 
           </mo> 
           <mrow> 
            <mn>
              100 
            </mn> 
           </mrow> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mrow> 
        <mn>
          1 
        </mn> 
        <mo>
          / 
        </mo> 
        <mn>
          4 
        </mn> 
       </mrow> 
      </msup> 
     </mrow> 
    </math> (7)</p>
   <p>Collinearity resulting from possible linear dependencies among k variables is substantially determined by the strength and configuration of their pairwise correlation matrix. As the number of variables increases, so does the probability that certain linear combinations will exhibit high dependency, even if only a few bivariate correlations are statistically significant and of weak or moderate strength. Conversely, the influence of one or two strong correlations may be diluted in the presence of many variables (e.g., 10 or more), as the resulting collinearity will depend more on the overall correlation structure than on isolated relationships.</p>
   <p>Nevertheless, serial dependency in test statistic values for all possible linear combinations of k variables, ordered by increasing complexity, is more strongly affected by the number of variables than by the correlations among them. As a result, maintaining the null hypothesis of serial independence becomes increasingly difficult with a large number of variables when using Wald-Wolfowitz or Ljung-Box tests.</p>
   <p>Additionally, the script incorporates a bootstrap approach as an alternative for calculating the p-value and statistical power <xref ref-type="bibr" rid="scirp.145868-26">
     [26]
    </xref> <xref ref-type="bibr" rid="scirp.145868-27">
     [27]
    </xref>, which is particularly useful when the assumption of independence in the sequence of 2<sup>k</sup> − 1 linear combinations is violated. The sampling distribution of the Q statistic is estimated in two ways:</p>
   <p>1) Using 1000 bootstrap samples drawn from the original dataset of n observations on k correlated variables (empirical bootstrap distribution).</p>
   <p>2) Using 1000 samples obtained through bootstrap resampling with replacement, drawn from a sample of size n consisting of k normally distributed variables that preserve the correlational structure of the original sample. This sample is referred to as the normative sample, and the resulting distribution as the normative bootstrap distribution.</p>
   <p>Consequently, both non-parametric and parametric bootstrap procedures are applied—the latter under the null hypothesis of multivariate normality.</p>
   <p>To generate the population or source sample in the parametric bootstrap, an n × k matrix of independent Gaussian vectors is multiplied by the lower triangular matrix from the Cholesky decomposition of the original variables’ correlation matrix <xref ref-type="bibr" rid="scirp.145868-28">
     [28]
    </xref> <xref ref-type="bibr" rid="scirp.145868-29">
     [29]
    </xref>. The k Gaussian vectors each consist of n scores drawn from the standard normal distribution. These scores are generated using equispaced quantile orders ranging from 0.5/n to 1 - 0.5/n, calculated via the probit function. The quantile orders are then permuted using a fixed seed (123) to ensure the stability of the results. In this way, each of the k variables shares the same set of quantile orders, but in a different sequence, thereby forming independent vectors.</p>
   <p>From the normative sample, 1000 samples are drawn with replacement and in each sample the test statistic is calculated. These 1000 estimates constitute the normative Bootstrap distribution. This distribution is referred to as normative because it allows for the estimation of the bootstrap critical value (e.g., the 0.95 quantile).</p>
   <p>The bootstrap p-value (i.e., the proportion of values greater than or equal to the test statistic q or q’) is calculated from the normative bootstrap distribution (a generalized chi-square distribution), serving as a substitute for the chi-square distribution used in the approximate approach. Statistical power (φ) at a given significance level α is estimated as the proportion of rejections in the empirical bootstrap sample, where the rejection region is defined by the (1 − α)th quantile of the normative bootstrap distribution. In both cases, resampling with replacement is performed by rows rather than by columns, in order to preserve the correlations among the variables in the source sample. For stable results, a fixed seed (123) is used when generating all 1000 bootstrap samples <xref ref-type="bibr" rid="scirp.145868-7">
     [7]
    </xref>.</p>
   <p>On the other hand, the median of the normative bootstrap distribution is used to calculate the probability associated with this central value in both the left and right tails of the empirical bootstrap sample distribution. Twice the smaller of these two probabilities represents the likelihood that the empirical bootstrap distribution is centered on the median of the normative bootstrap distribution. The closer this probability is to 1, the stronger the evidence of equivalence between the medians of the theoretical and empirical bootstrap distributions; conversely, a value below 0.05 indicates a clear shift of the empirical bootstrap distribution relative to the normative one. A divergence of the empirical bootstrap distribution from the normative distribution indicates a deviation from multivariate normality. It should be noted that the normative q and q’ values must be closer to 0 than the number of combinations of the k original variables and far from the median of the normative bootstrap distribution in the case of multivariate normality.</p>
   <p>Finally, both distributions are visualized using histograms and density curves to assess whether the sampling distribution of the Q statistic conforms to a chi-square distribution (reference curve) or instead adopts the shape of a generalized chi-square distribution, as is typical for quadratic forms or sums of squares of correlated variables <xref ref-type="bibr" rid="scirp.145868-30">
     [30]
    </xref>. This generalized distribution exhibits a lower peak and a heavier right tail compared to the standard chi-square distribution. The number of class intervals (k) and their constant width (w) are determined using Rice University’s rule (Equation (8)), which is appropriate for a wide range of distributional shapes, including positively skewed and leptokurtic distributions <xref ref-type="bibr" rid="scirp.145868-31">
     [31]
    </xref>.</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable columnalign="left"> 
      <mtr> 
       <mtd> 
        <mi>
          N 
        </mi> 
        <mi>
          u 
        </mi> 
        <mi>
          m 
        </mi> 
        <mi>
          b 
        </mi> 
        <mi>
          e 
        </mi> 
        <mi>
          r 
        </mi> 
        <mo> 
        </mo> 
        <mi>
          o 
        </mi> 
        <mi>
          f 
        </mi> 
        <mo> 
        </mo> 
        <mi>
          c 
        </mi> 
        <mi>
          l 
        </mi> 
        <mi>
          a 
        </mi> 
        <mi>
          s 
        </mi> 
        <mi>
          s 
        </mi> 
        <mo> 
        </mo> 
        <mi>
          i 
        </mi> 
        <mi>
          n 
        </mi> 
        <mi>
          t 
        </mi> 
        <mi>
          e 
        </mi> 
        <mi>
          r 
        </mi> 
        <mi>
          v 
        </mi> 
        <mi>
          a 
        </mi> 
        <mi>
          l 
        </mi> 
        <mi>
          s 
        </mi> 
        <mo>
          : 
        </mo> 
        <mi>
          k 
        </mi> 
        <mo>
          = 
        </mo> 
        <mn>
          2 
        </mn> 
        <mo>
          × 
        </mo> 
        <mroot> 
         <mi>
           n 
         </mi> 
         <mn>
           3 
         </mn> 
        </mroot> 
        <mo>
          = 
        </mo> 
        <mn>
          2 
        </mn> 
        <mo>
          × 
        </mo> 
        <mroot> 
         <mrow> 
          <mn>
            1000 
          </mn> 
         </mrow> 
         <mn>
           3 
         </mn> 
        </mroot> 
        <mo>
          = 
        </mo> 
        <mn>
          20 
        </mn> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          I 
        </mi> 
        <mi>
          n 
        </mi> 
        <mi>
          t 
        </mi> 
        <mi>
          e 
        </mi> 
        <mi>
          r 
        </mi> 
        <mi>
          v 
        </mi> 
        <mi>
          a 
        </mi> 
        <mi>
          l 
        </mi> 
        <mo> 
        </mo> 
        <mi>
          w 
        </mi> 
        <mi>
          i 
        </mi> 
        <mi>
          d 
        </mi> 
        <mi>
          t 
        </mi> 
        <mi>
          h 
        </mi> 
        <mo>
          : 
        </mo> 
        <mi>
          w 
        </mi> 
        <mo>
          = 
        </mo> 
        <mrow> 
         <mo>
           { 
         </mo> 
         <mrow> 
          <mtable> 
           <mtr> 
            <mtd> 
             <mrow> 
              <mo> 
              </mo> 
              <mfrac> 
               <mrow> 
                <mi>
                  min 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <msubsup> 
                   <mrow> 
                    <mrow> 
                     <mo>
                       { 
                     </mo> 
                     <mrow> 
                      <msub> 
                       <mi>
                         q 
                       </mi> 
                       <mi>
                         i 
                       </mi> 
                      </msub> 
                     </mrow> 
                     <mo>
                       } 
                     </mo> 
                    </mrow> 
                   </mrow> 
                   <mrow> 
                    <mi>
                      i 
                    </mi> 
                    <mo>
                      = 
                    </mo> 
                    <mn>
                      1 
                    </mn> 
                   </mrow> 
                   <mi>
                     n 
                   </mi> 
                  </msubsup> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
                <mo>
                  − 
                </mo> 
                <mi>
                  min 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <msubsup> 
                   <mrow> 
                    <mrow> 
                     <mo>
                       { 
                     </mo> 
                     <mrow> 
                      <msub> 
                       <mi>
                         q 
                       </mi> 
                       <mi>
                         i 
                       </mi> 
                      </msub> 
                     </mrow> 
                     <mo>
                       } 
                     </mo> 
                    </mrow> 
                   </mrow> 
                   <mrow> 
                    <mi>
                      i 
                    </mi> 
                    <mo>
                      = 
                    </mo> 
                    <mn>
                      1 
                    </mn> 
                   </mrow> 
                   <mi>
                     n 
                   </mi> 
                  </msubsup> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
               <mrow> 
                <mn>
                  20 
                </mn> 
               </mrow> 
              </mfrac> 
             </mrow> 
            </mtd> 
           </mtr> 
           <mtr> 
            <mtd> 
             <mrow> 
              <mo> 
              </mo> 
              <mfrac> 
               <mrow> 
                <mi>
                  min 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <msubsup> 
                   <mrow> 
                    <mrow> 
                     <mo>
                       { 
                     </mo> 
                     <mrow> 
                      <msub> 
                       <msup> 
                        <mi>
                          q 
                        </mi> 
                        <mo>
                          ′ 
                        </mo> 
                       </msup> 
                       <mi>
                         i 
                       </mi> 
                      </msub> 
                     </mrow> 
                     <mo>
                       } 
                     </mo> 
                    </mrow> 
                   </mrow> 
                   <mrow> 
                    <mi>
                      i 
                    </mi> 
                    <mo>
                      = 
                    </mo> 
                    <mn>
                      1 
                    </mn> 
                   </mrow> 
                   <mi>
                     n 
                   </mi> 
                  </msubsup> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
                <mo>
                  − 
                </mo> 
                <mi>
                  min 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <msubsup> 
                   <mrow> 
                    <mrow> 
                     <mo>
                       { 
                     </mo> 
                     <mrow> 
                      <msub> 
                       <msup> 
                        <mi>
                          q 
                        </mi> 
                        <mo>
                          ′ 
                        </mo> 
                       </msup> 
                       <mi>
                         i 
                       </mi> 
                      </msub> 
                     </mrow> 
                     <mo>
                       } 
                     </mo> 
                    </mrow> 
                   </mrow> 
                   <mrow> 
                    <mi>
                      i 
                    </mi> 
                    <mo>
                      = 
                    </mo> 
                    <mn>
                      1 
                    </mn> 
                   </mrow> 
                   <mi>
                     n 
                   </mi> 
                  </msubsup> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
               <mrow> 
                <mn>
                  20 
                </mn> 
               </mrow> 
              </mfrac> 
             </mrow> 
            </mtd> 
           </mtr> 
          </mtable> 
         </mrow> 
        </mrow> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math> (8)</p>
   <p>where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         q 
       </mi> 
       <mi>
         i 
       </mi> 
      </msub> 
     </mrow> 
    </math> or 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <msup> 
        <mi>
          q 
        </mi> 
        <mo>
          ′ 
        </mo> 
       </msup> 
       <mi>
         i 
       </mi> 
      </msub> 
     </mrow> 
    </math> (i = 1, 2, ..., 1000) denote the test statistics computed from the 1000 bootstrap samples drawn from the original sample of size n.</p>
   <p>
    <xref ref-type="bibr" rid="scirp.145868-"></xref>It should be noted that, in bootstrap procedures, using 1000 resamples is often considered a computationally efficient choice, as it offers a good balance between statistical accuracy and processing time. Consequently, many applied fields have adopted 1000 as the default setting in software packages such as R, SPSS, SAS, and Stata, as it yields reliable results in typical scenarios without placing excessive demands on computational resources <xref ref-type="bibr" rid="scirp.145868-26">
     [26]
    </xref> <xref ref-type="bibr" rid="scirp.145868-27">
     [27]
    </xref>. This number of resamples is also well-suited for the online R platform (Snippets—Run R code online), which allows up to approximately one minute for script execution.</p>
   <p>Appendix 1 contains the script for the Q-test calculated using the Shapiro–Wilk univariate normality statistics standardized by Royston’s method for samples ranging from 12 to 2000 with k-tuples of measurements <xref ref-type="bibr" rid="scirp.145868-3">
     [3]
    </xref>. Appendix 2 presents the Q-test based on the Shapiro-Francia univariate normality statistics <xref ref-type="bibr" rid="scirp.145868-4">
     [4]
    </xref>, standardized according to Royston <xref ref-type="bibr" rid="scirp.145868-5">
     [5]
    </xref>, for sample sizes from 5 to 5000 with k-tuples of measurements <xref ref-type="bibr" rid="scirp.145868-6">
     [6]
    </xref>. The Q-test is supplemented by Royston’s H-test <xref ref-type="bibr" rid="scirp.145868-2">
     [2]
    </xref>, included in Appendix 3, for sample sizes from 10 to 2000 with k-tuples of measurements. A significance level (α) of 0.05 is applied to both the H-test and the chi-square approximation of the Q-test, while a level of 0.1 is used for the bootstrap version of the Q-test, which is highlighted in green. To run the scripts, the following R packages must be installed and loaded: nortest <xref ref-type="bibr" rid="scirp.145868-32">
     [32]
    </xref>, MASS <xref ref-type="bibr" rid="scirp.145868-29">
     [29]
    </xref>, DescTools <xref ref-type="bibr" rid="scirp.145868-20">
     [20]
    </xref>, stats <xref ref-type="bibr" rid="scirp.145868-22">
     [22]
    </xref>, and MVN <xref ref-type="bibr" rid="scirp.145868-33">
     [33]
    </xref>.</p>
   <p>Performance benchmarks for the three scripts were obtained on a PC running Windows 11, equipped with a 500 GB solid-state drive, 12 GB of RAM, and a 2.8 GHz processor. In the two variants of the MVN Q test (Appendix 1), run times averaged 17.689 seconds and sample standard deviation (sd) 16.409, ranging from 2.030 to 52.950 seconds across the tested configurations. Memory usage averaged 13.317 MB (sd = 6.702), with values ranging from 3.554 to 30.212 MB. These benchmarks were obtained for sample sizes ranging from 50 to 500 (in increments of 50) and numbers of variables from 1 to 6 (in increments of 1), with a homogeneous correlation of 0.5. The results indicate a moderate computational cost, with substantial variability in run time depending on data size and dimensionality.</p>
   <p>For the two variants of the MVN Q’ test (Appendix 2), run times averaged 22.014 seconds (sd = 20.480), ranging from 2.570 to 66.990 seconds. Memory usage averaged 13.323 MB (sd = 6.702), ranging from 3.559 to 30.218 MB. These benchmarks, obtained under the same conditions as the Q test, suggest that Q’ generally requires slightly more processing time, particularly for larger configurations, while its memory footprint remains virtually identical to that of Q.</p>
   <p>In the Royston MVN H test (Appendix 3), run times averaged 0.030 seconds (sd = 0.040), ranging from 0.010 to 0.300 seconds. Memory usage averaged 1.704 MB (sd = 0.018), ranging from 1.657 to 1.749 MB. Using the same data configurations, this test was completed in a fraction of a second with minimal memory consumption, making it highly efficient and computationally inexpensive compared to both variants of the MVN Q and Q’ tests.</p>
  </sec><sec id="s3">
   <title>3. Application of the R Script for the Q-Test</title>
   <p>The three scripts were applied to four repeated measures in a sample of 50 participants. However, they can be adapted to other datasets by modifying the list of variables highlighted in blue. Appendix 1 provides the script used to generate a reproducible random sample of 50 observations across four correlated variables following a multivariate normal distribution. The resulting sample is presented in Appendix 2 and Appendix 3 under the “List of original variables” section. The scripts can be executed either on a local machine with R installed or online via the Snippets platform, which is available at <xref ref-type="bibr" rid="scirp.145868-https://rdrr.io/snippets/">
     https://rdrr.io/snippets/
    </xref>.</p>
   <p>In this example, the run time for the two variants of the MVN Q test (Appendix 1) was 10.6 seconds, with a memory usage of 23.683 MB. Similarly, the run time for the two variants of the MVN Q’ test (Appendix 2) was 10.5 seconds, also with a memory usage of 23.683 MB. In contrast, the run time for the Royston MVN H test (Appendix 3) was 0.06 seconds, with a memory usage of 1.670 MB. All tests were performed on a PC running Windows 11, equipped with a 500 GB solid-state drive, 12 GB of RAM, and a 2.8 GHz processor.</p>
   <p>To save the graphic as a JPG file, uncomment the corresponding lines by removing the hashtag symbols from the #jpeg(), #par(), and #dev.off() commands.</p>
   <sec id="s3_1">
    <title>3.1. The Chi-Square Approximation and Bootstrap Version of the Q-Test Based on Shapiro-Wilk W Statistics</title>
    <p>Sample size: n = 50.</p>
    <p>Number of variables in the original sample: k = 4.</p>
    <p>Arithmetic mean of the Pearson’s product-moment correlation coefficients between the variables: m(R<sub>4</sub><sub>×</sub><sub>4</sub>) = 0.5647.</p>
    <p>Level of significance: α = 0.05 for the chi-square approximation-based Q-test, and α = 0.10 for the bootstrap version of the Q-test, to compensate for the pronounced right-skewness in the sampling distribution of the Q statistic.</p>
    <p>Parameters for standardizing the 15 variables created by linear combination of the 4 original variables (<xref ref-type="table" rid="table1">
      Table 1
     </xref>):</p>
    <p>Expected value of ln(1 − W): μ = −3.850773.</p>
    <p>Standard deviation of ln(1 − W): σ = 0.4689044.</p>
    <p>According to the Shapiro-Wilk test (Royston, 1992), the null hypothesis of univariate normality is maintained for the 15 linear combinations at a 5% significance level, as shown in <xref ref-type="table" rid="table1">
      Table 1
     </xref>.</p>
    <table-wrap id="table1">
     <label>
      <xref ref-type="table" rid="table1">
       Table 1
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145868-"></xref>Table 1. Shapiro-Wilk’s univariate normality test with Royston’s standardization for the 15 linear combinations of variables.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">Comb</p></td> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">W</p></td> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">z</p></td> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">p</p></td> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">Norm</p></td> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">Comb</p></td> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">W</p></td> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">z</p></td> 
       <td class="custom-bottom-td acenter" width="10.95%"><p style="text-align:center">p</p></td> 
       <td class="custom-bottom-td acenter" width="10.96%"><p style="text-align:center">Norm</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">c1</p></td> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">0.980</p></td> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">−0.171</p></td> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">0.568</p></td> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">Yes</p></td> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">c9</p></td> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">0.978</p></td> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">0.032</p></td> 
       <td class="custom-top-td acenter" width="10.95%"><p style="text-align:center">0.487</p></td> 
       <td class="custom-top-td acenter" width="10.96%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c2</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.963</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">1.181</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.119</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c10</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.975</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.329</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.371</p></td> 
       <td class="acenter" width="10.96%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c3</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.966</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">1.004</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.158</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c11</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.980</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">−0.154</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.561</p></td> 
       <td class="acenter" width="10.96%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c4</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.988</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">−1.131</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.871</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c12</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.986</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">−0.946</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.828</p></td> 
       <td class="acenter" width="10.96%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c5</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.992</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">−2.108</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.983</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c13</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.986</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">−0.906</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.818</p></td> 
       <td class="acenter" width="10.96%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c6</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.987</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">−0.972</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.834</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c14</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.971</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.671</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.251</p></td> 
       <td class="acenter" width="10.96%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c7</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.990</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">−1.519</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.936</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c15</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.982</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">−0.316</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.624</p></td> 
       <td class="acenter" width="10.96%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="10.95%"><p style="text-align:center">c8</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.964</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">1.131</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">0.129</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="10.95%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="10.96%"><p style="text-align:center"></p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>Note. Comb = sum of the corresponding combination without repetition of variables; W = Shapiro-Wilk W statistic; z = standardized value of W using Royston’s method; p = right-tailed p-value under the standard normal distribution; Norm = Univariate normality: Yes = p ≥ α = 0.05 , the null hypothesis of normality is retained; No = p &lt; 0.05, the null hypothesis is rejected.</p>
    <p>Q-test statistic value in the original sample: q = 4.2403.</p>
    <p>Number of combinations among the 4 original variables: nc = 15.</p>
    <p>Number of z-values truncated to zero because they are negative: a = 9.</p>
    <p>Degrees of freedom: df = 15. For the chi-square approximation of the QSW test, the values set to zero were not subtracted from the degrees of freedom in order to compensate for the pronounced right-skewness of the sampling distribution—an effect revealed by the bootstrap approach. Subtracting them would reduce the degrees of freedom to 6.</p>
    <p>Critical value or 0.95 quantile of the chi-square distribution with 15 degrees of freedom: <sub>0.95</sub>χ<sup>2</sup><sub>[15]</sub> = 24.9958. The null hypothesis of multivariate normality is retained at a significance level of 0.05 based on the chi-square approximation critical value.</p>
    <p>Right-tailed probability value under the chi-square distribution with 15 degrees of freedom: p = 0.9968. The null hypothesis of multivariate normality is retained at a significance level of 0.05 based on the chi-square approximation p-value.</p>
    <p>Statistical power based on the chi-square approximation at a significance level of 0.05: φ = 0.1889.</p>
    <p>In the sequence of 15 standardized Shapiro-Wilk W values <xref ref-type="bibr" rid="scirp.145868-3">
      [3]
     </xref>—truncated to 0 when negative (a = 9)—used to compute the Q-test statistic, no evidence of serial dependence was found according to the Wald-Wolfowitz runs test <xref ref-type="bibr" rid="scirp.145868-19">
      [19]
     </xref> and the Ljung-Box test <xref ref-type="bibr" rid="scirp.145868-21">
      [21]
     </xref>. The maximum lag was determined based on a general rule for non-stationary series: min (10, nc/5) = min (10, 15/5) = 3 <xref ref-type="bibr" rid="scirp.145868-23">
      [23]
     </xref>. According to Schwert’s rule <xref ref-type="bibr" rid="scirp.145868-25">
      [25]
     </xref>, the maximum lag would be 7. Refer to <xref ref-type="table" rid="table2">
      Table 2
     </xref>for further details.</p>
    <p>Runs Test for Randomness: runs = 7, m = 9, n = 6, p-value = 0.5804 &gt; α = 0.05.</p>
    <table-wrap id="table2">
     <label>
      <xref ref-type="table" rid="table2">
       Table 2
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145868-"></xref>Table 2. Ljung-Box test for serial independence of z_w values.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="20.34%"><p style="text-align:center">Lag</p></td> 
       <td class="custom-bottom-td acenter" width="44.49%"><p style="text-align:center">X-square</p></td> 
       <td class="custom-bottom-td acenter" width="22.02%"><p style="text-align:center">df</p></td> 
       <td class="custom-bottom-td acenter" width="22.64%"><p style="text-align:center">p-value</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="20.34%"><p style="text-align:center">1</p></td> 
       <td class="custom-top-td acenter" width="44.49%"><p style="text-align:center">0.0258</p></td> 
       <td class="custom-top-td acenter" width="22.02%"><p style="text-align:center">1</p></td> 
       <td class="custom-top-td acenter" width="22.64%"><p style="text-align:center">0.8724</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="20.34%"><p style="text-align:center">2</p></td> 
       <td class="acenter" width="44.49%"><p style="text-align:center">0.6219</p></td> 
       <td class="acenter" width="22.02%"><p style="text-align:center">2</p></td> 
       <td class="acenter" width="22.64%"><p style="text-align:center">0.7327</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="20.34%"><p style="text-align:center">3</p></td> 
       <td class="acenter" width="44.49%"><p style="text-align:center">1.7434</p></td> 
       <td class="acenter" width="22.02%"><p style="text-align:center">3</p></td> 
       <td class="acenter" width="22.64%"><p style="text-align:center">0.6273</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>Note. Lag = step between values forming the autocorrelation pairs; X-square = test statistic; df = degrees of freedom; p-value = right-tailed probability under the chi-square distribution.</p>
    <p>Empirical bootstrap distribution (with preserved correlations) derived from the original sample:</p>
    <p>Number of bootstrap samples: B = 1000.</p>
    <p>Right-tailed bootstrap p-value: p<sub>boot</sub> = 0.999. The null hypothesis of multivariate normality is not rejected at the 0.05 significance level based on the bootstrap p-value obtained from the empirical bootstrap distribution.</p>
    <p>Normative bootstrap distribution (with preserved correlation):</p>
    <p>Number of bootstrap samples: B = 1000.</p>
    <p>Q-test statistic value in the normative sample: q<sub>mvn_boot</sub> = 15.24668.</p>
    <p>Mean of the normative bootstrap distribution: m(mvn_boot_dist) = 49.14216.</p>
    <p>Median of the normative bootstrap distribution: mdn(mvn_boot_dist) = 46.84413.</p>
    <p>Two-tailed p-value for testing whether the empirical bootstrap distribution is centered on the median of the normative bootstrap distribution: p<sub>2-tailed</sub> = 0.338. The null hypothesis of equal medians between the normative and empirical bootstrap distributions is not rejected at a significance level of 0.1.</p>
    <p>Bootstrap critical value (0.9 quantile of the normative bootstrap distribution): q<sub>crit</sub> = 75.4841. The null hypothesis of multivariate normality is not rejected at a significance level of 0.1 based on the critical value from the normative bootstrap distribution.</p>
    <p>Right-tailed p-value in the normative bootstrap distribution: p<sub>mvn_boot</sub> = 1. The null hypothesis of multivariate normality is not rejected at a significance level of 0.1 based on the bootstrap p-value.</p>
    <p>Bootstrap statistical power at a significance level of 0.1: phi_boot = 0.018.</p>
    <p>
     <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref>shows that the value of the Q statistic lies to the left of the critical values of both the chi-square and the normative bootstrap distributions. This indicates that it falls within the acceptance region of the null hypothesis of multivariate normality. The empirical and normative bootstrap distributions are similar and deviate from the chi-square distribution by exhibiting lower peaks, flatter shoulders, and heavier right tails, consistent with a generalized chi-square distribution. However, when the assumption of serial independence is met, the chi-square approximation remains a valid alternative for estimating the p-value and making decisions regarding the null hypothesis.</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145868-"></xref>Figure 1. Histogram (yellow) with density curves for the empirical bootstrap (yellow), normative bootstrap (red), and chi-square (green) distributions. The value of the Q-test statistic in original sample is indicated by a purple vertical line (q = 4.2403), the critical value of the normative bootstrap distribution by a red vertical line (0.9 quantile: q_mvn_boot = 75.4841), and the critical value of the chi-square distribution with 15 degrees of freedom by a green vertical line (0.95 quantile: <sub>0.95</sub>χ<sup>2</sup><sub>[15]</sub> = 24.9958).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870840-rId36.jpeg?20250923013803" />
    </fig>
   </sec>
   <sec id="s3_2">
    <title>3.2. The Chi-Square Approximation and Bootstrap Version of the Q-Test Based on Shapiro-Francia W’ Statistics</title>
    <p>The script for running the multivariate normality Q’-test—calculated using the standardized values of the Shapiro-Francia univariate normality W’ statistics <xref ref-type="bibr" rid="scirp.145868-5">
      [5]
     </xref>—is provided in Appendix 2. It applies to the same sample of fifty 4-tuples.</p>
    <p>Arithmetic mean of the Pearson’s product-moment correlation coefficients between the variables: m(R₄<sub>×</sub>₄) = 0.5647.</p>
    <p>Parameters for standardizing the 15 variables created by linear combination of the 4 original variables:</p>
    <p>Expected value of ln(1 − W’): μ = −3.9532.</p>
    <p>Standard deviation of ln(1 − W’): σ = 0.5290.</p>
    <p>According to the Shapiro-Francia test (Royston, 1993) <xref ref-type="bibr" rid="scirp.145868-5">
      [5]
     </xref>, the null hypothesis of univariate normality is maintained for the 15 linear combinations at a 5% significance level, as shown in <xref ref-type="table" rid="table3">
      Table 3
     </xref>.</p>
    <table-wrap id="table3">
     <label>
      <xref ref-type="table" rid="table3">
       Table 3
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145868-"></xref>Table 3. Shapiro-Francia’s univariate normality test with Royston’s standardization for the 15 linear combinations of variables.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="9.99%"><p style="text-align:center">Comb</p></td> 
       <td class="custom-bottom-td acenter" width="9.99%"><p style="text-align:center">W</p></td> 
       <td class="custom-bottom-td acenter" width="9.99%"><p style="text-align:center">z</p></td> 
       <td class="custom-bottom-td acenter" width="9.99%"><p style="text-align:center">p</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Norm</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">Comb</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">W</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">z</p></td> 
       <td class="custom-bottom-td acenter" width="10.00%"><p style="text-align:center">p</p></td> 
       <td class="custom-bottom-td acenter" width="10.02%"><p style="text-align:center">Norm</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="9.99%"><p style="text-align:center">c1</p></td> 
       <td class="custom-top-td acenter" width="9.99%"><p style="text-align:center">0.980</p></td> 
       <td class="custom-top-td acenter" width="9.99%"><p style="text-align:center">0.042</p></td> 
       <td class="custom-top-td acenter" width="9.99%"><p style="text-align:center">0.483</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">Yes</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">c9</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">0.978</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">0.222</p></td> 
       <td class="custom-top-td acenter" width="10.00%"><p style="text-align:center">0.412</p></td> 
       <td class="custom-top-td acenter" width="10.02%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">c2</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.963</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">1.240</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.107</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">c10</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.975</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.485</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.314</p></td> 
       <td class="acenter" width="10.02%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">c3</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.966</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">1.083</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.139</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">c11</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.980</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.058</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.477</p></td> 
       <td class="acenter" width="10.02%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">c4</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.988</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">−0.808</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.791</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">c12</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.986</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">−0.645</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.740</p></td> 
       <td class="acenter" width="10.02%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">c5</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.992</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">−1.675</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.953</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">c13</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.986</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">−0.609</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.729</p></td> 
       <td class="acenter" width="10.02%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">c6</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.987</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">−0.668</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.748</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">c14</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.971</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.789</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.215</p></td> 
       <td class="acenter" width="10.02%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">c7</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.990</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">−1.153</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.876</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">c15</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.982</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">−0.087</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">0.535</p></td> 
       <td class="acenter" width="10.02%"><p style="text-align:center">Yes</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="9.99%"><p style="text-align:center">c8</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.964</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">1.196</p></td> 
       <td class="acenter" width="9.99%"><p style="text-align:center">0.116</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center">Yes</p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="10.00%"><p style="text-align:center"></p></td> 
       <td class="acenter" width="10.02%"><p style="text-align:center"></p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>Note. Comb = sum of the corresponding combination without repetition of variables; W’ = Shapiro-Francia W’ statistic; z = standardized value of W’ using Royston’s method; p = right-tailed p-value under the standard normal distribution; Norm = Univariate normality: Yes = p ≥ α = 0.05, the null hypothesis of normality is retained; No = p &lt; 0.05, the null hypothesis is rejected.</p>
    <p>Q’-test statistic value in the original sample: q = 1.8161.</p>
    <p>Number of combinations among the 4 original variables: nc = 15.</p>
    <p>Number of z-values truncated to zero because they are negative: a = 10.</p>
    <p>Degrees of freedom: df = 15.</p>
    <p>Critical value or 0.95 quantile of the chi-square distribution with 15 degrees of freedom: <sub>1</sub><sub>−</sub><sub>α</sub>χ²<sub>[</sub><sub>df</sub><sub>]</sub> = 24.9958. The null hypothesis of multivariate normality is retained at a significance level of 0.05 based on the chi-square approximation critical value.</p>
    <p>Right-tailed probability value under the chi-square distribution with 15 degrees of freedom: p = 1. The null hypothesis of multivariate normality is retained at a significance level of 0.05 based on the chi-square approximation p-value.</p>
    <p>Statistical power based on the chi-square approximation at a significance level of 0.05: φ = 0.0992.</p>
    <p>In the sequence of 15 standardized Shapiro-Francia W’ values—truncated to 0 when negative (a = 10)—used to compute the Q’-statistic, no serial dependence was found according to the Wald-Wolfowitz runs test <xref ref-type="bibr" rid="scirp.145868-19">
      [19]
     </xref> and the Ljung-Box test <xref ref-type="bibr" rid="scirp.145868-21">
      [21]
     </xref> (<xref ref-type="table" rid="table4">
      Table 4
     </xref>). The maximum lag is determined by a general rule for non-stationary series: min (10, nc/5) = min (10, 15/5) = 3 <xref ref-type="bibr" rid="scirp.145868-23">
      [23]
     </xref>. According to Schwert’s rule <xref ref-type="bibr" rid="scirp.145868-25">
      [25]
     </xref>, the maximum lag would be 7.</p>
    <p>Runs Test for Randomness. data: z_w: runs = 9, m = 10, n = 5, p-value = 0.5604.</p>
    <table-wrap id="table4">
     <label>
      <xref ref-type="table" rid="table4">
       Table 4
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145868-"></xref>Table 4. Ljung-Box test for serial independence of z_w’ values.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="20.34%"><p style="text-align:center">Lag</p></td> 
       <td class="custom-bottom-td acenter" width="44.49%"><p style="text-align:center">X-square</p></td> 
       <td class="custom-bottom-td acenter" width="22.02%"><p style="text-align:center">df</p></td> 
       <td class="custom-bottom-td acenter" width="22.64%"><p style="text-align:center">p-value</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="20.34%"><p style="text-align:center">1</p></td> 
       <td class="custom-top-td acenter" width="44.49%"><p style="text-align:center">0.1120</p></td> 
       <td class="custom-top-td acenter" width="22.02%"><p style="text-align:center">1</p></td> 
       <td class="custom-top-td acenter" width="22.64%"><p style="text-align:center">0.7378</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="20.34%"><p style="text-align:center">2</p></td> 
       <td class="acenter" width="44.49%"><p style="text-align:center">0.7789</p></td> 
       <td class="acenter" width="22.02%"><p style="text-align:center">2</p></td> 
       <td class="acenter" width="22.64%"><p style="text-align:center">0.6774</p></td> 
      </tr> 
      <tr> 
       <td class="acenter" width="20.34%"><p style="text-align:center">3</p></td> 
       <td class="acenter" width="44.49%"><p style="text-align:center">1.6893</p></td> 
       <td class="acenter" width="22.02%"><p style="text-align:center">3</p></td> 
       <td class="acenter" width="22.64%"><p style="text-align:center">0.6393</p></td> 
      </tr> 
     </table>
    </table-wrap>
    <p>Note. Lag = step between values forming the autocorrelation pairs; X-square = test statistic; df = degrees of freedom; p-value = right-tailed probability under the chi-square distribution.</p>
    <p>Empirical bootstrap distribution (with preserved correlations) derived from the original sample:</p>
    <p>Number of bootstrap samples: B = 1000.</p>
    <p>Right-tailed bootstrap p-value: p<sub>boot</sub> = 1.</p>
    <p>The null hypothesis of multivariate normality is not rejected at the 0.05 significance level based on the bootstrap p-value obtained from the empirical bootstrap distribution.</p>
    <p>Normative bootstrap distribution (with preserved correlation):</p>
    <p>Number of bootstrap samples: B = 1000.</p>
    <p>Q’-test statistic value in the normative sample: q<sub>mvn_boot</sub> = 8.0623.</p>
    <p>Mean of the normative bootstrap distribution: m(mvn_boot_dist) = 33.31423.</p>
    <p>Median of the normative bootstrap distribution: mdn(mvn_boot_dist) = 30.7692.</p>
    <p>Two-tailed p-value for testing whether the empirical bootstrap distribution is centered on the median of the normative bootstrap distribution: p<sub>2-tailed</sub> = 0.49. The null hypothesis of equal medians between the normative and empirical bootstrap distributions is not rejected at a significance level of 0.1.</p>
    <p>Bootstrap critical value (0.9 quantile of the normative bootstrap distribution): q<sub>crit</sub> = 53.4975. The null hypothesis of multivariate normality is not rejected at a significance level of 0.1 based on the critical value from the normative bootstrap distribution.</p>
    <p>Right-tailed p-value in the normative bootstrap distribution: p<sub>mvn_boot</sub> = 1. The null hypothesis of multivariate normality is not rejected at a significance level of 0.1 based on the bootstrap p-value.</p>
    <p>Bootstrap statistical power at a significance level of 0.1: phi_boot = 0.037.</p>
    <p>
     <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref> shows that the value of the Q’-statistic lies to the left of both the critical value (95th percentile) of the chi-square distribution with 15 degrees of freedom and the critical value (90th percentile) of the normative bootstrap distribution. This indicates that the null hypothesis of multivariate normality is accepted.</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.145868-"></xref>Figure 2. Histogram (yellow) with density curves for the empirical bootstrap (yellow), normative bootstrap (red), and chi-square (green) distributions. The value of the Q’-test statistic in original sample is indicated by a purple vertical line (q’ = 1.8160), the critical value of the normative bootstrap distribution by a red vertical line (0.9 quantile: q_mvn_boot = 53.4975), and the critical value of the chi-square distribution with 15 degrees of freedom by a green vertical line (0.95 quantile: <sub>0.95</sub>χ<sup>2</sup><sub>[15]</sub> = 24.9958).</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/2870840-rId37.jpeg?20250923013803" />
    </fig>
    <p>Furthermore, the distributions of the Q’-statistic generated by nonparametric and parametric bootstrap methods (based on Gaussian vectors with a correlational structure equivalent to that of the original data) are similar. Both deviate from the chi-square distribution with 15 degrees of freedom by exhibiting a lower peak, flatter shoulders, and a heavier right tail, consistent with a generalized chi-square distribution.</p>
    <p>To compensate for this heavier right tail, a 90th percentile is used as the critical value for the normative bootstrap distribution. In addition, the correction that subtracts the number of q’ values truncated to zero when computing the degrees of freedom of the chi-square distribution was omitted (df = 15 without correction vs. df = 5 with correction).</p>
   </sec>
   <sec id="s3_3">
    <title>3.3. H-Test</title>
    <p>When assessing multivariate normality using Royston’s H-test <xref ref-type="bibr" rid="scirp.145868-2">
      [2]
     </xref>, the null hypothesis of normality was not rejected (H = 4.8778, df = 4.0988, p = 0.3127 &gt; α = 0.05). Since the null hypothesis was not rejected, the test exhibited statistical power below 0.5 (ϕ = 0.3833) at a 0.05 significance level. Appendix 3 provides the R script used for these calculations.</p>
   </sec>
  </sec><sec id="s4">
   <title>4. Discussion</title>
   <p>The objective of the study was to develop a script for the R program and demonstrate its use. For practical purposes, three separate scripts were created. The first script applies both the chi-square approximation and the bootstrap version of the Q-test using the Shapiro-Wilk W statistic (QSWa and QSWb). The second script performs the same procedures using the Shapiro-Francia W’ statistic (QSFa and QSFb). The third script applies the H-test proposed by Royston (1983). All three scripts include the calculation of the critical value, p-value, and statistical power. As an example, the three scripts were run on a dataset of 50 observations on four correlated variables, representing total scores on a personality scale (alexithymia) collected at four annual time points. The repeatedly measured variable had a discrete range from 20 to 100.</p>
   <p>It was expected that the assumption of multivariate normality would be consistently supported by all five MVN tests. As anticipated, the null hypothesis of multivariate normality was retained by all five tests when statistical power was below 0.5. Power was low for the H-test and very low for the four Q-test variants, with the two bootstrap versions showing lower power than the two based on the chi-square approximation.</p>
   <p>Since the assumption of serial independence is satisfied, the Q-test version based on the chi-square approximation is a suitable method for calculating the critical value, p-value, and statistical power, as well as for making decisions regarding the null hypothesis. In this case, the statistical power is lower—indicating better test performance when the null hypothesis is true—when using the Shapiro-Francia W’ statistic compared to the Shapiro-Wilk W statistic.</p>
   <p>The profiles of the sampling distribution generated through repeated sampling—whether using the multivariate standard normal distribution (parametric bootstrap) or the original sample (nonparametric bootstrap)—are similar to each other, but both differ from the contour of the chi-square distribution on which the Q-test’s approximate calculation is based. This approximation relies on the assumption that the theoretical sampling distribution of the sum of squares of independent standard normal variables follows a chi-square distribution with degrees of freedom equal to the number of summed variables <xref ref-type="bibr" rid="scirp.145868-1">
     [1]
    </xref>. Consequently, the bootstrap version is theoretically more robust. It is worth noting that when the Shapiro-Francia W’ statistic is used, the three distributional profiles are more similar than when the Shapiro-Wilk W statistic is applied. This is a desirable property, in addition to the lower power when the null hypothesis is retained—as in the present case—or higher power when it is rejected.</p>
   <p>
    <xref ref-type="bibr" rid="scirp.145868-"></xref>The generated profiles are less peaked and exhibit a heavier right tail than the chi-square distribution, as they correspond to a generalized chi-square distribution resulting from the sum of squares of correlated variables <xref ref-type="bibr" rid="scirp.145868-34">
     [34]
    </xref>. These profiles, characterized by pronounced positive skewness, explain why the number of truncated z’ or z-values (df = 15 uncorrected vs. 6 corrected in QSWa, and df = 15 vs. 5 in QSFa) is not excluded when calculating the degrees of freedom for the chi-square distribution. As a result, the critical value of the chi-square approximation shifts further to the right. For the normative bootstrap distribution, the quantile is adjusted from 0.95 to 0.90 to account for its substantially heavier right tail, thereby shifting the critical value to the left. These adjustments aim to bring the conclusions derived from both distributions—the chi-square and the generalized chi-square—closer together. In the example shown, closer alignment is more effectively achieved using the variants based on the Shapiro-Francia W’ statistic.</p>
   <p>The proximity of the two bootstrap distributions—normative and empirical—can be assessed not only visually using the graph provided by the script, but also statistically by testing the equivalence of their medians. In the example shown, this equivalence is positively corroborated, supporting the claim that the two bootstrap distributions are similar.</p>
   <p>The normative bootstrap distribution is used in place of the chi-square distribution to calculate the probability value, and it enables the determination of the cut-off point (critical value) for defining the rejection region and estimating statistical power within the empirical bootstrap distribution. It is worth noting that one of the key advantages of the bootstrap method is its ability to approximate the sampling distribution of an estimator or test statistic without requiring parametric assumptions <xref ref-type="bibr" rid="scirp.145868-27">
     [27]
    </xref>.</p>
   <p>Accordingly, the script also computes the probability value based on the empirical sampling distribution obtained via non-parametric bootstrap. This approach is particularly common when the null hypothesis pertains to a descriptive or association measure with an unknown sampling distribution. Conversely, when the null hypothesis concerns a known distribution (e.g., multivariate normal), parametric bootstrap under that assumption is preferred <xref ref-type="bibr" rid="scirp.145868-27">
     [27]
    </xref>.</p>
   <p>The three scripts developed to assess normality assume that the tested distribution is continuous; therefore, the measured variables must be continuous or treated as such, even if their values are recorded as integers—as in the case of intelligence quotient scores in cognitive tests. Nevertheless, several discrete distributions converge toward normality, such as the binomial distribution when n (the number of independent trials) tends toward infinity and p (the probability of success) approaches 0.5. This allows for broader application to discrete values, meaning the data do not necessarily need to include decimal numbers.</p>
   <p>One limitation of this study is that it does not assess the performance of the test in terms of hit rate and statistical power under both normal and non-normal multivariate distributions. In this regard, it is important to consider factors such as sample size, number of variables, and inter-variable correlations <xref ref-type="bibr" rid="scirp.145868-35">
     [35]
    </xref>. Additionally, comparing the four versions of the Q-test with each other and with the H-test—and even with another MVN test, such as the one proposed by Henze and Zirkler <xref ref-type="bibr" rid="scirp.145868-36">
     [36]
    </xref>—would be valuable. It is recommended that future research address these aspects.</p>
   <p>A basic simulation scenario would involve generating samples from multivariate normal distributions as well as from one or two types of non-normal multivariate distributions—specifically, Student’s t distributions with 5 degrees of freedom and uniform distributions. The samples would vary in size (ranging from 50 to 1000, in increments of 50), in the number of variables (distribution parameter: from 2 to 6), and in the level of homogeneous correlation among variables (distribution parameter: from 0 to 0.9, in increments of 0.1), resulting in 1000 samples per distribution. Applying the three scripts to these samples and comparing the hit rates and statistical power (or the complement of power in the case of samples drawn from multivariate normal distributions) would yield valuable insights into the performance of the tests.</p>
  </sec><sec id="s5">
   <title>5. Conclusions</title>
   <p>For the Q-test, the chi-square approach is a good option if the assumption of serial independence holds, as in this sample of 50 observations of four-tuples. However, if this assumption is violated, the bootstrap version is theoretically more appropriate. In such cases, it is advisable to compute the Q-test using a 10% significance level. As shown in the example, the bootstrap variant of the Q-test performed best when calculated using the Shapiro-Francia W’ statistic. This approach is more conservative regarding the null hypothesis of multivariate normality than the H-test and chi-square approximation-based Q-test variants. Based on the sampling distribution of the Q statistic revealed by the bootstrap method, subtracting the number of z or z’-statistics truncated to zero when calculating the degrees of freedom in chi-square approximation-based Q-test variants is not recommended.</p>
   <p>Using these three scripts for the four Q-test variants and the H-test is recommended. Convergence of results between the Q-test and the H-test when running the scripts reinforces the validity of the conclusions drawn.</p>
  </sec><sec id="s6">
   <title>Acknowledgements</title>
   <p>The author expresses gratitude for the reviewers and editor for their helpful comments.</p>
  </sec><sec id="s7">
   <title>
    <xref ref-type="bibr" rid="scirp.145868-"></xref>Appendix 1. QSW Test</title>
   <p># The chi-square approximation and bootstrap version of the multivariate normality Q-test based on Shapiro–Wilk univariate normality statistics standardized by Royston’s method, for sample sizes ranging from 12 to 2000 with k-tuples of measurements</p>
   <p># Load four required R packages</p>
   <p>library(nortest)</p>
   <p>library(MASS)</p>
   <p>library(DescTools)</p>
   <p>library(stats)</p>
   <p># List of original variables</p>
   <p>
    <xref ref-type="bibr" rid="scirp.145868-"></xref># Generate a random sample of 50 observations from a multivariate normal distribution with four correlated variables</p>
   <p># Load the necessary R package</p>
   <p>library(mvtnorm)</p>
   <p>Parameters</p>
   <p>n &lt;- 50 # Number of observations</p>
   <p>k &lt;- 4 # Number of variables</p>
   <p>rho &lt;- 0.7 # Homogeneous correlation coefficient</p>
   <p># Create the covariance matrix with rho as off-diagonal values and 1s on the diagonal</p>
   <p>sigma &lt;- matrix(rho, nrow = k, ncol = k)</p>
   <p>diag(sigma) &lt;- 1</p>
   <p># Set seed for reproducibility</p>
   <p>set.seed(123)</p>
   <p># Generate multivariate normal data</p>
   <p>mvn_data &lt;- rmvnorm(n = n, sigma = sigma)</p>
   <p># Scale the values to approximate D-scores</p>
   <p>x1 &lt;- 48 + 10 * round(mvn_data[, 1], 1)</p>
   <p>x2 &lt;- 48 + 10 * round(mvn_data[, 2], 1)</p>
   <p>x3 &lt;- 48 + 10 * round(mvn_data[, 3], 1)</p>
   <p>x4 &lt;- 48 + 10 * round(mvn_data[, 4], 1)</p>
   <p># Combine into a data frame</p>
   <p>original_data &lt;- data.frame(x1, x2, x3, x4)</p>
   <p># Display the generated data</p>
   <p>print(original_data)</p>
   <p># Sample size, number of variables, and level of significance</p>
   <p>n &lt;- length(x1)</p>
   <p>cat("Sample size: n =", n, ".")</p>
   <p>k &lt;- length(original_data)</p>
   <p>cat("Number of variables in the original sample: k =", k, ".")</p>
   <p>
    <xref ref-type="bibr" rid="scirp.145868-"></xref>R &lt;- cor(original_data)</p>
   <p>m_R &lt;- mean(R[lower.tri(R)])</p>
   <p>cat("Arithmetic mean of the Pearson’s product-moment correlation coefficients between the variables: m(R) =", round(m_R, 4), ".")</p>
   <p>alpha &lt;- 0.05</p>
   <p># Generate the sums of all non-repeated combinations of the variables</p>
   <p>linear_combinations &lt;- function(df) {</p>
   <p>list_combinations &lt;- list()</p>
   <p>k &lt;- ncol(df)</p>
   <p># Add the original variables (combinations of size 1)</p>
   <p>for (i in 1:k) {</p>
   <p>list_combinations[[paste0("c", i)]] &lt;- df[, i]}</p>
   <p># Add combinations of size from 2 to k</p>
   <p>counter &lt;- k</p>
   <p>for (i in 2:k) {</p>
   <p>combinations &lt;- combn(k, i)</p>
   <p>for (j in 1:ncol(combinations)) {</p>
   <p>idx &lt;- combinations[, j]</p>
   <p>counter &lt;- counter + 1</p>
   <p>list_combinations[[paste0("c", counter)]] &lt;- rowSums(df[, idx])}}</p>
   <p>return(list_combinations)}</p>
   <p>list_x &lt;- linear_combinations(original_data)</p>
   <p># Calculation of common parameters for standardizing samples from 12 to 2000 data points</p>
   <p>mu &lt;- 0.0038915 * log(n)^3 - 0.083751 * log(n)^2 - 0.31082 * log(n) - 1.5861</p>
   <p>sigma &lt;- exp(0.0030302 * log(n)^2 - 0.082676 * log(n) - 0.4803)</p>
   <p>cat("Parameters for standardizing the", 2^k - 1, "variables created by linear combination of the", k, "original variables:")</p>
   <p>cat("Expected value of ln(1-W): μ =", mu, ".")</p>
   <p>cat("Standard deviation of ln(1-W): σ =", sigma, ".")</p>
   <p># Apply test and save results to a table</p>
   <p>results &lt;- lapply(names(list_x), function(label) {</p>
   <p>data &lt;- list_x[[label]]</p>
   <p>result &lt;- shapiro.test(data)</p>
   <p>z &lt;- (log(1 - result$statistic) - mu) / sigma</p>
   <p>p &lt;- 1 - pnorm(z)</p>
   <p>Normality &lt;- if (result$p.value &lt; alpha) "No" else "Yes"</p>
   <p>return(c(label, round(result$statistic, 4), round(z, 4), round(p, 4), Normality))</p>
   <p>})</p>
   <p># Convert to data frame</p>
   <p>table_results &lt;- as.data.frame(do.call(rbind, results), stringsAsFactors = FALSE)</p>
   <p>colnames(table_results) &lt;- c("Combination", "W", "z", "p", "Normality")</p>
   <p># Display the table</p>
   <p>cat("Tabla. Shapiro-Wilk’s univariate normality test with Royston’s standardization for the", 2^k-1, "linear combinations of variables")</p>
   <p>print(table_results, row.names = FALSE)</p>
   <p>cat("Note. Combination = sum of the corresponding combination without repetition of variables; W = Shapiro–Wilk W statistic; z = standardized value of W using Royston’s method; p = right-tailed p-value under the standard normal distribution; Univariate normality: Yes = p ≥ α =", alpha, ", the null hypothesis of normality is retained; No = p &lt;", alpha, ", the null hypothesis is rejected.")</p>
   <p># Function to calculate Q-test statistic (QSW)</p>
   <p>calculate_q &lt;- function(list_data) {</p>
   <p>z_vals &lt;- sapply(list_data, function(x) {</p>
   <p>result_sw &lt;- shapiro.test(x)</p>
   <p>z &lt;- (log(1 - result_sw$statistic) - mu) / sigma</p>
   <p>return(as.numeric(z))</p>
   <p>})</p>
   <p>z_values &lt;- ifelse(z_vals &lt; 0, 0, z_vals)</p>
   <p>a &lt;- sum(z_vals &lt; 0)</p>
   <p>q &lt;- sum(z_values^2)</p>
   <p>return(list(q = q, a = a, z_vals = z_vals, z_values = z_values))</p>
   <p>}</p>
   <p># Right-tailed p-value and statistical power based on the chi-square distribution</p>
   <p>result_q &lt;- calculate_q(list_x)</p>
   <p>q_stat &lt;- result_q$q</p>
   <p>a &lt;- result_q$a</p>
   <p>nc &lt;- length(list_x)</p>
   <p># df_chisq &lt;- nc - a # Correction for truncated z-values</p>
   <p>df_chisq &lt;- nc # No correction for truncated z-values</p>
   <p>q_crit &lt;- qchisq(1 - alpha, df = df_chisq)</p>
   <p>p_value &lt;- pchisq(q_stat, df = df_chisq, lower.tail = FALSE)</p>
   <p>power &lt;- 1 - pchisq(q_crit, df = df_chisq, ncp = q_stat, lower.tail = TRUE)</p>
   <p># Results for QSWa</p>
   <p>cat("Number of combinations among the", k, "original variables: nc =", nc, ".")</p>
   <p>cat("Number of z-values truncated to zero because they are negative: a =", a, ".")</p>
   <p>cat("Degrees of freedom: df =", df_chisq, ".")</p>
   <p>cat("Q-test statistic value in the original sample: q =", round(q_stat, 4), ".")</p>
   <p>cat("Right-tailed p-value and critical value based on the chi-square distribution:")</p>
   <p>cat("Critical value or", 1 - alpha, "quantile of the chi-square distribution with", df_chisq, "degrees of freedom: 1-αχ²[df] =", round(q_crit, 4), ".")</p>
   <p>if (q_stat &lt;= q_crit) {</p>
   <p>cat("The null hypothesis of multivariate normality is retained at a significance level of", alpha, "based on the chi-square approximation critical value.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at a significance level of", alpha, "based on the chi-square approximation critical value.")}</p>
   <p>cat("Right-tailed probability value under the chi-square distribution with", df_chisq, "degrees of freedom: p =", round(p_value, 4), ".")</p>
   <p>if (p_value &lt; alpha) {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at a significance level of", alpha, "based on the chi-square approximation p-value.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is retained at a significance level of", alpha, " based on the chi-square approximation p-value.")}</p>
   <p>cat("Statistical power based on the chi-square approximation at a significance level of", alpha, ": φ =", power, ".")</p>
   <p>cat("If the null hypothesis is rejected, the statistical power should exceed 0.5, preferably 0.8 or higher.")</p>
   <p>cat("If the null hypothesis is not rejected, the statistical power should be below 0.5, preferably under 0.2.")</p>
   <p>cat("Otherwise, the result is contradictory or questionable.")</p>
   <p># Test for serial independence in z_w values.</p>
   <p>z_w &lt;- result_q$z_values</p>
   <p>cat("Test of the serial independence of the", nc, "standardized W values (with negative values truncated to 0) used to compute the Q-test statistic.")</p>
   <p>RunsTest(z_w, y = NULL, alternative = "two.sided", exact = TRUE, correct = FALSE)</p>
   <p>lag_max &lt;- min(10, round(nc/5, 0))</p>
   <p># lag_max &lt;- 12 * (n/100)^0.25 # Schwert’s rule to determinate the maximum lag.</p>
   <p>ljung_box_test &lt;- lapply(1: lag_max, function(k) Box.test(z_w, lag = k, type = "Ljung-Box", fitdf = 0))</p>
   <p>ljung_box_table &lt;- data.frame(</p>
   <p>lag = 1:lag_max,</p>
   <p>X_squared = sapply(ljung_box_test, function(x) round(x$statistic, 4)),</p>
   <p>df = sapply(ljung_box_test, function(x) round(x$parameter, 4)),</p>
   <p>p_value = sapply(ljung_box_test, function(x) round(x$p.value, 4))</p>
   <p>)</p>
   <p>cat("Table: Ljung–Box test for serial independence of z_w values")</p>
   <p>print(ljung_box_table)</p>
   <p>cat("Note. Lag = step between values forming the autocorrelation pairs; X-square = test statistic; df = degrees of freedom; p-value = right-tailed probability under the chi-square distribution.")</p>
   <p># Bootstrap function preserving the correlations of the original sample</p>
   <p>resample_preserving_corr &lt;- function(df, B) {</p>
   <p>replicate(B, {</p>
   <p>df[sample(1:nrow(df), size = nrow(df), replace = TRUE), ]</p>
   <p>}, simplify = FALSE)</p>
   <p>}</p>
   <p># Function to generate list of combinations</p>
   <p>generate_list_boot &lt;- function(df) {</p>
   <p>list_boot &lt;- setNames(as.list(df), paste0("c", 1:ncol(df)))</p>
   <p>for (i in 2:ncol(df)) {</p>
   <p>combinations &lt;- combn(ncol(df), i)</p>
   <p>for (j in 1:ncol(combinations)) {</p>
   <p>idx &lt;- combinations[, j]</p>
   <p>label &lt;- paste0("c", length(list_boot) + 1)</p>
   <p>list_boot[[label]] &lt;- rowSums(df[, idx])</p>
   <p>}</p>
   <p>}</p>
   <p>return(list_boot)</p>
   <p>}</p>
   <p># Bootstrap simulations preserving correlations</p>
   <p>set.seed(123)</p>
   <p>B &lt;- 1000</p>
   <p>boot_datasets &lt;- resample_preserving_corr(original_data, B)</p>
   <p>q_boot_vals &lt;- sapply(boot_datasets, function(df_boot) {</p>
   <p>list_boot &lt;- generate_list_boot(df_boot)</p>
   <p>calculate_q(list_boot)$q</p>
   <p>})</p>
   <p># Bootstrap p-value (based on the empirical bootstrap distribution)</p>
   <p>boot_p_value &lt;- mean(q_boot_vals &gt;= q_stat)</p>
   <p>cat("Empirical bootstrap distribution (with preserved correlations) derived from the original sample:")</p>
   <p>cat("Number of bootstrap samples: B =", B, ".")</p>
   <p>cat("Right-tailed bootstrap p-value: p_boot =", round(boot_p_value, 4), ".")</p>
   <p>if (boot_p_value &lt; alpha) {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at the", alpha,</p>
   <p>"significance level based on the bootstrap p-value obtained from the empirical bootstrap distribution.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is not rejected at the", alpha,</p>
   <p>"significance level based on the bootstrap p-value obtained from the empirical bootstrap distribution.")</p>
   <p>}</p>
   <p># Generate a normative sample using equispaced probabilities and the Cholesky transformation of the original sample’s correlation matrix</p>
   <p>p &lt;- seq(0.5 / n, 1 - 0.5 / n, length.out = n)</p>
   <p>indep_data &lt;- matrix(NA, nrow = n, ncol = k)</p>
   <p>set.seed(123)</p>
   <p>for (j in 1:k) {indep_data[, j] &lt;- qnorm(sample(p))}</p>
   <p>mat_cor &lt;- cor(original_data)</p>
   <p>mat_chol &lt;- chol(mat_cor)</p>
   <p>nomative_data &lt;- indep_data %*% mat_chol</p>
   <p># Define the sum-variables of all possible combinations among the original variables</p>
   <p>list_x_norm &lt;- linear_combinations(nomative_data)</p>
   <p>result_q_norm &lt;- calculate_q(list_x_norm)</p>
   <p># Generate a normative bootstrap distribution using full-row resampling</p>
   <p>B &lt;- 1000</p>
   <p>q_boot_norm_vals &lt;- replicate(B, {</p>
   <p>indices &lt;- sample(1:n, size = n, replace = TRUE)</p>
   <p>boot_sample &lt;- nomative_data[indices, ]</p>
   <p>list_boot_n &lt;- linear_combinations(boot_sample)</p>
   <p>calculate_q(list_boot_n)$q})</p>
   <p># Bootstrap p-value and critical value (based on the normative bootstrap distribution)</p>
   <p>boot_norm_p_value &lt;- mean(q_boot_norm_vals &gt;= q_stat)</p>
   <p># quantile_order &lt;- 1 - alpha # Without adjustment for a heavy right tail</p>
   <p>quantile_order &lt;- 1 - 2 * alpha # With adjustment for a heavy right tail</p>
   <p>boot_norm_critical_value &lt;- quantile(q_boot_norm_vals, probs = quantile_order)</p>
   <p>cat("Normative bootstrap distribution (with preserved correlation):")</p>
   <p>cat("Number of bootstrap samples: B =", B, ".")</p>
   <p>cat("Q-test statistic value in the normative sample: q_mvn_boot =", result_q_norm$q, ".")</p>
   <p>cat("Mean of the normative bootstrap distribution: m(mvn_boot_dist) =", mean(q_boot_norm_vals), ".")</p>
   <p>cat("Median of the normative bootstrap distribution: mdn(mvn_boot_dist) =", median(q_boot_norm_vals), ".")</p>
   <p>p_value_mdn_norm &lt;- 2 * min(mean(q_boot_vals &gt;= median(q_boot_norm_vals)),</p>
   <p>mean(q_boot_vals &lt;= median(q_boot_norm_vals)))</p>
   <p>cat("Two-tailed p-value for testing whether the empirical bootstrap distribution is centered on the median of the normative bootstrap distribution: p_2tailed =", round(p_value_mdn_norm, 4), ".")</p>
   <p>if (p_value_mdn_norm &lt; alpha) {</p>
   <p>cat("The null hypothesis of equal medians between the normative and empirical bootstrap distributions is rejected at a significance level of", 1 - quantile_order, ".")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of equal medians between the normative and empirical bootstrap distributions is not rejected at a significance level of", 1 - quantile_order, ".")</p>
   <p>}</p>
   <p>cat("Bootstrap critical value (", quantile_order, " quantile of the normative bootstrap distribution): q_crit =", round(boot_norm_critical_value, 4), ".")</p>
   <p>if (q_stat &lt;= boot_norm_critical_value) {</p>
   <p>cat("The null hypothesis of multivariate normality is not rejected at a significance level of", 1 - quantile_order, "based on the critical value from the normative bootstrap distribution.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at a significance level of", 1 - quantile_order, "based on the critical value from the normative bootstrap distribution.")</p>
   <p>}</p>
   <p>cat("Right-tailed p-value in the normative bootstrap distribution: p_mvn_boot =", round(boot_norm_p_value, 4), ".")</p>
   <p>if (boot_norm_p_value &lt; 1 - quantile_order) {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at a significance level of", 1 - quantile_order, "based on the bootstrap p-value.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is not rejected at a significance level of", 1 - quantile_order, "based on the bootstrap p-value.")}</p>
   <p># Bootstrap power</p>
   <p>boot_power &lt;- mean(q_boot_vals &gt; boot_norm_critical_value)</p>
   <p>cat("Bootstrap statistical power at a significance level of", 1 - quantile_order, ": phi_boot =", boot_power, ".")</p>
   <p># Representation of empirical and normative bootstrap sampling distributions</p>
   <p># Remove the preceding hashtag symbols to save as a JPG or TIFF file</p>
   <p># jpeg("Hist_dens_curves1.jpg", width = 1200, height = 900, units = "px", res = 300)</p>
   <p># tiff("Hist_dens_curves1.tiff", width = 1200, height = 900, units = "px", res = 300)</p>
   <p># par(mar = c(4.5, 4.5, 0.5, 0.5), cex.axis = 0.8)</p>
   <p># Density curve of the chi-square distribution as the base graph</p>
   <p>x_seq &lt;- seq(0, max(qchisq(0.999, df = df_chisq), boot_norm_critical_value + 1, q_stat +1, quantile(q_boot_vals, probs = 0.95, type = 8) +1), length.out = 1000)</p>
   <p>y_chi_sq &lt;- dchisq(x_seq, df = df_chisq)</p>
   <p>plot(x_seq, y_chi_sq, type = "l", lwd = 3, col = "darkgreen",</p>
   <p>main = "", xlab = "q-values", ylab = "Density",</p>
   <p>xlim = c(0, max(qchisq(0.999, df = df_chisq), boot_norm_critical_value + 1, q_stat + 1, quantile(q_boot_vals, probs = 0.95, type = 8) +1)),</p>
   <p>ylim = c(0, max(density(q_boot_vals)$y, y_chi_sq)))</p>
   <p># Yellow histogram of the empirical bootstrap distribution of the Q-test statistic</p>
   <p>hist(q_boot_vals, breaks = 20, freq = FALSE, col = rgb(1, 1, 0, 0.5), border = "yellow2", add = TRUE)</p>
   <p># Yellow density curve of the empirical bootstrap distribution of the Q-test statistic</p>
   <p>lines(density(q_boot_vals), col = "yellow3", lwd = 2)</p>
   <p># Red density curve of the normative bootstrap distribution of the Q-test statistic</p>
   <p>lines(density(q_boot_norm_vals), col = "red", lwd = 2)</p>
   <p># Purple vertical line for the observed Q-test statistic value in the original sample</p>
   <p>abline(v = q_stat, col = "purple", lwd = 2, lty = 2)</p>
   <p># Red vertical line for the normative bootstrap critical value</p>
   <p>abline(v = boot_norm_critical_value, col = "red", lwd = 2, lty = 2)</p>
   <p># Green vertical line for the chi-square approximation critical value</p>
   <p>abline(v = qchisq(1 - alpha, df = df_chisq), col = "darkgreen", lwd = 2, lty = 2)</p>
   <p># dev.off() # Remove the preceding hashtag symbol to save the figure</p>
   <p>cat("Figure 1. Histogram (yellow) with density curves for the empirical bootstrap (yellow), normative bootstrap (red), and chi-square (green) distributions. The value of the Q-test statistic in original sample is indicated by a purple vertical line (q =", q_stat, "), the critical value of the normative bootstrap distribution by a red vertical line (", quantile_order, " quantile: q_mvn_boot =", boot_norm_critical_value, "), and the critical value of the chi-square distribution with", df_chisq, "degrees of freedom by a green vertical line (", 1 - alpha, " quantile: χ²[", df_chisq, "] =", q_crit, ").")</p>
   <p>cat("Note. Yellow histogram (number of bins determined by the Rice rule) = empirical bootstrap distribution of the Q-test statistic;",</p>
   <p>"yellow curve = density curve of the empirical bootstrap distribution;",</p>
   <p>"red curve = density curve of the normative bootstrap distribution (generated from normally distributed variables with the same correlational structure as the original data);",</p>
   <p>"green curve = chi-square distribution with", df_chisq, "degrees of freedom;",</p>
   <p>"purple vertical line = observed Q-test statistic value in original sample;",</p>
   <p>"red vertical line = critical value or", quantile_order, " quantile of the normative bootstrap distribution;",</p>
   <p>"green vertical line = critical value or", 1 - alpha, " quantile of the chi-square distribution with", df_chisq, "degrees of freedom.")</p>
  </sec><sec id="s8">
   <title>
    <xref ref-type="bibr" rid="scirp.145868-"></xref>Appendix 2. QSF Test</title>
   <p># The chi-square approximation and bootstrap version of the multivariate normality Q-test based on Shapiro–Francia univariate normality statistics standardized by Royston’s method, for sample sizes ranging from 5 to 5000 with k-tuples of measurements</p>
   <p># Load four required R packages</p>
   <p>library(nortest)</p>
   <p>library(MASS)</p>
   <p>library(DescTools)</p>
   <p>library(stats)</p>
   <p># List of original variables</p>
   <p>x1 &lt;- c(47, 52, 46, 55, 47, 33, 41, 43, 63, 50, 44, 52, 55, 56, 38, 46, 41, 54, 55, 42, 50, 52, 53, 50, 67, 41, 32, 48, 37, 41, 44, 63, 45, 44, 39, 44, 30, 67, 47, 53, 60, 46, 53, 49, 49, 39, 49, 53, 48, 44)</p>
   <p>x2 &lt;- c(49, 61, 47, 54, 33, 38, 35, 56, 63, 47, 47, 39, 50, 63, 49, 41, 49, 60, 46, 37, 52, 55, 61, 46, 64, 46, 37, 55, 45, 37, 38, 49, 50, 42, 51, 39, 36, 48, 39, 48, 48, 50, 52, 60, 51, 52, 49, 46, 43, 34)</p>
   <p>x3 &lt;- c(59, 54, 56, 50, 48, 33, 49, 51, 62, 46, 41, 43, 52, 55, 47, 42, 50, 46, 46, 45, 48, 59, 61, 57, 54, 43, 33, 47, 48, 36, 41, 54, 59, 33, 58, 31, 31, 60, 44, 56, 47, 52, 49, 45, 51, 43, 56, 50, 40, 37)</p>
   <p>x4 &lt;- c(51, 44, 51, 63, 42, 35, 45, 47, 62, 45, 60, 43, 51, 64, 47, 38, 47, 36, 56, 43, 54, 55, 58, 46, 50, 43, 28, 53, 47, 35, 42, 53, 53, 50, 39, 32, 43, 59, 43, 48, 72, 45, 51, 43, 46, 40, 51, 47, 59, 34)</p>
   <p>original_data &lt;- data.frame(x1, x2, x3, x4)</p>
   <p># Sample size, number of variables, and level of significance</p>
   <p>n &lt;- length(x1)</p>
   <p>cat("Sample size: n =", n, ".")</p>
   <p>k &lt;- length(original_data)</p>
   <p>k &lt;- length(original_data)</p>
   <p>cat("Number of variables in the original sample: k =", k, ".")</p>
   <p>R &lt;- cor(original_data)</p>
   <p>m_R &lt;- mean(R[lower.tri(R)])</p>
   <p>cat("Arithmetic mean of the Pearson’s product-moment correlation coefficients between the variables: m(R) =", round(m_R, 4), ".")</p>
   <p>alpha &lt;- 0.05</p>
   <p># Generate the sums of all non-repeated combinations of the variables</p>
   <p>linear_combinations &lt;- function(df) {</p>
   <p>list_combinations &lt;- list()</p>
   <p>k &lt;- ncol(df)</p>
   <p># Add the original variables (combinations of size 1)</p>
   <p>for (i in 1:k) {</p>
   <p>list_combinations[[paste0("c", i)]] &lt;- df[, i]}</p>
   <p># Add combinations of size from 2 to k</p>
   <p>counter &lt;- k</p>
   <p>for (i in 2:k) {</p>
   <p>combinations &lt;- combn(k, i)</p>
   <p>for (j in 1:ncol(combinations)) {</p>
   <p>idx &lt;- combinations[, j]</p>
   <p>counter &lt;- counter + 1</p>
   <p>list_combinations[[paste0("c", counter)]] &lt;- rowSums(df[, idx])}}</p>
   <p>return(list_combinations)}</p>
   <p>list_x &lt;- linear_combinations(original_data)</p>
   <p># Calculation of common parameters for standardizing samples from 12 to 2000 data points</p>
   <p>u &lt;- log(log(n)) - log(n)</p>
   <p>mu &lt;- 1.0521 * u - 1.2725</p>
   <p>v &lt;- log(log(n)) + 2 / log(n)</p>
   <p>sigma &lt;- -0.26758 * v + 1.0308</p>
   <p>cat("Parameters for standardizing the", 2^k - 1, "variables created by linear combination of the", k, "original variables:")</p>
   <p>cat("Expected value of ln(1-W’): μ =", mu, ".")</p>
   <p>cat("Standard deviation of ln(1-W’): σ =", sigma, ".")</p>
   <p># Apply test and save results to a table</p>
   <p>results &lt;- lapply(names(list_x), function(label) {</p>
   <p>data &lt;- list_x[[label]]</p>
   <p>result &lt;- shapiro.test(data)</p>
   <p>z &lt;- (log(1 - result$statistic) - mu) / sigma</p>
   <p>p &lt;- 1 - pnorm(z)</p>
   <p>Normality &lt;- if (result$p.value &lt; alpha) "No" else "Yes"</p>
   <p>return(c(label, round(result$statistic, 4), round(z, 4), round(p, 4), Normality))</p>
   <p>})</p>
   <p># Convert to data frame</p>
   <p>table_results &lt;- as.data.frame(do.call(rbind, results), stringsAsFactors = FALSE)</p>
   <p>colnames(table_results) &lt;- c("Combination", "W’", "z", "p", "Normality")</p>
   <p># Display the table</p>
   <p>cat("Tabla. Shapiro-Francia’s univariate normality test with Royston’s standardization for the", 2^k-1, "linear combinations of variables")</p>
   <p>print(table_results, row.names = FALSE)</p>
   <p>cat("Note. Combination = sum of the corresponding combination without repetition of variables; W = Shapiro–Francia W’ statistic; z = standardized value of W’ using Royston’s method; p = right-tailed p-value under the standard normal distribution; Univariate normality: Yes = p ≥ α =", alpha, ", the null hypothesis of normality is retained; No = p &lt;", alpha, ", the null hypothesis is rejected.")</p>
   <p># Function to calculate Q’-test statistic (QSF)</p>
   <p>calculate_q &lt;- function(list_data) {</p>
   <p>z_vals &lt;- sapply(list_data, function(x) {</p>
   <p>result_sf &lt;- sf.test(x)</p>
   <p>z &lt;- (log(1 - result_sf$statistic) - mu) / sigma</p>
   <p>return(as.numeric(z))</p>
   <p>})</p>
   <p>z_values &lt;- ifelse(z_vals &lt; 0, 0, z_vals)</p>
   <p>a &lt;- sum(z_vals &lt; 0)</p>
   <p>q &lt;- sum(z_values^2)</p>
   <p>return(list(q = q, a = a, z_vals = z_vals, z_values = z_values))</p>
   <p>}</p>
   <p># Right-tailed p-value and statistical power based on the chi-square distribution</p>
   <p>result_q &lt;- calculate_q(list_x)</p>
   <p>q_stat &lt;- result_q$q</p>
   <p>a &lt;- result_q$a</p>
   <p>nc &lt;- length(list_x)</p>
   <p># df_chisq &lt;- nc - a # Correction for truncated z-values</p>
   <p>df_chisq &lt;- nc # No correction for truncated z-values</p>
   <p>q_crit &lt;- qchisq(1 - alpha, df = df_chisq)</p>
   <p>p_value &lt;- pchisq(q_stat, df = df_chisq, lower.tail = FALSE)</p>
   <p>power &lt;- 1 - pchisq(q_crit, df = df_chisq, ncp = q_stat, lower.tail = TRUE)</p>
   <p># Results for QSFa</p>
   <p>cat("Number of combinations among the", k, "original variables: nc =", nc, ".")</p>
   <p>cat("Number of z-values truncated to zero because they are negative: a =", a, ".")</p>
   <p>cat("Degrees of freedom: df =", df_chisq, ".")</p>
   <p>cat("Q-test statistic value in the original sample: q =", round(q_stat, 4), ".")</p>
   <p>cat("Right-tailed p-value and critical value based on the chi-square distribution:")</p>
   <p>cat("Critical value or", 1 - alpha, "quantile of the chi-square distribution with", df_chisq, "degrees of freedom: 1-αχ²[df] =", round(q_crit, 4), ".")</p>
   <p>if (q_stat &lt;= q_crit) {</p>
   <p>cat("The null hypothesis of multivariate normality is retained at a significance level of", alpha, "based on the chi-square approximation critical value.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at a significance level of", alpha, "based on the chi-square approximation critical value.")}</p>
   <p>cat("Right-tailed probability value under the chi-square distribution with", df_chisq, "degrees of freedom: p =", round(p_value, 4), ".")</p>
   <p>if (p_value &lt; alpha) {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at a significance level of", alpha, "based on the chi-square approximation p-value.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is retained at a significance level of", alpha, " based on the chi-square approximation p-value.")}</p>
   <p>cat("Statistical power based on the chi-square approximation at a significance level of", alpha, ": φ =", power, ".")</p>
   <p>cat("If the null hypothesis is rejected, the statistical power should exceed 0.5, preferably 0.8 or higher.")</p>
   <p>cat("If the null hypothesis is not rejected, the statistical power should be below 0.5, preferably under 0.2.")</p>
   <p>cat("Otherwise, the result is contradictory or questionable.")</p>
   <p># Test for serial independence in z_w’ values.</p>
   <p>z_w &lt;- result_q$z_values</p>
   <p>cat("Test for the serial independence of the", nc, "standardized W’ values (truncated to 0 when negative) used to compute the Q’-test statistic.")</p>
   <p>RunsTest(z_w, y = NULL, alternative = "two.sided", exact = TRUE, correct = FALSE)</p>
   <p>lag_max &lt;- min(10, round(nc/5, 0))</p>
   <p># lag_max &lt;- 12 * (n/100)^0.25 # Schwert’s rule to determinate the maximum lag.</p>
   <p>ljung_box_test &lt;- lapply(1: lag_max, function(k) Box.test(z_w, lag = k, type = "Ljung-Box", fitdf = 0))</p>
   <p>ljung_box_table &lt;- data.frame(</p>
   <p>Lag = 1:lag_max,</p>
   <p>X_squared = sapply(ljung_box_test, function(x) round(x$statistic, 4)),</p>
   <p>df = sapply(ljung_box_test, function(x) round(x$parameter, 4)),</p>
   <p>p_value = sapply(ljung_box_test, function(x) round(x$p.value, 4))</p>
   <p>)</p>
   <p>cat("Table: Ljung–Box test for serial independence of z_w’ values")</p>
   <p>print(ljung_box_table)</p>
   <p>cat("Note. Lag = step between values forming the autocorrelation pairs; X-square = test statistic; df = degrees of freedom; p-value = right-tailed probability under the chi-square distribution.")</p>
   <p># Bootstrap function preserving the correlations of the original sample</p>
   <p>resample_preserving_corr &lt;- function(df, B) {</p>
   <p>replicate(B, {</p>
   <p>df[sample(1:nrow(df), size = nrow(df), replace = TRUE), ]</p>
   <p>}, simplify = FALSE)</p>
   <p>}</p>
   <p># Function to generate list of combinations</p>
   <p>generate_list_boot &lt;- function(df) {</p>
   <p>list_boot &lt;- setNames(as.list(df), paste0("c", 1:ncol(df)))</p>
   <p>for (i in 2:ncol(df)) {</p>
   <p>combinations &lt;- combn(ncol(df), i)</p>
   <p>for (j in 1:ncol(combinations)) {</p>
   <p>idx &lt;- combinations[, j]</p>
   <p>label &lt;- paste0("c", length(list_boot) + 1)</p>
   <p>list_boot[[label]] &lt;- rowSums(df[, idx])</p>
   <p>}</p>
   <p>}</p>
   <p>return(list_boot)</p>
   <p>}</p>
   <p># Bootstrap simulations preserving correlations</p>
   <p>set.seed(123)</p>
   <p>B &lt;- 1000</p>
   <p>boot_datasets &lt;- resample_preserving_corr(original_data, B)</p>
   <p>q_boot_vals &lt;- sapply(boot_datasets, function(df_boot) {</p>
   <p>list_boot &lt;- generate_list_boot(df_boot)</p>
   <p>calculate_q(list_boot)$q</p>
   <p>})</p>
   <p># Bootstrap p-value (based on the empirical bootstrap distribution)</p>
   <p>boot_p_value &lt;- mean(q_boot_vals &gt;= q_stat)</p>
   <p>cat("Empirical bootstrap distribution (with preserved correlations) derived from the original sample:")</p>
   <p>cat("Number of bootstrap samples: B =", B, ".")</p>
   <p>cat("Right-tailed bootstrap p-value: p_boot =", round(boot_p_value, 4), ".")</p>
   <p>if (boot_p_value &lt; alpha) {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at the", alpha,</p>
   <p>"significance level based on the bootstrap p-value obtained from the empirical bootstrap distribution.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is not rejected at the", alpha,</p>
   <p>"significance level based on the bootstrap p-value obtained from the empirical bootstrap distribution.")</p>
   <p>}</p>
   <p># Generate a normative sample using equispaced probabilities and the Cholesky transformation of the original sample’s correlation matrix</p>
   <p>p &lt;- seq(0.5 / n, 1 - 0.5 / n, length.out = n)</p>
   <p>indep_data &lt;- matrix(NA, nrow = n, ncol = k)</p>
   <p>set.seed(123)</p>
   <p>for (j in 1:k) {indep_data[, j] &lt;- qnorm(sample(p))}</p>
   <p>mat_cor &lt;- cor(original_data)</p>
   <p>mat_chol &lt;- chol(mat_cor)</p>
   <p>nomative_data &lt;- indep_data %*% mat_chol</p>
   <p># Define the sum-variables of all possible combinations among the original variables</p>
   <p>list_x_norm &lt;- linear_combinations(nomative_data)</p>
   <p>result_q_norm &lt;- calculate_q(list_x_norm)</p>
   <p># Generate a normative bootstrap distribution using full-row resampling</p>
   <p>B &lt;- 1000</p>
   <p>q_boot_norm_vals &lt;- replicate(B, {</p>
   <p>indices &lt;- sample(1:n, size = n, replace = TRUE)</p>
   <p>boot_sample &lt;- nomative_data[indices, ]</p>
   <p>list_boot_n &lt;- linear_combinations(boot_sample)</p>
   <p>calculate_q(list_boot_n)$q</p>
   <p>})</p>
   <p># Bootstrap p-value and critical value (based on the normative bootstrap distribution)</p>
   <p>boot_norm_p_value &lt;- mean(q_boot_norm_vals &gt;= q_stat)</p>
   <p># quantile_order &lt;- 1 - alpha # Without adjustment for a heavy right tail</p>
   <p>quantile_order &lt;- 1 - 2 * alpha # With adjustment for a heavy right tail</p>
   <p>boot_norm_critical_value &lt;- quantile(q_boot_norm_vals, probs = quantile_order)</p>
   <p>cat("Normative bootstrap distribution (with preserved correlation):")</p>
   <p>cat("Number of bootstrap samples: B =", B, ".")</p>
   <p>cat("Q’-test statistic value in the normative sample: q_mvn_boot =", result_q_norm$q, ".")</p>
   <p>cat("Mean of the normative bootstrap distribution: m(mvn_boot_dist) =", mean(q_boot_norm_vals), ".")</p>
   <p>cat("Median of the normative bootstrap distribution: mdn(mvn_boot_dist) =", median(q_boot_norm_vals), ".")</p>
   <p>p_value_mdn_norm &lt;- 2 * min(mean(q_boot_vals &gt;= median(q_boot_norm_vals)),</p>
   <p>mean(q_boot_vals &lt;= median(q_boot_norm_vals)))</p>
   <p>cat("Two-tailed p-value for testing whether the empirical bootstrap distribution is centered on the median of the normative bootstrap distribution: p_2tailed =", round(p_value_mdn_norm, 4), ".")</p>
   <p>if (p_value_mdn_norm &lt; alpha) {</p>
   <p>cat("The null hypothesis of equal medians between the normative and empirical bootstrap distributions is rejected at a significance level of", 1 - quantile_order, ".")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of equal medians between the normative and empirical bootstrap distributions is not rejected at a significance level of", 1 - quantile_order, ".")</p>
   <p>}</p>
   <p>cat("Bootstrap critical value (", quantile_order, " quantile of the normative bootstrap distribution): q_crit =", round(boot_norm_critical_value, 4), ".")</p>
   <p>if (q_stat &lt;= boot_norm_critical_value) {</p>
   <p>cat("The null hypothesis of multivariate normality is not rejected at a significance level of", 1 - quantile_order, "based on the critical value from the normative bootstrap distribution.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at a significance level of", 1 - quantile_order, "based on the critical value from the normative bootstrap distribution.")</p>
   <p>}</p>
   <p>cat("Right-tailed p-value in the normative bootstrap distribution: p_mvn_boot =", round(boot_norm_p_value, 4), ".")</p>
   <p>if (boot_norm_p_value &lt; 1 - quantile_order) {</p>
   <p>cat("The null hypothesis of multivariate normality is rejected at a significance level of", 1 - quantile_order, "based on the bootstrap p-value.")</p>
   <p>} else {</p>
   <p>cat("The null hypothesis of multivariate normality is not rejected at a significance level of", 1 - quantile_order, "based on the bootstrap p-value.")</p>
   <p>}</p>
   <p># Bootstrap power</p>
   <p>boot_power &lt;- mean(q_boot_vals &gt; boot_norm_critical_value)</p>
   <p>cat("Bootstrap statistical power at a significance level of", 1 - quantile_order, ": phi_boot =", boot_power, ".")</p>
   <p># Representation of empirical and normative bootstrap sampling distributions</p>
   <p># Remove the preceding hashtag symbols to save as a JPG or TIFF file</p>
   <p># jpeg("Hist_dens_curves2.jpg", width = 1200, height = 900, units = "px", res = 300)</p>
   <p># tiff("Hist_dens_curves2.tiff", width = 1200, height = 900, units = "px", res = 300)</p>
   <p># par(mar = c(4.5, 4.5, 0.5, 0.5), cex.axis = 0.8)</p>
   <p># Density curve of the chi-square distribution as the base graph</p>
   <p>x_seq &lt;- seq(0, max(qchisq(0.999, df = df_chisq), boot_norm_critical_value + 1, q_stat +1, quantile(q_boot_vals, probs = 0.95, type = 8) +1), length.out = 1000)</p>
   <p>y_chi_sq &lt;- dchisq(x_seq, df = df_chisq)</p>
   <p>plot(x_seq, y_chi_sq, type = "l", lwd = 3, col = "darkgreen",</p>
   <p>main = "", xlab = "q_prime_values", ylab = "Density",</p>
   <p>xlim = c(0, max(qchisq(0.999, df = df_chisq), boot_norm_critical_value + 1, q_stat +1, quantile(q_boot_vals, probs = 0.95, type = 8) +1)),</p>
   <p>ylim = c(0, max(density(q_boot_vals)$y, y_chi_sq)))</p>
   <p># Yellow histogram of the empirical bootstrap distribution of the Q’-test statistic</p>
   <p>hist(q_boot_vals, breaks = 20, freq = FALSE, col = rgb(1, 1, 0, 0.5), border = "yellow2", add = TRUE)</p>
   <p># Yellow density curve of the empirical bootstrap distribution of the Q’-test statistic</p>
   <p>lines(density(q_boot_vals), col = "yellow3", lwd = 2)</p>
   <p># Red density curve of the normative bootstrap distribution of the Q’-test statistic</p>
   <p>lines(density(q_boot_norm_vals), col = "red", lwd = 2)</p>
   <p># Purple vertical line for the observed Q’-test statistic value in the original sample</p>
   <p>abline(v = q_stat, col = "purple", lwd = 2, lty = 2)</p>
   <p># Red vertical line for the normative bootstrap critical value</p>
   <p>abline(v = boot_norm_critical_value, col = "red", lwd = 2, lty = 2)</p>
   <p># Green vertical line for the chi-square approximation critical value</p>
   <p>abline(v = qchisq(1-alpha, df = df_chisq), col = "darkgreen", lwd = 2, lty = 2)</p>
   <p># dev.off() # Remove the preceding hashtag symbol to save the figure</p>
   <p>cat("Figure 2. Histogram (yellow) with density curves for the empirical bootstrap (yellow), normative bootstrap (red), and chi-square (green) distributions. The value of the Q-test statistic in original sample is indicated by a purple vertical line (q =", q_stat, "), the critical value of the normative bootstrap distribution by a red vertical line (", quantile_order, " quantile: q_mvn_boot =", boot_norm_critical_value, "), and the critical value of the chi-square distribution with", df_chisq, "degrees of freedom by a green vertical line (", 1 - alpha, " quantile: χ²[", df_chisq, "] =", q_crit, ").")</p>
  </sec><sec id="s9">
   <title>
    <xref ref-type="bibr" rid="scirp.145868-"></xref>Appendix 3. Royston’s H-test</title>
   <p># Royston’s multivariate normality H-test for samples size from 10 to 2000 with k-tuples of measurements</p>
   <p># Load required R package</p>
   <p>library(MVN)</p>
   <p># List of original variables</p>
   <p>x1 &lt;- c(47, 52, 46, 55, 47, 33, 41, 43, 63, 50, 44, 52, 55, 56, 38, 46, 41, 54, 55, 42, 50, 52, 53, 50, 67, 41, 32, 48, 37, 41, 44, 63, 45, 44, 39, 44, 30, 67, 47, 53, 60, 46, 53, 49, 49, 39, 49, 53, 48, 44)</p>
   <p>x2 &lt;- c(49, 61, 47, 54, 33, 38, 35, 56, 63, 47, 47, 39, 50, 63, 49, 41, 49, 60, 46, 37, 52, 55, 61, 46, 64, 46, 37, 55, 45, 37, 38, 49, 50, 42, 51, 39, 36, 48, 39, 48, 48, 50, 52, 60, 51, 52, 49, 46, 43, 34)</p>
   <p>x3 &lt;- c(59, 54, 56, 50, 48, 33, 49, 51, 62, 46, 41, 43, 52, 55, 47, 42, 50, 46, 46, 45, 48, 59, 61, 57, 54, 43, 33, 47, 48, 36, 41, 54, 59, 33, 58, 31, 31, 60, 44, 56, 47, 52, 49, 45, 51, 43, 56, 50, 40, 37)</p>
   <p>x4 &lt;- c(51, 44, 51, 63, 42, 35, 45, 47, 62, 45, 60, 43, 51, 64, 47, 38, 47, 36, 56, 43, 54, 55, 58, 46, 50, 43, 28, 53, 47, 35, 42, 53, 53, 50, 39, 32, 43, 59, 43, 48, 72, 45, 51, 43, 46, 40, 51, 47, 59, 34)</p>
   <p>original_data &lt;- data.frame(x1, x2, x3, x4)</p>
   <p>n &lt;- length(x1)</p>
   <p>k &lt;- length(original_data)</p>
   <p>alpha &lt;- 0.05</p>
   <p>result &lt;- mvn(original_data, subset = NULL, mvnTest = "royston")</p>
   <p># Statistical power for H-test</p>
   <p>R &lt;- cor(original_data)</p>
   <p>lambda &lt;- 5</p>
   <p>mu &lt;- 0.715</p>
   <p>ln_n &lt;- log(n)</p>
   <p>v_n &lt;- 0.21364 + 0.015124 * ln_n^2 - 0.0018034 * ln_n^3</p>
   <p>r_ij &lt;- R[lower.tri(R)]</p>
   <p>c_ij &lt;- r_ij^lambda * (1 - (mu / v_n) * (1 - r_ij)^mu)</p>
   <p>c_bar &lt;- mean(c_ij)</p>
   <p>df_H &lt;- k / (1 + (k - 1) * c_bar)</p>
   <p>power_H &lt;- 1 - pchisq(qchisq(1-alpha, df = df_H), df = df_H, ncp = result$multivariateNormality$H, lower.tail = TRUE)</p>
   <p># Display results</p>
   <p>cat("Sample size: n =", n, ".")</p>
   <p>cat("Number of variables in the original sample: k =", k, ".")</p>
   <p>cat("Arithmetic mean of the Pearson’s product-moment correlation coefficients between the variables: m(R) =", round(mean(r_ij), 4), ".")</p>
   <p>cat("Royston’s multivariate normality H-test")</p>
   <p>cat("H statistic: H =", round(result$multivariateNormality$H, 4), ".")</p>
   <p>cat("Degrees of freedom: df =", df_H, ".")</p>
   <p>cat("p-value for the null hypothesis of multivariate normality: p =", result$multivariateNormality$p, ".")</p>
   <p>cat("Statistical power of the H-test at a significance level of", alpha, ": ϕ =", power_H, ".")</p>
   <p>cat("If the null hypothesis is rejected, the statistical power should exceed 0.5, preferably 0.8 or higher.")</p>
   <p>cat("If the null hypothesis is not rejected, the statistical power should be below 0.5, preferably under 0.2.")</p>
   <p>cat("Otherwise, the result is contradictory or questionable.")</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.145868-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Rubia, J.M.L. (2023) Proposal and Pilot Study: A Generalization of the W or W’ Statistic for Multivariate Normality. Open Journal of Statistics, 13, 119-169. &gt;https://doi.org/10.4236/ojs.2023.131008
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Royston, J.P. (1983) Some Techniques for Assessing Multivarate Normality Based on the Shapiro-Wilk W. Applied Statistics, 32, 121-133. &gt;https://doi.org/10.2307/2347291
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Royston, P. (1992) Approximating the Shapiro-Wilk W-Test for Non-Normality. Statistics and Computing, 2, 117-119. &gt;https://doi.org/10.1007/bf01891203
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Shapiro, S.S. and Wilk, M.B. (1965) An Analysis of Variance Test for Normality (Complete Samples). Biometrika, 52, 591-611. &gt;https://doi.org/10.2307/2333709
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Royston, P. (1993) A Toolkit for Testing for Non-Normality in Complete and Censored Samples. The Statistician, 42, 37-43. &gt;https://doi.org/10.2307/2348109
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Shapiro, S.S. and Francia, R.S. (1972) An Approximate Analysis of Variance Test for Normality. Journal of the American Statistical Association, 67, 215-216. &gt;https://doi.org/10.1080/01621459.1972.10481232
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     R Core Team (2025) R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. &gt;https://www.R-project.org/ 
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     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. Journal of Psychosomatic Research, 38, 23-32. &gt;https://doi.org/10.1016/0022-3999(94)90005-1
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     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. Journal of Psychosomatic Research, 46, 75-82. &gt;https://doi.org/10.1016/s0022-3999(98)00053-1
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Franz, M., Popp, K., Schaefer, R., Sitte, W., Schneider, C., Hardt, J., et al. (2007) Alexithymia in the German General Population. Social Psychiatry and Psychiatric Epidemiology, 43, 54-62. &gt;https://doi.org/10.1007/s00127-007-0265-1
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     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. Journal of Clinical Medicine, 13, Article 6255. &gt;https://doi.org/10.3390/jcm13206255
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Braun, W.J. and Murdoch, D.J. (2021) A First Course in Statistical Programming with R. 3rd Edition, Cambridge University Press. &gt;https://doi.org/10.1017/9781108993456
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Giorgi, F.M., Ceraolo, C. and Mercatelli, D. (2022) The R Language: An Engine for Bioinformatics and Data Science. Life, 12, Article 648. &gt;https://doi.org/10.3390/life12050648
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     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. Jurnal Biometrika dan Kependudukan, 10, 153-161. &gt;https://doi.org/10.20473/jbk.v10i2.2021.153-161
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Khatun, N. (2021) Applications of Normality Test in Statistical Analysis. Open Journal of Statistics, 11, 113-122. &gt;https://doi.org/10.4236/ojs.2021.111006
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mardia, K.V. (1980) 9 Tests of Unvariate and Multivariate Normality. Handbook of Statistics, 1, 279-320. &gt;https://doi.org/10.1016/s0169-7161(80)01011-5
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Rolke, W. and Gongora, C.G. (2020) A Chi-Square Goodness-of-Fit Test for Continuous Distributions against a Known Alternative. Computational Statistics, 36, 1885-1900. &gt;https://doi.org/10.1007/s00180-020-00997-x
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chen, T. and Lumley, T. (2019) Numerical Evaluation of Methods Approximating the Distribution of a Large Quadratic Form in Normal Variables. Computational Statistics &amp; Data Analysis, 139, 75-81. &gt;https://doi.org/10.1016/j.csda.2019.05.002
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref19">
    <label>19</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Wald, A. and Wolfowitz, J. (1943) An Exact Test for Randomness in the Non-Parametric Case Based on Serial Correlation. The Annals of Mathematical Statistics, 14, 378-388. &gt;https://doi.org/10.1214/aoms/1177731358
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref20">
    <label>20</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Signorell, A. (2025) DescTools: Tools for Descriptive Statistics. Version 0.99.6. &gt;https://doi.org/10.32614/CRAN.package.DescTools 
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref21">
    <label>21</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ljung, G.M. and Box, G.E.P. (1978) On a Measure of Lack of Fit in Time Series Models. Biometrika, 65, 297-303. &gt;https://doi.org/10.1093/biomet/65.2.297
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref22">
    <label>22</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     R Core Team (2025) The R Stats Package (Version 4.6.0). &gt;https://stat.ethz.ch/R-manual/R-devel/library/stats/html/00Index.html 
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref23">
    <label>23</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chan, K.C.G., Han, J., Kennedy, A.P. and Yam, S.C.P. (2022) Testing Network Autocorrelation without Replicates. PLOS ONE, 17, e0275532. &gt;https://doi.org/10.1371/journal.pone.0275532
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref24">
    <label>24</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Schmal, W.B. (2024) Quantitative Tools for Time Series Analysis in Natural Language Processing: A Practitioners Guide. arXiv: 2404.18499. &gt;https://doi.org/10.48550/arXiv.2404.18499 
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref25">
    <label>25</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Schwert, G.W. (1989) Why Does Stock Market Volatility Change over Time? The Journal of Finance, 44, 1115-1153. &gt;https://doi.org/10.1111/j.1540-6261.1989.tb02647.x
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref26">
    <label>26</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Egbert, J. and Plonsky, L. (2020) Bootstrapping Techniques. In: Paquot, M. and Gries, S.T., Eds., A Practical Handbook of Corpus Linguistics, Springer, 593-610. &gt;https://doi.org/10.1007/978-3-030-46216-1_24
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref27">
    <label>27</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     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. &gt;https://doi.org/10.15626/mp.2019.2058
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref28">
    <label>28</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     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. &gt;https://doi.org/10.1145/3631908.3631909
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref29">
    <label>29</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     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. 
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref30">
    <label>30</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Götze, F. and Tikhomirov, A. (2002) Asymptotic Distribution of Quadratic Forms and Applications. Journal of Theoretical Probability, 15, 423-475. &gt;https://doi.org/10.1023/a:1014867011101
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref31">
    <label>31</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Rubia, J.M.D.L. (2024) Rice University Rule to Determine the Number of Bins. Open Journal of Statistics, 14, 119-149. &gt;https://doi.org/10.4236/ojs.2024.141006
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref32">
    <label>32</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Gross, J. and Ligges, U. (2022) Package ‘Nortest’, Tests for Normality. Version 1.0-4. &gt;https://cran.r-project.org/web/packages/nortest/nortest.pdf 
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref33">
    <label>33</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Korkmaz, S. (2025) Package ‘MVN’. Multivariate Normality Tests. &gt;https://cran.r-project.org/web/packages/MVN//MVN.pdf 
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref34">
    <label>34</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ferrari, A. (2019) A Note on Sum and Difference of Correlated Chi-Squared Variables. arXiv: 1906.09982. &gt;https://doi.org/10.48550/arXiv.1906.09982 
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref35">
    <label>35</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Jobst, L.J., Bader, M. and Moshagen, M. (2023) A Tutorial on Assessing Statistical Power and Determining Sample Size for Structural Equation Models. Psychological Methods, 28, 207-221. &gt;https://doi.org/10.1037/met0000423
    </mixed-citation>
   </ref>
   <ref id="scirp.145868-ref36">
    <label>36</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Henze, N. and Zirkler, B. (1990) A Class of Invariant Consistent Tests for Multivariate Normality. Communications in Statistics—Theory and Methfods, 19, 3595-3617. &gt;https://doi.org/10.1080/03610929008830400
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>