Skip to contents

Executes a complete analysis pipeline for Morse-Smale complex data by sequentially processing critical points, creating labels, generating indicators, computing frequency tables, and forming contingency relationships.

Usage

morse.smale.complex.lmin.lmax.summary(
  MS.res,
  state.space,
  taxonomy,
  rel.condE,
  freq.thld = 100,
  min.relAb.thld = 0.05,
  outcome.name = "outcome"
)

Arguments

MS.res

List containing Morse-Smale complex results with component MS_cx

state.space

Matrix representing the state space (e.g., ASV abundance matrix)

taxonomy

Taxonomy information for state space features

rel.condE

Numeric vector of relative conditional expectations

freq.thld

Frequency threshold for filtering (default: 100)

min.relAb.thld

Minimum relative abundance threshold for labels (default: 0.05)

outcome.name

Character string describing the outcome variable (default: "outcome")

Value

A list with four components:

labels

Results from create.lmin.lmax.labels including lmin.labels and lmax.labels

indicators

Results from create.lmin.lmax.label.indicators including indicator vectors and tables

frequencies

Results from create.lmin.lmax.frequency.tables including frequency tables and captions

contingency

Results from create.lmin.lmax.contingency.table including contingency table and caption

Details

The function executes the following steps:

  1. Creates labels for local minima and maxima based on taxonomic composition

  2. Generates indicator vectors and label tables for critical points

  3. Computes frequency tables with statistics for critical points

  4. Creates contingency table showing relationships between local minima and maxima

Examples

if (FALSE) { # \dontrun{
results <- morse.smale.complex.lmin.lmax.summary(
    MS.res = smoothed.condE.MS.res,
    state.space = asv.matrix,
    taxonomy = asv.taxonomy,
    rel.condE = rel.smoothed.condE,
    outcome.name = "smoothed conditional expectation"
)
} # }