# Mixed ANOVA (/docs/analyses/anova-mixed)



## When to use it [#when-to-use-it]

Use mixed ANOVA when some groups are separate people and another factor is the same people measured more than once. For example: do control and treatment groups differ in how their scores change from pre to post?

The interaction is usually the result you care about. It asks whether the pre-to-post change is different in the two groups.

## Assumptions [#assumptions]

Between groups, the spread of scores should be similar. Within people, sphericity applies when there are three or more repeated measurements. With only two repeated measurements, sphericity holds automatically, and Mauchly’s test is not informative.

With only two repeated columns, Tensr does not print Mauchly’s test. It does not run Levene’s test or Shapiro–Wilk. Partial η² is printed for each effect. You do not choose it.

## Running it in Tensr [#running-it-in-tensr]

<Steps>
  <Step>
    Analyze → General Linear Model → Mixed ANOVA. In chat: “Mixed ANOVA of pre and post by group, with id as the subject.”
  </Step>

  <Step>
    Subject column identifies the person. Between factor is the grouping column. Within measures are the repeated columns, at least two, on a single row per person.
  </Step>

  <Step>
    Confidence level starts at 0.95. There is no post-hoc option and no switch for sphericity.
  </Step>
</Steps>

## Options [#options]

<TypeTable
  type="{
  subject_column: {
    type: 'string',
    description: 'Column that identifies each person. If it is missing, Tensr may infer one.',
  },
  between_factor: {
    type: 'string',
    description: 'Grouping factor. Each person is in one group.',
  },
  within_measures: {
    type: 'string[]',
    description: 'Repeated measurements, one column each. At least two.',
  },
  confidence_level: {
    type: 'number',
    description: 'Stored on the result. The effects tables do not print confidence intervals.',
    default: '0.95',
  },
  decimal_places: {
    type: '0–6',
    description: 'Report output. Decimal places.',
    default: '3',
  },
  apa_format: {
    type: 'boolean',
    description: 'Report output. APA-style tables.',
    default: 'true',
  },
  include_charts: {
    type: 'boolean',
    description: 'Report output. This procedure does not add its own chart.',
    default: 'true',
  },
}"
/>

## Reading the output [#reading-the-output]

Twenty-four people in control and 24 in treatment, each with a pre and a post score. Treatment was built to gain a bit more than control. The gains overlap.

| Source         |   SS | df |      MS |    F |    p | partial η² |
| -------------- | ---: | -: | ------: | ---: | ---: | ---------: |
| Between: group | 2.22 |  1 |    2.22 | 0.02 | .889 |  0.0004258 |
| Error          | 5213 | 46 | 113.321 |    — |    — |          — |

| Source            |     SS | df |     F |    p | partial η² |
| ----------------- | -----: | -: | ----: | ---: | ---------: |
| condition         |  175.5 |  1 | 9.947 | .003 |      0.178 |
| group × condition | 48.167 |  1 |  2.73 | .105 |      0.056 |

The group main effect is not significant, F = 0.02, p = .889. Scores change from pre to post, F = 9.947, p = .003. The extra treatment gain, the group × condition interaction, is not significant, F = 2.73, p = .105.

## Reporting (APA 7) [#reporting-apa-7]

A mixed ANOVA (n = 24 per group) found no group effect, F = 0.02, p = .889, a pre-to-post change, F = 9.947, p = .003, and no group × condition interaction, F = 2.73, p = .105.

## Coming from SPSS [#coming-from-spss]

Analyze → General Linear Model → Repeated Measures, with a between-subjects factor.

SPSS prints the interaction F, its degrees of freedom, and partial η² in the within-subjects table.

## Related [#related]

No between-subjects factor: [repeated-measures ANOVA](/docs/analyses/anova-repeated). No repeated factor: [one-way ANOVA](/docs/analyses/anova-oneway) or the [independent-samples t-test](/docs/analyses/ttest-independent). The rank alternative for the repeated factor alone is the [Friedman test](/docs/analyses/friedman). Tensr does not offer a nonparametric mixed ANOVA.
