# Modes and antimodes in apparent trimodal distribution with R

Suppose I have the following white blood cell counts:

WBC <- c(5.2, 39.0, 2.7, 12.6, 8.9, 63.0, 2.7, 12.0, 37.1, 2.5, 54.8, 8.8, 210.0, 13.7, 3.0, 475.0, 9.6, 130.0, 13.4, 3.1, 33.4, 1.9, 35.0, 38.7, 156.0, 103.0, 1.1, 30.0, 24.4, 58.8, 207.0, 4.1, 6.7, 188.0, 61.0, 175.0, 2.9, 342.0, 8.0, 144.0, 13.7, 59.8, 57.0, 0.8, 53.0, 34.0, 26.0, 27.3, 1.5, 8.3, 12.4, 25.0, 61.0, 57.0, 2.2, 8.9, 5.9, 4.7, 14.0, 5.9, 112.0, 61.0, 2.5, 700.0, 5.2, 21.0, 228.0, 5.1, 10.0, 0.4, 5.7, 231.0, 33.0, 4.7, 89.8, 11.2, 2.2, 35.0, 40.0, 65.0, 4.7, 23.0, 13.0, 63.8, 170.0, 375.0, 2.3, 79.4, 440.0, 5.7, 22.0, 92.0, 545.0, 19.8, 7.0, 2.0, 2.7, 5.5, 58.0, 1.3, 82.0, 326.0, 1.6, 3.4, 4.1, 60.0, 21.0, 175.0, 7.3, 7.2, 28.0, 3.6, 19.0, 1.4, 35.8, 9.0, 185.0, 3.9, 4.0, 11.0, 8.3, 17.0, 71.0, 103.0, 4.6, 7.7, 880.0, 7.6, 3.1, 6.5, 5.0, 7.2, 58.3, 41.0, 118.0, 3.8, 9.5, 3.9, 72.0, 15.5, 7.3, 169.0, 6.5, 7.9, 170.0, 2.6, 302.0, 354.0, 730.0, 6.4, 4.0, 11.0, 13.0, 26.0, 248.0, 2.3, 34.0, 10.0, 764.0, 446.0, 2.0, 603.0, 3.6, 28.0, 77.0, 24.0, 49.0, 53.0, 3.2, 12.6, 8.0, 21.0, 105.0, 80.0, 4.0, 418.0, 73.0, 7.8, 79.0, 34.0, 13.6, 9.2, 54.0, 1.9, 120.0, 24.0, 25.0, 2.0, 76.0, 3.9, 9.0, 51.0, 30.0, 15.6, 3.7, 5.4, 21.0, 496.0, 3.0, 17.0, 16.0, 60.0, 4.0, 10.0, 4.0, 20.0, 17.0, 8.0, 2.0, 66.0, 602.0, 54.0, 7.0, 70.0, 4.0, 6.0, 12.0, 102.0, 540.0, 2.6, 10.0, 266.0, 0.8, 6.0, 60.0, 22.0, 1.0, 122.0, 400.0, 18.0, 5.1, 119.0, 9.0, 8.0, 11.5, 215.0, 18.0, 29.0, 3.0, 77.0, 6.0)


When I simply do plot(density(WBC)), it's a single peak with a long tail, so I take the log. When I do plot(density(log(WBC)), it looks like I have a trimodal distribution with modes roughly around 2 (7.38), 4 (54.60), and 6 (403.43). Numbers in parentheses are the original WBC. What I would like to do would be to more than just eyeball the distribution. I have played with the mode package, but all it can do is find two modes and an antimode via bimodality_amplitude(log(WBC)). When I try the modes function, it only works on integers, and the outcome depends entirely upon what I choose to multiply the vector by and round digits to.

Am I missing something?

• In short, no! Modality is sometimes in the eye of the beholder and even if your decision is delegated to results from the defaults of a kernel density estimate, that decision is highly sensitive to choices of kernel width and even shape. I don't know what is standard with this measure, white blood count, but given these data I too lean towards analysis on log scale. No graph or estimate I try gives strong support for more than one mode. A personal rule of thumb is not to accept multiple modes without independent indications from different methods and a plausible substantive interpretation. – Nick Cox Aug 29 '17 at 19:19
• What is your objective behind "more than just eyeball the distribution"? – whuber Aug 29 '17 at 19:40
• WBC level stratification vs treatment outcomes. I would prefer to do log(WBC) vs. outcomes, but the PIs want to establish "risk categories" based on WBC. – Bryan Aug 29 '17 at 19:46
• Categorising an essentially continuous variable attracts wrathful dissection, especially from medical statisticians such as @Frank Harrell, although I can see that clinicians need criteria for decisions on treatment(s). – Nick Cox Aug 29 '17 at 21:15
• 1. The evidence for a mode in the density of the log-data just above 4 is clear, but the evidence of an actual mode near 6 is very weak. I would be surprised if code for identifying modes would insist there was one there since it looks like it could easily just be noise. 2. Note that a local mode in the density of a transformed variate doesn't necessarily imply a local mode in the density of the original variate. 3. Depending on what you're doing it for, there may be come argument for classification on WBC, since there may be particular (clinically relevant) causes of high or low WBC..ctd – Glen_b Aug 30 '17 at 2:33