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

    Function aovEz

    • Repeated-measures (within-subjects), between-subjects and mixed analysis of variance from long data. Equivalent to afex::aov_ez() in R. As afex's aov_ez(id, dv, data, between, within, type, observed, anova_table = list(correction, es)), it returns afex's anova table and car's univariate tests, sphericity corrections (Greenhouse-Geisser, Huynh-Feldt) and Mauchly tests.

      Between-subjects factors use contr.sum and sorted levels; the levels of within-subjects factors are taken in order of first appearance. Several rows for a subject and a cell are averaged (with afex's warning); subjects that miss a cell are removed (with a warning).

      Parameters

      Returns AovEzResult

      const data = {
      id: ["s1", "s1", "s2", "s2", "s3", "s3", "s4", "s4"],
      W: ["a", "b", "a", "b", "a", "b", "a", "b"],
      y: [4.1, 5.0, 3.8, 4.9, 4.4, 5.6, 4.0, 4.7],
      };
      aovEz(data, { id: "id", dv: "y", within: "W" }).anova.rowNames; // ["W"]