US foodborne outbreak trends 1998-2018: testing count trends

A Bayesian model finds fewer US outbreaks from eggs and beef but more from dairy. We simulate outbreak counts to see when a Mann-Kendall test would catch such trends.

Every year, US health departments report the foodborne outbreaks they investigate (two or more people sick from the same food) to a national surveillance system. A new PLOS ONE study looks at 21 years of those reports for four bacteria, Campylobacter, the O157 strain of Shiga toxin-producing E. coli (STEC), Listeria and Salmonella, and asks which foods are causing more or fewer outbreaks. Outbreak counts are small whole numbers that jump about from year to year, which makes trends hard to test. This article uses the trend analyser and the probability distribution explorer to show how big a change a simple trend test can find in counts like these, and why the authors chose a model built for counts.

The paper in brief

The authors fitted a Bayesian negative binomial model with a smooth curve over the years, one for each pathogen and food group, 184 models in all. A negative binomial is a distribution for counts whose spread is larger than their average, as outbreak counts usually are; “Bayesian” means the result comes as a range of plausible values (a credible interval) rather than a single p-value. They then compared the average number of outbreaks a year in four windows: 1998-2003, 2004-2008, 2009-2013 and 2014-2018.

  • Salmonella from eggs fell the most: about 10.1 fewer outbreaks a year in 2014-2018 than in 1998-2003, in line with US egg safety rules brought in during the 2000s.
  • STEC O157 from meat (mostly beef) fell by about 5.3 outbreaks a year.
  • Listeria from dairy rose by about 1.7 a year, while Listeria from meat and poultry fell.
  • Campylobacter outbreaks from dairy (largely raw milk) rose and then fell; from poultry they changed by about 4.2 a year between the first and last windows.
  • Outbreak numbers changed significantly more often than outbreak illnesses, because a single large outbreak can add hundreds of cases in one year.

Checked with the tools

The paper gives the differences between window averages, not the yearly counts, so this section is a simulation. We made up yearly counts for 1998 to 2018 whose window averages differ by the amounts the paper reports, using a negative binomial like the paper’s model, and ran them through the Trend analyser’s maths. The levels and spread are our assumptions.

Step 1: one series shaped like Salmonella in eggs. We let the expected count fall smoothly from about 12 a year (1998-2003) to 2 a year (2014-2018), and drew each year’s count from a negative binomial with size r = 5 (variance = mean + mean² ÷ 5). Figure 1 shows one such series. The Trend analyser gives:

  • Mann-Kendall S = −102, Z = −3.071, p = 0.002, Kendall’s tau −0.486: a clear fall.
  • Sen slope −0.667 outbreaks a year (95 % interval −1.08 to −0.25).
  • Pettitt’s change point between 2009 and 2010 (p = 0.006).
  • Window means 14.0, 9.2, 4.0 and 3.0 outbreaks a year.

The Sen slope is a straight line, while the real fall is steep early and flat late, so it understates the early decline. That is the reason the authors used a smooth curve and window averages instead of one slope.

Simulated yearly outbreaks shaped like Salmonella in eggsSimulated yearly outbreaks shaped like Salmonella in eggs01020302e+32.01e+32.01e+32.02e+3YearOutbreaks (simulated)Simulated year5-year window meanSen slope -0.67 a yearfibub.com
Figure 1. One made-up 21-year series of outbreak counts, drawn from a negative binomial distribution whose mean falls from about 12 to 2 a year (the paper's difference of 10.1 between the end windows; the level and spread are our assumptions). Dashed steps: 5-year window means; solid line: Sen slope from the Trend analyser's maths. Not the surveillance data.

Step 2: when does a simple test find the trend? We repeated the experiment 400 times for each size of change, with the quieter end window at 2 outbreaks a year (our assumption), and counted how often Mann-Kendall gave p < 0.05 (Figure 2). With pure Poisson counts (spread equal to the mean), a fall of 4 a year or more is found over 90 % of the time. With over-dispersed counts, as outbreak data usually are, the test needs bigger changes:

Change between end windows Poisson Negative binomial, r = 5 Negative binomial, r = 2
Salmonella in eggs, 10.1 fewer 100 % 99.8 % 88 %
STEC O157 in meat, 5.3 fewer 99 % 84 % 57 %
Campylobacter in poultry, 4.2 more 93 % 74 % 50 %
Listeria in dairy, 1.7 more 35 % 26 % 14 %

A rise of 1.7 outbreaks a year from a low base, like Listeria in dairy, is found only about a quarter of the time by a rank test on 21 yearly totals. The paper’s model, which knows the data are counts and borrows strength across neighbouring years, reports it with a credible interval of 0.4 to 3.7. That shows the value of a count model, but also why small changes in rare outbreaks deserve caution: they rest more on the model’s assumptions.

How often Mann-Kendall finds a trend in 21 yearly countsHow often Mann-Kendall finds a trend in 21 yearly counts00.20.40.60.810246810Difference between first and last window means (outbreaks a year)Share of simulated series with p < 0.0580 %PoissonNegative binomial, r = 5Negative binomial, r = 2fibub.com
Figure 2. Share of 400 simulated 21-year count series that the Mann-Kendall test flags at the 5 % level, against the difference between the first and last 5-year window means, with the lower window at 2 outbreaks a year. Vertical lines mark the paper's differences for Listeria in dairy (1.7), Campylobacter in poultry (4.2), STEC O157 in meat (5.3) and Salmonella in eggs (10.1). Simulation, not the paper's data.

Step 3: what over-dispersion looks like. In the Distribution explorer, a negative binomial with mean 3 and r = 5 has variance 4.8 instead of the Poisson’s 3, and a 9.5 % chance of a year with no outbreaks at all (Poisson: 5.0 %). Years of zero then a sudden 11, as in Figure 1, are normal for counts like these.

How we made the graphs

The script scripts/blog-figures/us-foodborne-outbreak-trends-1998-2018-mann-kendall-negative-binomial.mjs imports mannKendall, senSlope, senCI and pettitt from src/lib/sci/trend.ts (the Trend analyser) and DIST.nbinom, rng and gammaDraw from src/lib/sci/distributions.ts (the Distribution explorer). It draws negative binomial counts as a gamma-Poisson mixture with a fixed seed, so the charts are the same on every run. Inputs: the four windows and the differences of 10.1, 5.3, 4.2 and 1.7 outbreaks a year from the paper’s text; the level of 2 outbreaks a year in the quieter window, the smooth (log-linear) shape and the sizes r = 2 and 5 are our assumptions. The script prints every number above and writes both charts into this article.

How we test the maths

The Trend analyser is checked in tests/sci.mjs against pyMannKendall 1.4.3 on a made-up 50-value series: S = 480, Var(S) with ties 14,288.667, Z = 4.007187, Sen slope 0.0152381 per step, and the Hamed-Rao autocorrelation correction p = 0.0107871. Ties matter for counts, which repeat often; a separate check confirms the tie correction against the textbook formula, and Pettitt’s statistic is checked against a brute-force sum (K = 509). The Distribution explorer’s 35 distributions, the negative binomial among them, are checked in tests/sci-tools/distribution-explorer.mjs against values from SciPy 1.18.1: probabilities, cumulative probabilities, quantiles and the mean, variance, skewness and kurtosis. All of these run on every change to the site with npm test.

Check it yourself

  1. Open the Trend analyser and replace the example in Time and value with the made-up series from Figure 1, one year and count per line:
1998 7
1999 12
2000 27
2001 15
2002 8
2003 15
2004 4
2005 11
2006 12
2007 10
2008 9
2009 14
2010 1
2011 2
2012 1
2013 2
2014 1
2015 11
2016 0
2017 2
2018 1
  1. Leave Test on Mann-Kendall. Type outbreaks in Value unit (for labels) and set Report the slope per to 1 time unit (year).
  2. It reads Significant decreasing trend, about −0.667 outbreaks per year (95 % CI −1.08 to −0.25), p = 0.002. Under Test: S = −102, Z = −3.071. Change point (Pettitt): between 2009 and 2010.
  3. Open the Distribution explorer, choose Negative binomial, and set Successes r to 5 and Probability p to 0.625 (for mean μ and size r, p = r ÷ (r + μ) = 5 ÷ 8).
  4. Mean reads 3 and Variance 4.8. Set Shade to Below b (left tail) and b to 0: the probability of a year with no outbreaks is about 0.095.
  5. Press Draw sample to see how lumpy 1,000 such years are.

What researchers can use it for

  • Test a surveillance series. Paste yearly or monthly case or outbreak counts into the trend analyser for Mann-Kendall, the Sen slope and a change-point year in seconds.
  • Plan before analysing. Simulate counts at your expected level and spread, as here, to see whether a rank test will have the power you need, or whether a count model is required.
  • Choose a distribution. Compare Poisson and negative binomial spreads in the probability distribution explorer before fitting a model in R or Python.
  • Look at the outbreak itself. For one outbreak’s onset dates and food history, the epi curve draws the epidemic curve and the attack rates.
  • Teach why counts of rare events need models built for counts, and why “no significant trend” is not proof of no change.

The fine print

  • Every series here is simulated; none of it is the CDC surveillance data. Only the window differences come from the paper.
  • The paper’s credible intervals come from a Bayesian model; the Mann-Kendall p-values here answer a different, simpler question.
  • Reported outbreaks depend on how hard health departments look; better DNA fingerprinting since the 2010s finds more small, spread-out outbreaks, which can look like a rise.
  • This is general education; for food safety rules, check the official source in your country.

Sources

  • Bazaco, M. C., Batz, M., Cote, A., Richardson, L., Bilanovic, I., Hoekstra, R. M., Zablotsky Kufel, J. and Bruce, B. (2026), Trends in foodborne outbreaks and outbreak-associated illnesses using a Bayesian trend model - United States, 1998-2018, PLOS ONE 21(8): e0353943, doi:10.1371/journal.pone.0353943. Licence CC0 1.0 (public domain), checked on the journal page, 2026-11-16. Values used here, from the article's text: CDC Foodborne Disease Outbreak Surveillance System, 1998-2018; four pathogens (Campylobacter, STEC O157, Listeria monocytogenes, nontyphoidal Salmonella); Bayesian negative binomial regression with a smooth (thin plate spline) year term, 20,000 iterations with 5,000 burn-in, 184 models; four windows 1998-2003, 2004-2008, 2009-2013, 2014-2018; median differences in outbreaks a year: Salmonella in eggs -10.1 (5.8 to 15.5) last against first window; STEC O157 in meat -5.3 (1.9 to 10.0); Listeria in dairy +1.7 (0.4 to 3.7); Campylobacter in poultry 4.2 (2.2 to 6.6) between the first and fourth windows; Salmonella illnesses from meat and poultry +318.3 (69.3 to 664.5) a year, last against first window.
  • Mann, H. B. (1945), Econometrica 13, 245-259; Kendall, M. G. (1975), Rank Correlation Methods (the Mann-Kendall test); Sen, P. K. (1968), J. Am. Stat. Assoc. 63, 1379-1389 (Sen slope); Pettitt, A. N. (1979), A non-parametric approach to the change-point problem, Applied Statistics 28, 126-135.
  • Hussain, M. M. and Mahmud, I. (2019), pyMannKendall, J. Open Source Softw. 4(39), 1556, and SciPy's scipy.stats.nbinom (reference values in fibub's tests).

If you are an author or publisher and want a credit or a passage changed or removed, tell us and we will act quickly.

Tools in this article

Read next