Skip to main content
QUICK REVIEW

[Paper Review] Multimode: An R Package for Mode Assessment

Jose Ameijeiras‐Alonso, Rosa M. Crujeiras|arXiv (Cornell University)|Mar 1, 2018
RNA and protein synthesis mechanismsBiochemistry, Genetics and Molecular Biology22 references26 citations
TL;DR

This paper introduces the R package multimode, which provides nonparametric tools for exploratory and inferential assessment of multimodality in univariate data. It integrates graphical methods like SiZer maps and mode trees with formal hypothesis tests based on critical bandwidth and excess mass, enabling robust identification of significant modes and their locations.

ABSTRACT

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.

Motivation & Objective

  • To develop a comprehensive, user-friendly R package for assessing the number and location of modes in univariate data distributions.
  • To address the challenge of distinguishing genuine modes from sampling variability in kernel density estimates.
  • To provide both exploratory graphical tools and formal hypothesis testing procedures for multimodality detection.
  • To enable researchers to test for unimodality and general multimodality in a nonparametric framework with calibrated p-values.
  • To support systematic, repeatable analysis across multiple datasets, particularly in fields like astronomy, genetics, and psychology where mode structure is scientifically meaningful.

Proposed method

  • Implementation of SiZer (Significant Zero) maps to visualize mode persistence across bandwidths, identifying statistically significant features in kernel density estimates.
  • Integration of mode tree and mode forest visualizations to track mode patterns through varying bandwidths, aiding in mode pattern recognition.
  • Incorporation of formal testing procedures based on critical bandwidth (Silverman, 1981) and excess mass (Hartigan & Hartigan, 1985), with bootstrap-based p-value computation.
  • Development of the `locmodes` function to estimate mode and antimode locations and their density values using iterative refinement and critical bandwidth computation.
  • Use of the `modetest` function to test unimodality versus multimodality, with options for bootstrap quantiles and significance level adjustment.
  • Incorporation of the `diptest` and `feature` package functionalities via wrapper functions, ensuring compatibility and extended utility.

Experimental results

Research questions

  • RQ1How can researchers reliably distinguish between true modes and sampling artifacts in kernel density estimates?
  • RQ2What graphical tools can effectively reveal persistent mode patterns across different bandwidths in univariate data?
  • RQ3How can formal hypothesis tests for multimodality be implemented in a nonparametric, robust, and calibrated way in R?
  • RQ4What is the optimal number of modes in a given dataset, and where are they located with statistical confidence?
  • RQ5How can the multimode package support systematic, repeatable, and reproducible mode assessment in applied research across diverse scientific fields?

Key findings

  • The multimode package provides the first R implementation that combines both exploratory graphical tools (SiZer, mode tree) and formal testing procedures for general multimodality testing.
  • The `locmodes` function successfully estimated four modes at locations 0.07857, 0.09065, 0.1006, and 0.1083 for the 1872 Hidalgo stamp thickness data, with corresponding density values and critical bandwidths.
  • The SiZer map and `modetest` function jointly support the conclusion that four modes are significant, particularly when bandwidths correspond to log10(h) ≈ -2.7.
  • The package enables reliable unimodality testing via the Hartigan dip test and bootstrap-based p-values, with applications demonstrated in astronomy and epigenetics.
  • The package is the only one in R that offers a well-calibrated, nonparametric test for general multimodality, not limited to unimodality testing.
  • Future extensions to circular data and other non-Euclidean settings are feasible, as shown by existing theoretical foundations and partial implementations in related packages.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.