Source-linked AI summary

Multimode: An R Package for Mode Assessment

Jose Ameijeiras-Alonso, Rosa M. Crujeiras, Alberto Rodríguez-Casal

arXiv:1803.00472v1stat.CO

TL;DR

Applied modeling often requires knowing how many modes a distribution has and whether apparent patterns reflect the data or sampling variability. The paper presents multimode, an R package combining nonparametric exploration, testing, and location estimation; the authors report that it supports testing general mode counts and provides a well-calibrated unimodality test.

  • Problem

    Applied modeling needs mode counts, while assessment must distinguish density structure from sampling variability and may call for exploratory or formal procedures.

    Source: §1 · p. 3
  • Method

    The multimode R package combines graphical tools for exploring mode patterns and locations with nonparametric tests and mode-location estimation.

    Source: §1 · p. 3, §4 · p. 20
  • Results

    The authors report that multimode allows nonparametric testing of a general number of modes and provides a well-calibrated unimodality test.

    Source: §4 · p. 20
  • Takeaways & Limitations

    Final p-values can be useful for systematic conclusions about mode counts, including when unimodality tests are applied repeatedly.

    Source: §4 · p. 20

    The package covers mode-assessment procedures for real random variables; circular settings are discussed as a possible extension.

    Source: §4 · p. 20

Abstract

from arXiv · show

In several applied fields, multimodality assessment is a crucial task as a previous exploratory tool or for determining the suitability of certain distributions. The goal of this paper is to present the utilities of the R package multimode, which collects different exploratory and testing nonparametric approaches for determining the number of modes and their estimated location. Specifically, some graphical tools, allowing for the identification of mode patterns, based on the kernel density estimation are provided (SiZer map, mode tree or mode forest). Several formal testing procedures for determining the number of modes are described in this paper and implemented in the multimode package, including methods based on the ideas of the critical bandwidth, the excess mass or using a combination of both. This package also includes a function for estimating the modes locations and different classical data examples that have been considered in mode testing literature.

1 A brief introduction on mode assessment

Assessing the number and location of density modes supports modeling decisions across applied fields. The paper introduces multimode as an R toolbox combining exploratory displays, formal nonparametric tests, and mode-location estimation.

1 A brief introduction on mode assessment

  • Identifying density modes can support modeling decisions in fields including astronomy, business, forestry, genetics, and psychology.Examples include distinguishing single- from dual-process cognitive phenomena and identifying multimodal DNA-region distributions.Source: §1 · p. 1
  • Mode assessment must distinguish genuine density structure from patterns caused by sampling variability before a parametric model is fitted.The paper describes mixtures of normals as a flexible approximation for distributions with several groups or modes.Source: §1 · p. 2
  • Exploratory mode trees, mode forests, and SiZer maps show how estimated mode patterns change across bandwidths, but leave the final count to visual judgment.Formal tests address whether the density has k modes or more than k, using critical-bandwidth and/or excess-mass statistics.Source: §1 · p. 2
  • The multimode package complements existing R tools with nonparametric methods for exploratory and inferential assessment of multimodality.The introduction notes that few kernel-density methods for identifying mode counts were available and positions the package as a complement to existing implementations.Source: §1 · pp. 2–4
  • For SiZer maps, multimode offers four derivative-confidence-interval methods, including normality- and bootstrap-based approaches, alongside mode trees and mode forests.In the stamp-data example, bootstrap-based multimode maps show more than one mode, whereas feature and multimode Gaussian-approximation maps detect at most one.Source: §1 · p. 4
  • Multimode includes tests beyond unimodality and a nonparametric procedure for estimating mode and antimode locations when the mode count is known.Its graphical tools also let users explore mode locations when the count is unclear; the paper describes the package's broader methods and examples.Source: §1 · p. 4

2 Exploratory and testing methods for assessing multimodality

The section explains kernel-density-based exploratory tools and nonparametric tests for assessing mode counts and locations. It describes how bandwidth and excess-mass methods support these analyses, with calibration and scope varying by proposal.

2.1 Exploratory tools

  • With a Gaussian kernel, increasing bandwidth monotonically reduces the estimated mode count; mode trees show locations and splits, while mode forests shade resampled mode frequencies.SiZer maps encode significant increases in blue, decreases in red, and nonsignificant derivative regions in orchid; a blue–red pattern marks a significant peak.Source: §2.1 · pp. 5, 7, Figure 1 · p. 6
  • Mode trees and forests do not distinguish modes created by atypical points, whereas SiZer assesses significant density features through the kernel estimate’s derivative.The SiZer map displays derivative behavior across location and bandwidth.Source: §2.1 · pp. 5, 7

2.2 Testing procedures

  • The testing procedures address H0: j = k versus Ha: j > k, using the critical bandwidth, excess mass, or both.Here j is the true number of modes and k is a positive integer.Source: §2.2 · p. 8

2.3 Using a critical bandwidth

  • Silverman’s critical bandwidth is the smallest bandwidth yielding at most k estimated modes; with the true mode count known, it can estimate mode and antimode locations under general assumptions.Hall–York calibration is not directly applicable to general k-modality because it depends on unknown features of the density at its turning points.Source: §2.3 · pp. 8–9

2.4 Using an excess–mass statistic

  • For k modes, excess mass maximizes probability above level λ across k intervals; the excess-mass difference measures evidence against H0, with large values indicating its falsity.In the illustrated bimodal case, the difference between the two-mode and one-mode excess masses is the light-grey area.Source: §2.4 · p. 9, Figure 2 · p. 10
  • The excess-mass proposals differ in calibration: Cheng–Hall’s parametric bootstrap may be unsatisfactory for complicated unimodal models, while Ameijeiras-Alonso et al. provide a nonparametric bootstrap with correct behavior under regularity conditions.For small samples, the latter is reported to behave correctly; when compact support for modes and antimodes is known, using the Hall–York bandwidth for resampling can improve its results.Source: §2.4 · pp. 9–10
  • Simulations found unsatisfactory behavior for Silverman’s and Fisher–Marron’s tests of k-modality when k > 1; asymptotically correct behavior is expected for the stated Hall–York, Cheng–Hall, and Ameijeiras-Alonso et al. tests.The Hall–York expectation applies to unimodality tests with bounded support or a compact support interval; the other stated expectations concern Cheng–Hall and Ameijeiras-Alonso et al. methods.Source: §2.4 · p. 10

3 Using multimode

Section 3 describes the multimode package’s datasets and functions for exploring modality, testing mode counts, and estimating mode and antimode locations. It also details locmodes’ density-value and critical-bandwidth estimates, illustrated alongside the package’s exploratory tools and tests.

3.1 Data description

  • The package includes acidity, chondrite, enzyme, galaxy, geyser, and stamps datasets for mixture-model examples or mode exploration and testing.For stamps, determining the number of modes helps assess the number of groups in the issue.Source: §3.1 · pp. 11–12

3.2 Exploring data with multimode

  • For stamps, modetree locates the principal mode at 0.0765–0.0793 and a secondary mode at 0.0986–0.1011, while modeforest suggests at least seven modes.Very dark modeforest traces can reflect spurious modes caused by atypical data points.Source: §3.2 · pp. 13–14
  • On stamps, SiZer conclusions depend on quantiles and bandwidth: Gaussian quantiles detect at most one mode, while bootstrap q3 detects one to five and q4 one to three.The principal mode is around 0.08; q3 and q4 also detect modes around 0.10 and 0.07 for some bandwidths.Source: §3.2 · p. 15

3.3 Testing and locating modes with multimode

  • The package implements critical-bandwidth and excess-mass tests, bootstrap or Monte Carlo p-values, and locmodes estimates of modes, antimodes, and density values.Hall–York testing requires known bounded support or a specified interval; known compact support can aid location estimation, while Silverman’s critical bandwidth may create artificial tail modes.Source: §3.3 · pp. 15–19
  • At α=0.05, all available unimodality tests reject the null hypothesis for the stamps data.Table 2 reports results for SI, HY, FM, HH, CH, and ACR; ACR uses the exact excess-mass statistic.Source: Table 2 · p. 18, §3.3 · p. 18
  • ACR rejects k-modality through k=3 but not for k≥4, suggesting four modes; SI and FM give no clear conclusion at α=0.05.SI does not reject for k = 2, 3, 7, 8, or 9, while perturbed-sample FM does not reject only for k = 7.Source: Table 3 · p. 18, §3.3 · p. 18
  • locmodes returns alternating mode and antimode locations, their density values, and the sample’s critical bandwidth for the specified mode count.Mode locations occupy odd vector positions and antimode locations even positions; density values are returned in fvalue and critical bandwidth in cbw.Source: §3.3 · p. 19
  • The four estimated modes are 0.07857, 0.09065, 0.1006, and 0.1083.These estimates use locmodes with four modes assumed.Source: §3.3 · p. 20
  • With four modes supported by bootstrap quantiles q3, locmodes estimates coincide with SiZer-map features near log10(h) = −2.7.The modetest results can help interpret the SiZer map.Source: §3.3 · p. 20

4 Discussion

multimode combines nonparametric graphical exploration of mode number and location with testing procedures for mode number, currently for real random variables. The authors describe it as, to their knowledge, the only package testing a general number of modes nonparametrically and the only one offering a well-calibrated unimodality test.

4 Discussion

  • The package provides nonparametric graphical tools to explore mode number and estimated locations, alongside tests for determining mode number.The procedures are intended to make mode assessment accessible for practical problems.Source: §4 · p. 20
  • To the authors’ knowledge, multimode is the only statistical package for nonparametric testing of a general number of modes and for a well-calibrated unimodality test.Final p-values can support systematic conclusions and, with False Discovery Rate techniques, account for multiple testing.Source: §4 · p. 20
  • The package currently includes exploratory and testing procedures only for mode assessment of real random variables.The authors identify other settings, such as circular variables, as possible future extensions.Source: §4 · p. 20
Loading 1803.00472v1…