Association measures 2x2 table EN - pdmoerland/wiki-biostatistiek-bilingual GitHub Wiki

Association measures for a 2x2 table

Deze pagina lezen in het Nederlands.

Author: prof. dr. R.J. de Haan
Co-author: M. Soete
Authorship

This page was translated from the Dutch-language original using AI and has not been fully reviewed. Where the two differ, the Dutch version takes precedence.

Contents

An association between two dichotomous/binary variables can be represented as a 2x2 cross-tabulation (contingency table). There are various ways to quantify such associations.

Relative risk

The relative risk (RR), also known as the risk ratio, is a well-known measure of association for variables with two outcome categories. The measure expresses the strength of the relationship between a determinant and an outcome. The values of the RR lie between 0 (maximal negative association) and +infinity (maximal positive association), while in the absence of an association the RR equals 1. Suppose that in a large-scale, placebo-controlled clinical trial (n=4444) we want to investigate the effect of long-term statin use on the reduction of mortality. The study group consists of patients who have had a myocardial infarction or suffer from angina pectoris. The trial shows the following results.

death no death total
statin 182 (a) 2039 (b) 2221 (a+b)
placebo 256 (c) 1967 (d) 2223 (c+d)

The RR is calculated as:

(a/(a+b)) / (c/(c+d)) = (182/2221) / (256/2223) = 0.71

So you divide the probability of death occurring in the treatment group by the probability of death occurring in the placebo group. In other words, the RR expresses the ratio between the mortality incidence among patients who were treated and those who were not. RR < 1 means, in this example, a beneficial treatment effect, and RR > 1 an unfavorable effect. In other words: statin reduces the probability of death by a factor of 0.71. The association between treatment and outcome also turns out to be significant: p < 0.001 (Chi-square test).

Relative risk reduction

Using the example above, the so-called relative risk reduction (RRR) can also be calculated. The RRR is calculated as:

100% * (1 – RR) = 100% * (1 – 0.71) = 29%.

In other words: due to the statin treatment, the risk of death decreases by 29%.

Absolute risk reduction

The decrease in mortality risk can also be expressed as an absolute risk reduction (ARR). The mortality rate in the statin group is (182/2221) = 8.2% and in the placebo group (256/2223) = 11.5%. The ARR is therefore 11.5% - 8.2 = 3.3%. In other words: by treating 100 patients, 3.3 lives are saved.

Number Needed to Treat

The inverse of the ARR is the Number Needed to Treat (NNT). This measure gives good insight into the clinical relevance of a therapeutic effect. The NNT is calculated as follows: 100% / ARR. In this example, the NNT is therefore 100% / 3.3 = 30. In other words: to prevent 1 death, 30 patients need to be treated with statin.

Odds ratio

The association between variables with two outcome categories can also be expressed as an odds ratio (OR). The choice between OR and RR depends on the study design. In the trial example above, there is a prospective study design, which offers the possibility of calculating an absolute probability of a particular outcome occurring. In other research situations, such as case-control studies or retrospective studies, it is not possible to calculate this absolute probability directly, and an alternative measure of association must be used: the odds ratio (OR). The OR can be regarded as an estimator of the RR, where the focus is not on calculating absolute probabilities of the outcome variables, but on their relative probabilities. Just as with the RR, the values of the OR lie between 0 (maximal negative association) and +infinity (maximal positive association), while in the absence of an association the OR equals 1. Suppose that in a case-control study we want to investigate the association between smoking and having a cardiovascular condition (example taken from "Inleiding in de toegepaste biostatistiek" by J.W.R Twisk, Elsevier Gezondheidszorg, Maarssen, 2007). Among the cases with a cardiovascular condition (n=147), there are 86 smokers (59%), while in the control group without a cardiovascular condition (n=53), 14 people smoke (26%).

cardiovascular condition no cardiovascular condition
smoking 86 (a) 14 (b)
not smoking 61 (c) 39 (d)

The OR is calculated as:

(a/b) / (c/d) = (86/14) / (61/39) = 3.9

So you divide the ratio of probabilities. The ratios a/b and c/d are called 'odds'. In this example, a/b is the ratio between the probability of having and not having a cardiovascular condition among smokers, and c/d is the ratio between the probability of having and not having a cardiovascular condition among non-smokers. The OR is thus a measure of the risk ratio for disease in the presence or absence of the determinant. OR < 1 means, in this example, a protective effect of the determinant on the outcome, and OR > 1 a harmful effect. In other words: the odds of having a cardiovascular condition for smokers are 3.9 times as high as the odds of having this condition for non-smokers. This association also turns out to be significant: p < 0.001 (Chi-square test).

Because odds are rather difficult to interpret, the OR is often treated as if it were an RR, but they are not the same. The OR is in fact always an overestimate of the RR. This overestimation becomes larger as the prevalence of the outcome variable increases.

The odds ratio is widely used in logistic regression.

How can I obtain the confidence interval of an odds ratio in SPSS if I only have a cross-tabulation?

The cross-tabulation provides sufficient information, and it is not necessary to create a row for each of the N cases in that cross-tabulation, as your data file in SPSS is normally structured. Instead, it is sufficient to create one case or row for each of the (4) cells in the cross-tabulation in a new data file:

You then first create (using syntax or otherwise) three variables (columns in an SPSS data file): two dichotomous variables representing the row variable and the column variable of the cross-tabulation respectively, and a frequency variable. You then specify 4 cases (rows in an SPSS data file), each representing one of the cells in your cross-tabulation. For all four of these cases (cells), you use the frequency variable to indicate how many patients meet that pattern. You use the frequency variable as a 'weight' in the analysis. Here is an example for a chi-square test from Stack Overflow:

DATA LIST FREE /STATUS success freq.

BEGIN DATA 0 0 1544 0 1 14 1 0 17 1 1 7 END DATA.

WEIGHT BY freq. VALUE LABELS status 0 'Amateur' 1 'Professional' / success 0 'Failure' 1 'Success'. SET ONUMBERS LABELS.

CROSSTABS status BY success /STATISTICS CHISQUARE.

Of course, you can also determine an odds ratio for this data by performing a univariable logistic regression (still with weighting for the frequency variable). This can be done by running the following syntax:

LOGISTIC REGRESSION VARIABLES success /METHOD=ENTER status /PRINT=CI(95).

How does the diagnostic odds ratio work?

The odds ratio, abbreviated as OR, is a measure of association for variables with two outcome categories. In medicine, the odds ratio is often used as a measure of risk for the association of a risk factor with a disease state. The odds ratio can also be used when evaluating diagnostic tests; in that case we speak of the diagnostic odds ratio. The 2x2 table then looks as follows.

Disease present Disease absent total
Positive test result a b a+b
Negative test result c d c+d
total a+c b+d a+b+c+d

a is then the number of 'true positives', and this frequency is, unless there is no association, always relatively higher among those with a positive test result than among the 'negatives': a/(a+b) > c/(c+d), and higher than the prevalence (a+c)/(a+b+c+d). 'True positives' are people who are (correctly) positive because they are indeed also diseased. b is then the frequency of the 'false positives' — these test positive but are not diseased; c is the number of 'false negatives'; d is the number of 'true negatives'. The diagnostic OR here is the product of the 'trues' (a*d) divided by the product of the 'falses' (b*c):

$OR = \frac{a/b}{c/d}=\frac{a*d}{b*c}.$

If the OR of test A is greater than that of test B, then test A is diagnostically better than test B.

The OR can also be used to judge whether a test meets a mathematical requirement for a screening test. According to certain authors, the OR of a screening test should be equal to or greater than 100.

How do I transform an OR below 1 into an OR above 1?

In my study, after a regression analysis I ended up with an odds ratio and a CI of 0.65 and 0.43-0.97 respectively. I would now like to convert these to an odds/CI above 1. Is that possible, and if so, how?

To get the odds ratio "the other way round", you need to change the reference category of the variable. For example: if men vs women, with women as your reference (0), gives an OR <1, then women vs men, with men as your reference (0), gives an OR>1. The resulting OR equals the reciprocal (or inverse) of the OR (1/OR).

NB: It makes no sense to calculate the inverse odds ratio for the diagnostic OR. The diagnostic OR is always greater than 1. This follows from the definition of the concept 'positive test result'. A positive test result is a test result that occurs relatively more often in people who have the target disease than in people who do not. For the diagnostic odds ratio, a/(a+c) must therefore always be greater than c/(c+d).

Can I interpret an OR as an RR?

I have always learned that odds ratios should not be interpreted as risks. In this article from the Lancet, they look for a relationship between nursing (staffing ratio / education) and hospital mortality. There, they end up with odds ratios (1.068 and 0.929), from which they conclude that a one-step increase in one produces a 7% increase in mortality, and an increase in the other produces a 7% decrease in mortality. Why is it acceptable here to interpret the OR as a risk value?

You are right, an OR of 1.068 means that the odds of mortality are 7% higher, not that the risk of mortality itself is 7% higher. However, when prevalence is low (little overall mortality), the OR and RR will become very similar, and the OR can then also be used as an approximation for the RR (Cummings 2009).

Additional resources


Finished reading? You can go to the Overview of all topics, or to Choosing a test for help picking a suitable test or analysis. Want to learn more about biostatistics? Then follow the AMC e-learning Practical Biostatistics. Did you find something on these pages that isn't correct? Does a link not work? Or would you like to contribute to the wiki? Then get in touch with us.

This biostatistics wiki is an initiative of the former statistics helpdesk of Amsterdam UMC, location AMC. Amsterdam UMC staff can request statistical support via intranet.

⚠️ **GitHub.com Fallback** ⚠️