# Jonckheere–Terpstra test (/docs/analyses/jonckheere-terpstra)



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

Use Jonckheere–Terpstra instead of Kruskal–Wallis when the groups have an order and you expect the scores to rise or fall along that order.

## Assumptions [#assumptions]

Groups are independent. Pass `group_order` when the label sort is not the order you mean. Otherwise numeric labels sort numerically and other labels sort alphabetically.

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

<Steps>
  <Step>
    Analyze → Nonparametric Tests → Jonckheere–Terpstra. In chat: “Jonckheere–Terpstra test of score by method.”
  </Step>

  <Step>
    Set group order to lecture, online, workshop when those names should be the sequence.
  </Step>
</Steps>

## Options [#options]

<TypeTable
  type="{
  group_column: { type: 'string', description: 'Ordered groups.' },
  value_column: { type: 'string', description: 'Score to rank.' },
  group_order: {
    type: 'string[]',
    description: 'Optional order of the group labels.',
  },
  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 teaching methods ordered Workshop, then Lecture, then Online. That is not the order of the exam means, so a monotone trend in this order is not expected.

Jonckheere–Terpstra trend test for `score` across ordered groups (Workshop, Lecture, Online). The primary result is not significant (p = .805). 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: J statistic = 1409; Z = -0.861; p-value = .805.

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

Jonckheere–Terpstra trend test for `score` across ordered groups (Workshop, Lecture, Online). This result is not significant (p = .805). Report the estimate with that p, and do not describe the pattern as a reliable effect.

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

Analyze → Nonparametric Tests → Jonckheere–Terpstra.
