multimodality: Multimodality Score

View source: R/bimodality.R

multimodalityR Documentation

Multimodality Score

Description

Multimodality score based on bootstrapped potential analysis.

Usage

multimodality(
  x,
  peak.threshold = 1,
  bw.adjust = 1,
  bs.iter = 100,
  min.density = 1,
  verbose = TRUE
)

Arguments

x

A vector, or data matrix (variables x samples)

peak.threshold

Mode detection threshold

bw.adjust

Bandwidth adjustment

bs.iter

Bootstrap iterations

min.density

minimum accepted density for a maximum; as a multiple of kernel height

verbose

Verbose

Details

Repeats potential analysis (Livina et al. 2010) multiple times with bootstrap sampling for each row of the input data (as in Lahti et al. 2014) and returns the specified results.

Value

A list with following elements:

  • scoreFraction of bootstrap samples with multiple observed modes

  • nmodesThe most frequently observed number of modes in bootstrap

  • resultsFull results of potential_analysis for each row of the input matrix.

Author(s)

Leo Lahti leo.lahti@iki.fi

References

  • Livina et al. (2010). Potential analysis reveals changing number of climate states during the last 60 kyr. Climate of the Past, 6, 77-82.

  • Lahti et al. (2014). Tipping elements of the human intestinal ecosystem. Nature Communications 5:4344.

Examples

#data(peerj32)
#s <- multimodality(t(peerj32$microbes[, c('Akkermansia', 'Dialister')]))

microbiome/microbiome documentation built on Aug. 22, 2023, 7:12 a.m.