# Moderation (/docs/analyses/moderation-analysis)



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

Use moderation when you think the slope of X changes across levels of M. For example: does an extra study hour buy more exam points when anxiety is low than when anxiety is high? The test is the product term, hours × anxiety.

## Assumptions [#assumptions]

Same straight-line model as [linear regression](/docs/analyses/linear-regression), plus the product term. Tensr centers the predictors by default before building that product, so the hours slope is the slope at average anxiety.

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

<Steps>
  <Step>
    Analyze → Regression → Moderation. In chat: “Does anxiety moderate the effect of hours on score?”
  </Step>

  <Step>
    Outcome, predictor, and moderator are three numeric columns.
  </Step>

  <Step>
    Center variables starts on. Confidence level starts at 0.95.
  </Step>
</Steps>

## Options [#options]

<TypeTable
  type="{
  outcome_column: {
    type: 'string',
    description: 'Numeric outcome.',
  },
  predictor_column: {
    type: 'string',
    description: 'The slope you care about (X).',
  },
  moderator_column: {
    type: 'string',
    description: 'The column that might change that slope (M).',
  },
  center_variables: {
    type: 'boolean',
    description: 'Subtract the mean from X and M before multiplying them.',
    default: 'true',
  },
  confidence_level: {
    type: 'number',
    description: 'Accepted on the request. The coefficient table prints B, SE, and p.',
    default: '0.95',
  },
  decimal_places: {
    type: '0–6',
    description: 'Report output. Decimal places.',
    default: '3',
  },
  apa_format: {
    type: 'boolean',
    description: 'Report output. APA-style p-values.',
    default: 'true',
  },
  include_charts: {
    type: 'boolean',
    description: 'Report output. Shared chart switch.',
    default: 'true',
  },
}"
/>

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

Hours predicting exam score, with practice quizzes as the moderator. Practice was built with no link to the slope, so the interaction is the result to read.

| Term             |      B |    SE |       p |
| ---------------- | -----: | ----: | ------: |
| Intercept        | 71.372 | 0.815 | \< .001 |
| hours            |  2.108 | 0.706 |    .004 |
| practice         | -0.247 | 0.851 |    .772 |
| hours × practice | -0.307 | 0.655 |    .641 |

| Moderator level | Slope |
| --------------- | ----: |
| Low M (−1 SD)   | 2.405 |
| Mean M          | 2.108 |
| High M (+1 SD)  | 1.811 |

The interaction between `hours` and `practice` is not statistically significant at the 95% level, suggesting moderation is not supported. The primary result is not significant (p = .641). This is not large enough to treat the comparison this page is about as a reliable association. The result is non-significant: the data are still compatible with no effect. Metrics: R² = 0.11; Adj R² = 0.081; F = 3.776; p (model) = .013; p (interaction) = .641.

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

The interaction between `hours` and `practice` is not statistically significant at the 95% level, suggesting moderation is not supported. This result is not significant (p = .641). Report the estimate with that p, and do not describe the pattern as a reliable effect.

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

Analyze → Regression → Moderation.

SPSS does not ship a single Moderation dialog in the base menus. The usual path is Linear Regression with a computed product term. Tensr builds that product and the simple slopes.

## Related [#related]

Entering hours and anxiety without a product term is [linear regression](/docs/analyses/linear-regression).
