rStats.js v1.3.0
    Preparing search index...

    Function mauchlyTest

    • Mauchly's test of sphericity of the measurements of each subject (a row of y), on the contrasts spanned by M and orthogonal to X (both formulas over idata). Equivalent to R's mauchly.test(). As R's mauchly.test(lm(y ~ 1), X = ~1) and its variants (group for lm(y ~ group), M, X, idata).

      Parameters

      Returns MauchlyTestResult

      const y = [[10.5, 9.8, 8.8], [11.2, 10.1, 9.9], [9.7, 9.5, 9.0], [10.9, 10.6, 9.1], [10.1, 9.2, 9.4]];
      const r = mauchlyTest(y, { X: "~1" });
      r.statistic; // 0.64938
      r.pValue; // 0.5233