# Cochran–Armitage trend test (/docs/analyses/cochran-armitage)



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

Use Cochran–Armitage when the outcome is binary and the groups have an order. It is the z-test cousin of the Mantel–Haenszel trend test.

## Assumptions [#assumptions]

The group column must sort into the intended order. The outcome has two levels.

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

<Steps>
  <Step>
    Analyze → Correlate → Cochran-Armitage Trend. In chat: “Cochran–Armitage trend of dose by illness.”
  </Step>

  <Step>
    Group column is ordered. Outcome column is binary.
  </Step>
</Steps>

## Options [#options]

<TypeTable
  type="{
  group_column: { type: 'string', description: 'Ordered groups.' },
  outcome_column: { type: 'string', description: 'Binary outcome.' },
  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]

The same dose groups against a response that rises from low to high.

Cochran–Armitage trend test: `response` by `dose` (decreasing trend). The primary result is significant (p = \< .001). This is large enough, in this sample, to treat the comparison this page is about as a real association rather than noise. Metrics: Z = -29.811; p (two-tailed) = \< .001; p (one-tailed) = > .999; Trend = decreasing.

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

Cochran–Armitage trend test: `response` by `dose` (decreasing trend). This result is significant (p = \< .001). The effect is moderate, so report its size with the p-value.

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

Analyze → Correlate → Cochran-Armitage Trend.
