Statistics Lab · step 04

Measure association.

Calculate absolute risk, risk difference, risk ratio and odds ratio—and know which study designs support each one.

Outcome: a correctly oriented 2 × 2 table and measures whose names, directions and denominators are explicit.

Seven-step investigationNow: 04 · Measure association

Analysis checkpoint

Translate the 2 × 2 table into clinically readable measures.

Work through these six prompts in order. Each one supplies what the next one needs.

1 · Before you start

Have the checked medication-review by disability table from Step 03, including the outcome count and denominator within each exposure group.

Words used on this page

Risk
the proportion of a group who develops the outcome during the stated period.
Odds
the probability of the outcome divided by the probability of no outcome.
Reference group
the comparison group that defines the denominator of a ratio.
Risk difference
the absolute subtraction of two risks; a risk ratio divides them.
2 · Why this comes now

A p-value does not say how large an association is. Because this is a cohort with a defined follow-up period, risks, absolute differences and risk ratios can be estimated directly before regression.

3 · Do this now
  1. Calculate six-month disability risk separately for reviewed and unreviewed participants.
  2. Calculate the risk difference, risk ratio and odds ratio using no review as the reference.
  3. Attach the follow-up period, direction, denominator and confidence interval to every interpretation.
Same step in Stata and SPSS

Run Section 04 in Stata or SPSS. Check the printed row and category order: software may display a reciprocal ratio if the reference group is reversed.

4 · Read this

For a difference, compare with 0; for a ratio, compare with 1. Read both the point estimate and confidence interval, then translate the absolute measure into cases per 100 people when useful.

5 · Ready to continue when

You can explain risk, odds and their ratios in plain language, name the reference group and identify whether the interval includes the null value.

6 · Next step 05 · Choose regression Choose a model from the outcome type and account for baseline differences.

Begin here

What is being measured?

We are asking whether disability during six months was more or less common among participants who received a medication review. Before using any ratio, start with people and denominators.

01

Outcome

What happened? Here it is new disability by six months: yes or no.

02

Exposure

Which groups? Medication review is compared with no review.

03

Risk

How common? People with disability divided by all people followed in that group.

Risk people who develop the outcome all people at risk at the start

In ordinary language, risk is a probability: the chance that a person in a defined group experiences the outcome during a stated period.

Work from people

Build the two risks first.

Medication reviewDisabilityNo disabilityTotalRisk
Yes4515520045 ÷ 200 = 22.5%
No · reference group112400512112 ÷ 512 = 21.9%
Absolute measure

Risk difference

22.5% − 21.9% = +0.6 percentage points

About 6 more cases per 1,000 reviewed people. Zero means no absolute difference. The 95% confidence interval, −6.2 to +7.4 percentage points, includes both fewer and more cases.

Relative measure

Risk ratio

22.5% ÷ 21.9% = 1.03

The observed risk was 1.03 times the risk in the no-review group: roughly 3% higher on the relative scale. One means equal risk; below one means lower risk; above one means higher risk. The 95% confidence interval is 0.76 to 1.40.

< 1 · lower1 · no relative difference> 1 · higher
Relative measure

Odds ratio

(45 ÷ 155) ÷ (112 ÷ 400) = 1.04

Odds compare people with the outcome with people without it. They are not probabilities: 45 cases among 200 people is a 22.5% risk, but its odds are 45 to 155. The odds ratio is essential in case-control studies and is produced by logistic regression. Its 95% confidence interval is 0.70 to 1.54.

Representative output · same teaching data in all three routes

Six-month disability association

Reviewed risk                  45 / 200 = 0.225
No-review risk               112 / 512 = 0.219

Risk difference                +0.006  (95% CI -0.062 to 0.074)
Risk ratio                      1.03   (95% CI  0.76 to 1.40)
Odds ratio                      1.04   (95% CI  0.70 to 1.54)

What the output means

Over six months, observed disability risk was 22.5% in the reviewed group and 21.9% in the no-review reference group. The point estimates are close to no association, while every confidence interval is also compatible with clinically meaningful benefit and harm. Because this is a cohort, risks and a risk ratio are directly estimable; the odds ratio is shown mainly to connect the table with later logistic regression.

Write the interpretation like this

Six-month disability occurred in 45/200 reviewed participants (22.5%) and 112/512 participants without review (21.9%), giving a crude risk difference of +0.6 percentage points (95% CI −6.2 to +7.4) and a risk ratio of 1.03 (95% CI 0.76 to 1.40).

These are crude, unadjusted comparisons. None shows that medication review caused disability. The reviewed participants may have been frailer before the study began.

Which measure?

Match the measure to the data you actually have.

MeasureWhat it comparesWhen it belongsRead this value
Risk differenceTwo probabilities, by subtraction.Cohort or trial with a defined follow-up period.+5 percentage points means 5 more outcomes per 100 people.
Risk ratioTwo probabilities, by division.Cohort or trial where both group risks are observed.0.70 means the observed risk is 30% lower; 1.00 means equal risk.
Odds ratioTwo sets of outcome odds.Case-control studies and logistic regression.2.00 means twice the odds, not twice the probability.
Rate ratioEvents per unit of person-time.Different follow-up times or outcomes that can recur, such as falls.1.40 means 40% more events per person-year.
Hazard ratioModelled event rates at each moment.Time-to-event data with censoring, such as time to admission.0.80 is a relative hazard, not “20% fewer people admitted”.
Stata

For a cohort with equal follow-up, cs reports risks, the risk difference and risk ratio; or adds the odds ratio.

cs disability_6m med_review, or

* For case-control data, estimate an odds ratio instead:
* cc disability_6m med_review
Download the complete commented Stata do-file
IBM SPSS Statistics

RISK adds cohort risk estimates and the odds ratio to a 2×2 Crosstabs table; check the printed direction carefully.

CROSSTABS
  /TABLES=med_review BY disability_6m
  /STATISTICS=CHISQ RISK
  /CELLS=COUNT ROW COLUMN.
Download the complete commented SPSS syntax file
R and RStudio

Name the four cells, then calculate risks and odds explicitly so the numerator, denominator and reference group remain auditable.

tab <- with(cohort, table(med_review, disability_6m))
a <- tab["1", "1"]  # reviewed cases
b <- tab["1", "0"]  # reviewed non-cases
c <- tab["0", "1"]  # no-review cases
d <- tab["0", "0"]  # no-review non-cases

risk_review <- a / (a + b)
risk_no_review <- c / (c + d)
risk_difference <- risk_review - risk_no_review
risk_ratio <- risk_review / risk_no_review
odds_ratio <- (a * d) / (b * c)
Download the complete commented R script

Every result needs four labels: the measure, the reference group, the follow-up period and the confidence interval. “Relative risk” is too vague if you actually mean a risk ratio, rate ratio, prevalence ratio or hazard ratio.

Procedure reference

Epidemiological tables.

Stata Epitab manual

Official guidance for cohort risks, case-control odds and stratified tables.

Open the manual

SPSS Crosstabs statistics

IBM’s definitions for chi-square, risk estimates and Mantel–Haenszel statistics.

Open IBM documentation