Login

Jonckheere-Terpstra test using SPSS Statistics

Introduction

The Jonckheere-Terpstra test is a rank-based nonparametric test that can be used to determine if there is a statistically significant trend between an ordinal independent variable and a continuous or ordinal dependent variable. The Jonckheere-Terpstra test tests for an ordered difference in medians where you need to state the direction of this order (this will become clearer below). It is also known as the Jonckheere-Terpstra test for ordered alternatives.

Note: The Jonckheere-Terpstra test is similar to the Kruskal-Wallis H test, which can be used to determine if there are statistically significant differences between two or more groups of an independent variable on a continuous or ordinal dependent variable. However, unlike the Jonckheere-Terpstra test, the Kruskal-Wallis H test does not predict how the differences in the scores of the dependent variable will depend on the ordinal nature of the groups of the independent variable. This is explained further in the Assumptions section later.

For example, you could use a Jonckheere-Terpstra test to understand whether test scores, measured on a continuous scale from 0-100, differed based on time spent revising (i.e., your dependent variable would be "test score" and your independent variable would be "revision time", which has four ordinal independent groups: "0-5 hours", "6-10 hours", "11-15 hours" and "16-20 hours"). You expect that median test score increases with increasing hours spent revising. Alternately, you could use the Jonckheere-Terpstra test to understand whether job satisfaction, measured on an ordinal scale, differed based on job position (i.e., your dependent variable would be "job satisfaction", measured on a 5-point scale from "very satisfied" to "very dissatisfied", and your independent variable would be "job position", which has three ordered independent groups: "Account Executive", "Account Manager" and "Account Director"). You expect job satisfaction to increase with higher job position.

This "quick start" guide shows you how to carry out a Jonckheere-Terpstra test using SPSS Statistics, as well as how to interpret and report the results from this test. However, before we introduce you to this procedure, you need to understand the different assumptions that your data must meet in order for a Jonckheere-Terpstra test to give you a valid result. We discuss these assumptions next.

SPSS Statistics

Assumptions

When you choose to analyse your data using a Jonckheere-Terpstra test, part of the process involves checking to make sure that the data you want to analyse can actually be analysed using a Jonckheere-Terpstra test. You need to do this because it is only appropriate to use a Jonckheere-Terpstra test if your data "passes" six assumptions that are required for a Jonckheere-Terpstra test to give you a valid result. In practice, checking for these six assumptions just adds a little bit more time to your analysis, requiring you to click a few more buttons in SPSS Statistics when performing your analysis, as well as think a little bit more about your data, but it is not a difficult task.

Before we introduce you to these six assumptions, do not be surprised if, when analysing your own data using SPSS Statistics, one or more of these assumptions is violated (i.e., is not met). This is not uncommon when working with real-world data rather than textbook examples, which often only show you how to carry out a Jonckheere-Terpstra test when everything goes well! However, don’t worry. Even when your data fails certain assumptions, there is often a solution to overcome this. First, let’s take a look at these six assumptions:

You can check assumption #4 using SPSS Statistics. You should also check that you meet assumptions #1, #2, #3, #5 and #6, which you can do without using SPSS Statistics.

In the Test Procedure in SPSS Statistics section of this "quick start" guide, we illustrate the SPSS Statistics procedure to perform a Jonckheere-Terpstra test assuming that you have met all the assumptions. First, we set out the example we use to explain the Jonckheere-Terpstra test procedure in SPSS Statistics.

SPSS Statistics

Example

A researcher believes that individuals who are more physically active are better able to cope with stress in the workplace. To test this theory, the researcher recruited 31 participants and measured how many minutes of physical activity they performed per week and their ability to cope with workplace-related stress.

The participants were categorized into four groups based on the number of minutes of physical activity they performed each week; namely, "Sedentary", "Low", "Moderate" and "High" physical activity groups. These physical activity groups formed the groups of an ordinal independent variable called group. The ability to cope with workplace stress was assessed as the average score of a series of Likert items on a questionnaire, which allowed an overall 'coping with workplace stress' score to be calculated; higher scores indicating a greater ability to cope with workplace-related stress. This dependent variable was called coping_stress (N.B., the 'ability to cope with workplace-related stress' has been abbreviated as the 'CWWS' score for ease).

The researcher would like to know if the CWWS score increases with increasing physical activity level (i.e., increases from "Sedentary" to "High" physical activity level groups). In variable terms, does coping_stress increase with increasing levels of group?

Testimonials
TAKE THE TOUR


SPSS Statistics

Test Procedure in SPSS Statistics

The seven steps below show you how to analyse your data using the Jonckheere-Terpstra test in SPSS Statistics. At the end of these seven steps, we show you how to interpret the results from your Jonckheere-Terpstra test. If you want to find out where the differences between your groups lie (the Jonckheere-Terpstra test only tells you whether there was a statistically significant overall trend with your groups), you will need to follow up your Jonckheere-Terpstra test with a post hoc test.

Note 1: SPSS Statistics has two different procedures that can be used to run a Jonckheere-Terpstra test: the Legacy Dialogs > K Independent Samples procedure and the Nonparametric Tests > Independent Samples procedure. The procedure we set out below is the Nonparametric Tests > Independent Samples procedure, which can be used for SPSS Statistics versions 18 to 28 (and the subscription version of SPSS Statistics), but not for older versions (i.e., version 17 or earlier versions of SPSS Statistics). The benefit of the Nonparametric Tests > Independent Samples procedure is that it can automatically run a post hoc test, making the analysis procedure much quicker and easier. However, if you have an earlier version of SPSS Statistics or the Exact Module of SPSS Statistics, it is also possible to run the Legacy Dialogs > K Independent Samples procedure. However, the Legacy Dialogs > K Independent Samples procedure does come with the disadvantage of not automatically running a post hoc test so you have to carry out additional procedures in SPSS Statistics to achieve this. If you are unsure which version of SPSS Statistics you are using, see our guide: Identifying your version of SPSS Statistics.

Note 2: The procedure that follows is identical for SPSS Statistics versions 17 to 28, as well as the subscription version of SPSS Statistics, with version 28 and the subscription version being the latest versions of SPSS Statistics. However, in version 27 and the subscription version, SPSS Statistics introduced a new look to their interface called "SPSS Light", replacing the previous look for versions 26 and earlier versions, which was called "SPSS Standard". Therefore, if you have SPSS Statistics versions 27 or 28 (or the subscription version of SPSS Statistics), the images that follow will be light grey rather than blue. However, the procedure is identical.

  1. Click Analyze > Nonparametric Tests > Independent Samples... on the main menu, as shown below:
    Menu for the Jonckheere-Terpstra test in SPSS Statistics

    Published with written permission from SPSS Statistics, IBM Corporation.


    You will be presented with the "Nonparametric Tests: Two or More Independent Samples" dialogue box, as shown below:
    'Nonparametric Tests: Two or More Independent Samples' dialogue box in SPSS. Three tabs: 'Objective', 'Fields' & 'Settings'

    Published with written permission from SPSS Statistics, IBM Corporation.

  2. Keep the default Automatically compare distributions across groups option selected in the –What is your objective?– area.
  3. Click the Fields tab. You will be presented with the following screen:
    'Fields' tab highlighted for Jonckheere-Terpstra test. Variables 'exercise_level' & 'coping_stress' in 'Fields' box on left

    Published with written permission from SPSS Statistics, IBM Corporation.

  4. Transfer the ordinal independent variable, group, into the Groups: box and the continuous dependent variable, coping_stress, into the Test Fields: box, using the Right arrow buttons, as shown below:
    Variables 'coping_stress' & 'exercise_level' transferred into boxes on the right for Jonckheere-Terpstra test in SPSS

    Published with written permission from SPSS Statistics, IBM Corporation.

  5. Click the Settings tab and you will be presented with the following screen:
    'Settings' tab highlighted. Default options 'Choose Tests' with 'Automatically choose the tests based on the data' selected

    Published with written permission from SPSS Statistics, IBM Corporation.

  6. Select the Customize tests: option and then check Test for ordered alternatives (Jonckheere-Terpstra for k samples) in the –Compare Distributions across Groups– area. Keep the Hypothesis order: and Multiple comparisons: options at their defaults, and , respectively. You will be presented with a screen similar to that below:
    Options to carry out the Jonckheere-Terpstra test in SPSS Statistics selected

    Published with written permission from SPSS Statistics, IBM Corporation.

  7. Click on the Run button to generate the output.
Join the 10,000s of students, academics and professionals who rely on Laerd Statistics.TAKE THE TOUR
SPSS Statistics

Interpreting the Results of the Jonckheere-Terpstra test

SPSS Statistics generates all the results from the Jonckheere-Terpstra test procedure you ran in the previous section in the IBM SPSS Statistics Viewer if you have SPSS Statistics versions 27 or 28 (or the subscription version of SPSS Statistics), or in the Model Viewer window if you have SPSS Statistics version 26 or an earlier version of SPSS Statistics. These results are only appropriate if your data passed all the necessary assumptions, which we explained earlier in the Assumptions section. Remember that if your data failed these assumptions, the output that you get from the Jonckheere-Terpstra test procedure (i.e., the tables we discuss below), will no longer be correct.

However, in this "quick start" guide, we focus on the results from the Jonckheere-Terpstra test procedure only, assuming that your data met these assumptions. Therefore, when running the Jonckheere-Terpstra test procedure, you will be presented with the table below, entitled Hypothesis Test Summary:

'Hypothesis Test Summary' table. Jonckheere-Terpstra test in SPSS. Columns for 'Null Hypothesis', 'Test', 'Sig.' & 'Decision'

Published with written permission from SPSS Statistics, IBM Corporation.

The first column of this summary table (the "Null Hypothesis" column) expresses the null hypothesis in terms of the distributions of "Coping with workplace stress" (CWWS) scores (i.e., the dependent variable) across the groups of "Physical Activity Level" (i.e., the independent variable). The next column (the "Test" column) simply indicates that it is the Jonckheere-Terpstra test that has been conducted (specifically, SPSS Statistics calls this test the "Independent-Samples Jonckheere-Terpstra Test for Ordered Alternatives"). The most important column is the "Sig." column, which displays the statistical significance value of the Jonckheere-Terpstra test (i.e., the p-value). Using this statistical significance value, it is possible to reach a decision with regard to whether to retain the null hypothesis or accept the alternative hypothesis. The decision made, based on this p-value, is presented in the final column: the "Decision" column. Because p < .05 (it is p < .0005), the null hypothesis can be rejected and this is stated in this column as "Reject the null hypothesis".

Next, view the results in the Independent-Samples Jonckheere-Terpstra Test for Ordered Alternatives Summary table, as shown below:

Note: If you have have SPSS Statistics version 26 or an earlier version of SPSS Statistics, you need to double-click on the Hypothesis Test Summary table to launch the Model Viewer, which includes the table below.

Table from the 'Model Viewer' output for the Jonckheere-Terpstra test in SPSS Statistics

Published with written permission from SPSS Statistics, IBM Corporation.

The table above includes the sample size, "Total N", the "Test Statistic", "Standard Error", "Standardized Test Statistic" and "Asymptotic Sig. (2-sided test)". Each of these statistics provides valuable information. The table shows that there were 31 participants. The "Test Statistic" row provides the value of the Jonckheere-Terpstra test statistics (called the TJT or J-statistic), which is 286.000, whilst the p-value is .000 (i.e., p < .0005) (the "Asymptotic Sig. (2-sided test)" row).

So far, all these results tell us is that we can accept the alternative hypothesis that median CWWS score increases with increasing physical activity level and that this trend is statistically significant. We do not know which physical activity group was higher than which other group (i.e., whether median CWWS was higher for the "low" physical activity group when compared to the "sedentary" group). To determine this, you need to look at the post hoc test results that are produced when you run the Jonckheere-Terpstra test procedure. These results are shown in either the IBM SPSS Statistics Viewer or Model Viewer, depending on which version of SPSS Statistics you are using. We do not show you how to analyse post hoc test results in this "quick start" guide.

SPSS Statistics

Reporting the Results of the Jonckheere-Terpstra test

Using the data from the two tables above, you could report the results as:

A Jonckheere-Terpstra test for ordered alternatives showed that there was a statistically significant trend of higher median CWWS scores with higher levels of physical activity (from "sedentary", "low", "moderate" to "high" physical activity levels), TJT = 286.00, z = 3.756, p < 0.0005.

Join the 10,000s of students, academics and professionals who rely on Laerd Statistics.TAKE THE TOUR
1