The Cochran–Armitage test for trend,[1] [2] named for William Cochran and Peter Armitage, is used in categorical data analysis when the aim is to assess for the presence of an association between a variable with two categories and an ordinal variable with k categories. It modifies the Pearson chi-squared test to incorporate a suspected ordering in the effects of the k categories of the second variable. For example, doses of a treatment can be ordered as 'low', 'medium', and 'high', and we may suspect that the treatment benefit cannot become smaller as the dose increases. The trend test is often used as a genotype-based test for case-control genetic association studies.[3]
The trend test is applied when the data take the form of a 2 × k contingency table. For example, if k = 3 we have
B = 1 | B = 2 | B = 3 | |
---|---|---|---|
A = 1 | N11 | N12 | N13 |
A = 2 | N21 | N22 | N23 |
This table can be completed with the marginal totals of the two variables
B = 1 | B = 2 | B = 3 | Sum | |
---|---|---|---|---|
A = 1 | N11 | N12 | N13 | R1 |
A = 2 | N21 | N22 | N23 | R2 |
Sum | C1 | C2 | C3 | N |
where R1 = N11 + N12 + N13, and C1 = N11 + N21, etc.
The trend test statistic is
T\equiv
k | |
\sum | |
i=1 |
ti(N1iR2-N2iR1),
where the ti are weights, and the difference N1iR2 −N2iR1 can be seen as the difference between N1i and N2i after reweighting the rows to have the same total.
The hypothesis of no association (the null hypothesis) can be expressed as:
\Pr(A=1|B=1)= … =\Pr(A=1|B=k).
Assuming this holds, then, using iterated expectation,
\operatorname{E}(T)=\operatorname{E}\left(\operatorname{E}(T|R1,R2)\right)=\operatorname{E}(0)=0.
The variance can be computed by decomposition, yielding
{\rmVar}(T)=
R1R2 | |
N |
2C | |
\left(\sum | |
i(N-C |
i)-
k-1 | |
2\sum | |
i=1 |
kt | |
\sum | |
it |
jCiCj\right),
and as a large sample approximation,
T | |
\sqrt{Var(T) |
The weights ti can be chosen such that the trend test becomes locally most powerful for detecting particular types of associations. For example, if k = 3 and we suspect that B = 1 and B = 2 have similar frequencies (within each row), but that B = 3 has a different frequency, then the weights t = (1,1,0) should be used. If we suspect a linear trend in the frequencies, then the weights t = (0,1,2) should be used. These weights are also often used when the frequencies are suspected to change monotonically with B, even if the trend is not necessarily linear.
The trend test will have higher power than the chi-squared test when the suspected trend is correct, but the ability to detect unsuspected trends is sacrificed. This is an example of a general technique of directing hypothesis tests toward narrow alternatives. The trend test exploits the suspected effect direction to increase power, but this does not affect the sampling distribution of the test statistic under the null hypothesis. Thus, the suspected trend in effects is not an assumption that must hold in order for the test results to be meaningful.
Suppose that there are three possible genotypes at some locus, and we refer to these as aa, Aa and AA. The distribution of genotype counts can be put in a 2 × 3 contingency table. For example, consider the following data, in which the genotype frequencies vary linearly in the cases and are constant in the controls:
Genotype aa | Genotype Aa | Genotype AA | Sum | |
---|---|---|---|---|
Controls | 20 | 20 | 20 | 60 |
Cases | 10 | 20 | 30 | 60 |
Sum | 30 | 40 | 50 | 120 |
In genetics applications, the weights are selected according to the suspected mode of inheritance. For example, in order to test whether allele a is dominant over allele A, the choice t = (1, 1, 0) is locally optimal. To test whether allele a is recessive to allele A, the optimal choice is t = (0, 1, 1). To test whether alleles a and A are codominant, the choice t = (0, 1, 2) is locally optimal. For complex diseases, the underlying genetic model is often unknown. In genome-wide association studies, the additive (or codominant) version of the test is often used.
In the numerical example, the standardized test statistics for various weight vectors are
Weights | Standardized test statistic |
---|---|
1,1,0 | 1.85 |
0,1,1 | −2.1 |
0,1,2 | −4.67 |
and the Pearson chi-squared test gives a standardized test statistic of 2. Thus, we obtain a stronger significance level if the weights corresponding to additive (codominant) inheritance are used. Note that for the significance level to give a p-value with the usual probabilistic interpretation, the weights must be specified before examining the data, and only one set of weights may be used.