How should you deal with a cell value in a contingency table that is equal to zero in statistical calculations? (Note that such a value can be structural, i.e., it must be zero by definition, or random, i.e., it could have been some other value, but zero was observed.)

  • 2
    $\begingroup$ More info is needed here, by zero do you mean missing? Why do you think you have to do something special because the value is zero? $\endgroup$
    – Glen
    Feb 13 '11 at 14:39
  • 1
    $\begingroup$ I would close it as duplicate stats.stackexchange.com/questions/1444/… $\endgroup$ Feb 13 '11 at 19:04
  • 2
    $\begingroup$ That question asked about transformations rather than about inferential issues. $\endgroup$
    – DWin
    Feb 13 '11 at 19:41

A very nice discussion of structural zeros in contingency tables is provided by West, L. and Hankin, R. (2008), “Exact Tests for Two-Way Contingency Tables with Structural Zeros,” Journal of Statistical Software, 28(11), 1–19. URL http://www.jstatsoft.org/v28/i11

As the title implies, they implement Fisher’s exact test for two-way contingency tables in the case where some of the table entries are constrained to be zero.

  • $\begingroup$ Agresti and Finlay mention that generalizing Fisher's exact test also makes sense when cell counts fall below 5 in any contingency table. $\endgroup$
    – Fr.
    Mar 13 '11 at 15:37

Zeros in tables are sometimes classified as structural, i.e.zero by design or by definition, or as random, i.e. a possible value that was observed. In the case of a study where no instances were observed despite being possible, the question often comes up: What is the one-sided 95% confidence interval above zero? This can be sensibly answered. It is, for instance, addressed in "If Nothing Goes Wrong, Is Everything All Right? Interpreting Zero Numerators" Hanley and Lippman-Hand. JAMA. 1983;249(13):1743-45. Their bottom line was that the upper end of the confidence interval around the observed value of zero was 3/n where n was the number of observations. This "rule of 3" has been further addressed in later analyses and to my surprise I found it even has a Wikipedia page. The best discussion I found was by Jovanovic and Levy in the American Statistician. That does not seem to be available in full-text in the searches, but can report after looking through it a second time that they modified the formula to be 3/(n+1) after sensible Bayesian considerations, which tightens up the CI a bit. There is a more recent review in International Statistical Review (2009), 77, 2, 266–275.

Addenda: After looking more closely at the last citation, above I also remember finding the extensive discussion in Agresti & Coull "The American Statistician", Vol. 52, No. 2 (May, 1998), pp. 119-126 informative. The "Agresti-Coull" intervals are incorporated into various SAS and R functions. One R function with it is binom.confint {package:binom} by Sundar Dorai-Raj.

There are several methods for dealing with situations where an accumulation of "zero" observations distort an otherwise nice, tractable distribution of say costs or health-care usage patterns. These include zero-inflated and hurdle models as described by Zeileis in "Regression Models for Count Data in R". Searching Google also demonstrates that Stata and SAS have facilities to handle such models.

After seeing the citation to Browne (and correcting the Jovanovic and Levy modification), I am adding this snippet from the even more entertaining rejoinder to Browne:

"But as the sample size becomes smaller, prior information becomes even more important since there are so few data points to “speak for themselves.” Indeed, small sample sizes provide not only the most compelling opportunity to think hard about the prior, but an obligation to do so. "More generally, we would like to take this opportunity to speak out against the mindless, uncritical use of simple formulas or rules."

And I add the citation to the Winkler, et al paper that was in dispute.

  • $\begingroup$ Thank you for the appreciably detailed answer with references. $\endgroup$
    – DrWho
    Feb 14 '11 at 2:18
  • $\begingroup$ Jovanovic and Levy recommend 3/(n+1) -- see table 1, page 138 for confirmation. There's also a suggestion by Browne for 3/(n+1.7). faculty.fuqua.duke.edu/~jes9/bio/… $\endgroup$
    – zbicyclist
    May 22 '12 at 15:16
  • $\begingroup$ This is a nice answer. Can you improve the formatting in the 2nd to last paragraph (eg, w/ >)? The quotation marks don't match; is the whole paragraph a quote? Also, the 4th to last paragraph seems to start with a colon for some reason. $\endgroup$ Dec 8 '13 at 3:44
  • $\begingroup$ Thks. As you suggested. I'm more familiar with the SO formatting. CV is a bit more "literary". $\endgroup$
    – DWin
    Dec 8 '13 at 4:03
  • $\begingroup$ You're welcome. I believe the formatting is the same, except that CV also supports $\LaTeX$ via mathjax. Is the whole paragraph a quote, though (b/c there are unmatched quotation marks w/i)? $\endgroup$ Dec 8 '13 at 4:05

Thomas Wickens, in his excellent book Multiway Contingency Table Analysis for the Social Sciences, offers a different suggestion from the ones already proposed. He distinguishes between random zeros, "which are accidents of sampling and whose treatment largely consists of adjustments to the degrees of freedom (chapter 5, p. 120, "Empty Cells")," from structural voids or zeros, "which lack a complete factorial structure and whose analysis requires a modification of the concept of independence" (chapter 10, p. 246).

Chapter 10 is titled "Structurally Incomplete Tables" and considers the treatment of data in which certain cells are a priori excluded from consideration. "Examples of this include hospital admissions by gender: although pregnant men may have a cell in the contingency table, none are observed," (p. 247).

Most importantly, "If one treats the impossible cells (structural zeros) as frequencies of zero, they assert themselves as dependencies in a test of independence (p. 246)."

What one wants to do is ignore the impossible cells in any test of independence or association. The way to do this is to estimate the appropriate model on the full contingency table (including the structural zeros) and then subtract the sum of the chi-square values associated with the zero cells from the total chi-square test. This generates a reduced chi-square test of independence only for the reduced contingency table.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.