Epidemiologic Methods and Computing


Epidemiologic Methods and Computing

Maria
Welcome. Today we’re taking on a provocative title from epidemiologist Kenneth Rothman: “Epidemiology Is Easy, Anyone Can Do It.” But Rothman quickly adds the real subtitle: anyone can attempt it, though it doesn’t always work out well. His central point is that computing makes analysis faster, but speed can also make it easier to miss basic problems in the data.

Anna
And he begins by showing that epidemiology’s foundations predate computers by centuries. One early example is John Graunt’s book, published around 1650, based on London’s Bills of Mortality. Those were weekly public lists of deaths, organized by cause, compiled from inquiries by local searchers.

Maria
Graunt used those records to make striking observations. His book reported that more male than female children were born, included an early life table, and offered estimates of London’s population using three approaches that agreed closely. He also challenged the idea that plague spread by contagion and observed that population losses in plague years were offset by increases in later years.

Anna
The important methodological detail is that Graunt didn’t just announce conclusions. He published detailed tables, letting readers see much of the information behind them. Rothman returns to that idea repeatedly: showing the data makes it possible for others to assess how an analysis was done.

Maria
About two centuries later, John Snow investigated cholera in London. Before germ theory was established, Snow proposed that cholera was transmitted through contaminated water—essentially through sewage getting into water that people ingested. He is often associated with removing the handle from the Broad Street pump, though Rothman notes that the outbreak was already declining when the handle was removed.

Anna
But Snow’s enduring contribution was a particularly elegant natural experiment. Two water companies supplied overlapping parts of London. One had moved its intake upriver, away from much of the city’s sewage, while the other still took water from downriver. In some areas, their pipes ran along the same streets, and residents generally didn’t know which company supplied their homes.

Maria
Snow compared cholera deaths among people supplied by the two companies. The comparison wasn’t perfect: household supply didn’t capture every glass of water someone might drink elsewhere. Still, he found roughly a sevenfold difference in fatal cholera rates. The result supported his waterborne-transmission theory, even though many scientists at the time favored the miasma theory—that disease came from something in the air.

Anna
And, just like Graunt, Snow provided extensive tables and numbers. The readers could inspect the evidence rather than relying only on a polished summary. That kind of transparency helped make the argument checkable.

Maria
Rothman then moves to a mid-twentieth-century example: Wynder and Graham’s case-control study of tobacco smoking and lung cancer. Their published tables separated results by age, making age a potential confounder visible to readers. Rothman later reconstructed the counts from the percentages and calculated a Mantel–Haenszel summary risk ratio.

Anna
That summary compared the heaviest smokers with nonsmokers and was about 24. In other words, the lung-cancer rate in the heavy-smoking group was estimated to be about 24 times the rate among nonsmokers. The authors had provided enough detailed information for a later reader to do that analysis—even though the Mantel–Haenszel method was published years after their paper.

Maria
That sets up Rothman’s concern: detailed data tables have become less common. Modern papers often present regression coefficients and model-based graphs, but may not show enough underlying information for readers to see what the data themselves look like.

Anna
He uses old computing tools to make a broader point. McBee cards encoded information with punched holes; researchers could sort and count cards to build cross-tabulations. It sounds laborious, but compared with collecting data for months or years, a few days of sorting and calculating could be a small part of the work.

Maria
Then came computers that could produce tables overnight, and programmable calculators that could handle epidemiologic formulas. Rothman even co-wrote a book on using one. These tools clearly helped, but his point isn’t that technology is bad. It’s that faster computing can encourage people to generate results without spending enough time examining the data.

Anna
His first warning example is a report claiming that left-handed people died younger, and therefore that left-handedness was dangerous. There were problems even in the presentation: a bar chart used little space efficiently, the scale was truncated, and the left- and right-handed groups were placed on the opposite sides from what readers might expect.

Maria
But the deeper error was treating average age at death as a measure of risk. The study didn’t account for the ages of the people who were still alive. To compare mortality properly, you need age-specific death rates, which take into account the population at risk, not just the ages of those who died.

Anna
The age distributions also differed. Older people were more likely to have been born in a period when children were often forced to write with their right hand. So the population of right-handed people included more older people. A later demonstration applied identical mortality rates to both groups and still produced a much lower observed age at death for left-handed people, simply because they were younger.

Maria
Rothman gives a similar caution about claims that orchestra conductors live unusually long. You can’t compare the ages of people who became conductors with people who died at younger ages and weren’t eligible to become conductors. The people who could enter the occupation have already survived long enough to do so. An appealing explanation—music is healthy, or conducting is exercise—doesn’t establish that conductors actually have lower mortality.

Anna
Next comes the so-called healthy vaccinee effect. Studies of older adults found that people vaccinated against influenza had about half the all-cause mortality of unvaccinated people. That is an enormous benefit, and it should prompt a question: could influenza vaccination plausibly prevent half of all deaths?

Maria
Seasonal deaths do rise during winter, partly in years when influenza is more intense. But the difference between the seasonal peak and trough is nowhere near half of all deaths. Another study found that the apparent mortality reduction was already around 60 percent before influenza arrived, and it persisted after the virus was gone. That timing makes it clear that influenza prevention alone can’t explain the result.

Anna
The likely explanation is that people who are very ill or close to death are less likely to be vaccinated. Their deaths then accumulate disproportionately in the unvaccinated group, making that group look much less healthy from the outset. That selection creates an exaggerated apparent benefit—the healthy vaccinee effect. Rothman is clear that influenza vaccines do prevent deaths; the problem is interpreting the data as if they prevent half of all deaths.

Maria
His next example is a study of cataract surgery among women in the Women’s Health Initiative. The researchers compared mortality among people diagnosed with cataracts who later had surgery with mortality among those who did not. They reported a striking reduction in all-cause mortality—around 60 percent, with a very narrow confidence interval.

Anna
That result should raise an alarm: cataract surgery is not a plausible explanation for a dramatic reduction in deaths from every cause, including cancer and vascular disease. The key problem was the starting point. They followed people from cataract diagnosis, then classified them according to whether they eventually had surgery.

Maria
To be counted in the surgery group, a person had to survive from diagnosis until the operation. Anyone who died before surgery could not enter that group and was counted among those without surgery. That guaranteed survival time was incorrectly credited to the surgery group. Rothman calls this immortal time bias, also known as a form of mortal time bias.

Anna
The remedy is to align the classification and follow-up correctly—for example, compare groups from the time of surgery, rather than using future surgery status to classify people from an earlier diagnosis date. The study was eventually reanalyzed, and the estimated mortality ratio changed from roughly 0.4 to about 1.07, no longer suggesting a huge protective effect.

Maria
Rothman says this sort of error is especially tempting with large databases because they contain information recorded at different times. The danger is using future information to decide who belongs in a study group at an earlier time. He calls that a time loop: you make a decision based on information that you couldn’t have known at the moment you’re supposedly analyzing.

Anna
He gives an example of a study restricted to babies born alive. If the birth defect occurs before birth, then live-birth status is information from the future relative to the defect. That may not create a large problem in every study, but it illustrates the need to think carefully about when information occurs and how it is used.

Maria
A Danish registry study offers another immortal-time example. It used skin cancer as a marker for sun exposure, since the registries did not directly record how much time people spent in the sun. The researchers found lower mortality among people with certain skin cancers and concluded that greater sun exposure was associated with living longer.

Anna
But the analysis followed people from age 40 and classified them by whether they ever developed skin cancer. A person had to remain alive until the age when the cancer appeared—perhaps age 75—to qualify for the skin-cancer group. That time before diagnosis was effectively immortal for membership in the exposed group, helping create an artificially low mortality rate.

Maria
The results had an extraordinarily small P-value and a very narrow confidence interval, but those numbers didn’t fix the bias. Rothman notes that the journal’s editors did not retract the paper; instead, they said the findings should be acknowledged as wrong. Precision in a calculation is not the same as validity in the design.

Anna
That brings us to modeling. Rothman says regression models can be useful, and he uses them himself. But a smooth dose-response curve may show the shape assumed by the model rather than the actual pattern in the observed data, which might jump up and down.

Maria
His recommendation is to inspect the data first, often with a stratified tabular analysis. Then you can see what comparisons are being made and whether the data support them. Regression results often agree with a sound tabular analysis, but if you skip inspection, you may never notice a lack of overlap or other problems.

Anna
The beryllium-and-lung-cancer example shows why that matters. Beryllium exposure was mainly occupational, and cumulative exposure increased with time on the job. Workers with the most exposure also tended to be older, and age is strongly relevant when studying lung cancer, so age needed to be controlled.

Maria
The paper reported a rate ratio of about 3.7 for the most highly exposed group compared with the least exposed. Its analysis used strata formed from age, calendar period, race, and exposure categories—about 1,800 cells in all—despite having roughly 400 lung-cancer cases. That left fewer than half a case per cell on average.

Anna
Sparse data can make ratio estimates behave badly. Rothman illustrates this with a fair coin tossed ten times. If you take the ratio of heads to tails, the possible outcomes include zero heads, which gives a ratio of zero, and ten heads, which gives an infinite ratio. The ratio is asymmetric, so rare extreme outcomes can pull its expected value upward even when the coin is fair.

Maria
In the beryllium data, a crude comparison of the highest and lowest exposure groups gave a ratio of 21.5. Controlling for age using seven categories brought it down to 2.6—a remarkable change. The authors’ much finer stratification, with many sparse cells, pushed the estimate back up to 3.7, even though the other confounding variables were expected to pull in the opposite direction.

Anna
The exposure groups also had poor overlap in age. The most exposed workers were concentrated in older age categories, while the least exposed had much of their person-time in younger categories. Where there are few comparable people of the same age, there is little information for a fair within-age comparison; much of the data can’t contribute usefully to that contrast.

Maria
Rothman and a colleague tested the sparse-data problem with simulations. They imposed the same 1,800-stratum method on data where the true effect was zero. The method produced an estimated ratio of 2.6 anyway. Since the observed estimate was 3.7, correcting for the bias suggested an effect closer to 1.4, far smaller than the original result.

Anna
That doesn’t by itself settle the question of beryllium’s effects, but it shows how an apparently sophisticated analysis can mislead when the data are sparse and poorly overlapping. The practical lesson is to look at the distribution of the data, not merely the output of the software.

Maria
Rothman’s broader conclusion is that epidemiology has used secondary data since Graunt, and careful observation has always mattered. But careful handling alone is not enough: researchers also need methodological principles that help them avoid errors like age-confounded comparisons, healthy-vaccinee selection, immortal time, and sparse-data bias.

Anna
He argues that publications should include tables that let readers examine the key comparisons and, ideally, reproduce the crux of the analysis. Today, researchers may publish regression coefficients without showing the underlying detail, and even the investigators may know the model results better than they know what their data look like.

Maria
In the discussion, a student asks whether statistical tests could flag these problems. Rothman replies that it is more straightforward to identify the bias itself than to hope a test will detect it. A P-value calculated from biased data can be extremely small because it is measuring evidence under assumptions that the analysis has already violated.

Anna
He distinguishes using P-values from using statistical tests to divide results into “significant” and “not significant.” He does not think P-values should be treated as a dichotomizing statistic. A non-significant result doesn’t prove there is no effect, just as a significant result doesn’t repair a biased design.

Maria
Instead, Rothman describes a P-value function: calculate P-values across a range of possible hypotheses, such as different rate ratios, and plot them. The resulting curve shows how consistent the data are with each value. Its peak corresponds to the point estimate, while its width conveys how broadly the data fit different possibilities.

Anna
That also shows why a single threshold can be misleading. If a P-value is just above a conventional cutoff for a rate ratio of one, a corresponding point on the other side of the curve might be compatible with a very large rate ratio. The data may fit many values in between better than either extreme, so labeling the result simply “not significant” hides useful information.

Maria
So the episode’s title is a little ironic. Anyone can run an analysis, especially with modern computing, but doing epidemiology well requires asking what the comparison means, when each piece of information occurred, how the data are distributed, and whether the published evidence lets others check the conclusion.

Anna
Computers can make good analysis faster, but they can also make mistaken analysis look precise and authoritative. Rothman’s closing advice is to inspect the data, use sound epidemiologic principles, and show enough detail for readers to see whether the conclusions follow. That’s the difference between an easy calculation and a trustworthy study.

Ask anything
We've read this whole study set, so questions about it get the best answers.