Skip to main content

Cochran-Armitage trend test in Excel tutorial

This tutorial will help you set up and interpret a Cochran-Armitage trend test, in Excel using XLSTAT. Not sure this is the statistical test you are looking for? Check out this guide.

Cochran-Armitage trend test

The Cochran-Armitage trend test, also referred to as the trend on proportions test, allows to test if a series of proportions (or the corresponding counts, stored in an Rx2 contingency table), can be considered as varying linearly with an ordinal or continuous score variable. It is related to the Chi-square independence test that allows to test if there is relationship between the rows and the columns of a contingency table. The Cochran-Armitage test allows to take into account a ranking among the rows, based on scores.

Dataset for running a Cochran-Armitage trend test

The data used in this tutorial have been published in [Cochran W.G. (1954). Some methods on strengthening the common Chi-square tests. Biometrics, 10, 417-451], and are also used in [Agresti A.(1990), Categorical Data Analysis. Wiley]. The data correspond to a study where drugs have been given to patients with leprosy at two different levels (Low/High).

The clinical impact of the drugs is recorded on a five level scale (Worse, Stationary, Slight improvement, Moderate improvement, Marked improvement). Our goal is to determine whether there is a linear dependence between the impact and the level of drugs.

Setting up a Cochran-Armitage trend test

To activate the Cochran-Armitage trend test dialog box, start XLSTAT, then select the XLSTAT / Correlation-Association tests / Cochran-Armitage trend test command, or click on the corresponding button of the Correlation/Association tests toolbar (see below).

bartrend.gif

Once you have clicked on the button, the dialog box appears.

You should select the data corresponding to the two columns where the counts for each level are stored. This format corresponds to a contingency table.

As the scores (here the clinical impact which is a response variable) are ordinal data and already sorted, we do not need to select them.

As the Column labels have been selected with the counts, the corresponding option is checked.

trend1.gif

In the Options tab, we select the two-sided alternative hypothesis for the test: we only want to know if there is a linear trend or not.

We also activate the Monte Carlo method in order to obtain results that are closer to an exact test (the classical Cochran-Armitage trend test is based on an approximation).

trend2.gif

After you have clicked on the OK button, the computations start and the results are displayed on a new Excel sheet.

Interpreting the results of a Cochran-Armitage trend test

The first result is a summary based on the selected data.

trend3.gif

A scatter plot is displayed so that you can visually see if there is a trend or not. We can see here that there is a trend, and that it is almost perfectly linear.

trend4.gif

Last, the results of the two tests (approximated, and simulations based) are displayed. The two results are close and lead us to conclude, with a very low risk of being wrong, that there is a linear trend in the proportions.

trend5.gif

Was this article useful?

  • Yes
  • No